Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.022 s | 3 KBi |
#2 |
Correcto
|
0.02 s | 3 KBi |
#3 |
Correcto
|
0.024 s | 3 KBi |
#4 |
Correcto
|
0.018 s | 3 KBi |
#5 |
Correcto
|
0.028 s | 3 KBi |
#6 |
Correcto
|
0.018 s | 3 KBi |
#7 |
Correcto
|
0.025 s | 3 KBi |
#8 |
Correcto
|
0.022 s | 3 KBi |
#9 |
Correcto
|
0.021 s | 3 KBi |
#10 |
Correcto
|
0.021 s | 3 KBi |
n = input() inp = input() array = [int(x) for x in inp.split()] c = input() n = int(n) c = int(c) respuestas = [] def comparar(x): contador = 0 for i in range(0, n): if array[i] > x: contador = contador + 1 return contador # Pedir consultas for i in range(0, c): x = input() x = int(x) res = comparar(x) respuestas.append(comparar(x)) # Mostrar resultados for i in range(0, c): print(respuestas[i])