Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.008 s | 3 KBi |
#2 |
Correcto
|
0.009 s | 3 KBi |
#3 |
Correcto
|
0.012 s | 3 KBi |
#4 |
Correcto
|
0.009 s | 3 KBi |
#5 |
Correcto
|
0.009 s | 3 KBi |
#6 |
Correcto
|
0.012 s | 3 KBi |
#7 |
Correcto
|
0.009 s | 3 KBi |
#8 |
Correcto
|
0.009 s | 3 KBi |
#9 |
Correcto
|
0.01 s | 3 KBi |
#10 |
Correcto
|
0.009 s | 3 KBi |
def consultar(lista, queries): results = [] for x in queries: value = sum(1 for n in lista if n > x) results.append(value) return results n = int(input()) lista = [int(n) for n in input().split()] c = int(input()) queries = [] for _ in range(c): queries.append(int(input())) response = consultar(lista, queries) for x in response: print(x)