Submission #169783


Source Code Expand

Copy
N = input()
s = []
dic = {}

for num in range(0,N):
    name = raw_input()
    s.append(name)

for name in s:
    if name not in dic:
        dic[name] = 1
    else:
        dic[name] = dic[name] + 1

result = max((v,k) for (k,v) in dic.items())[1]

print result

Submission Info

Submission Time
Task B - 投票
User suzuyoshi9
Language C (GCC 4.6.4)
Score 0
Code Size 278 Byte
Status CE

Compile Error

./Main.c:1:1: warning: data definition has no type or storage class [enabled by default]
./Main.c:2:1: error: initializer element is not constant
./Main.c:2:1: error: expected ‘,’ or ‘;’ before ‘s’
./Main.c:5:1: error: expected identifier or ‘(’ before ‘for’