← Back to List

1270번: 전쟁 - 땅따먹기 ↗

Solutions

PyPy3
294 B | 294 chars
for _ in range(int(input())):
    n, *l = [*map(int, input().split())]

    d = {}

    for i in l:
        try:
            d[i] += 1
        except:
            d[i] = 1

    for i, j in d.items():
        if j * 2 > n:
            print(i)
            break
    else:
        print("SYJKGW")