Source Code
t = int(input())
for i in range(t):
    input()
    v = [int(x) for x in input().split()]
    mx = max(v)
    print(' '.join(str(x) for x in v if x == mx))
Copy
To-do List Light
Python 3
275 ms
21.2 MB
Accepted