Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.014 s | 3 KBi |
#2 |
Correcto
|
0.013 s | 3 KBi |
#3 |
Correcto
|
0.009 s | 3 KBi |
#4 |
Correcto
|
0.009 s | 3 KBi |
#5 |
Correcto
|
0.01 s | 3 KBi |
#6 |
Correcto
|
0.008 s | 3 KBi |
#7 |
Correcto
|
0.008 s | 3 KBi |
#8 |
Correcto
|
0.013 s | 3 KBi |
#9 |
Correcto
|
0.012 s | 3 KBi |
#10 |
Correcto
|
0.01 s | 3 KBi |
def process_queries(nums, queries): results = [] for x in queries: ans = sum(1 for num in nums if num > x) results.append(ans) return results n = int(input()) nums = list(map(int, input().split())) c = int(input()) queries = [] for _ in range(c): x = int(input()) queries.append(x) # Process queries and print results results = process_queries(nums, queries) for ans in results: print(ans)