problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p02773
u106342872
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["n = int(input())\ns = ['.'] * n\nfor i in range(n):\n s[i] = str(input())\n\ndict = {}\n\nfor i in range(n):\n if s[i] in dict:\n dict[s[i]] += 1\n else:\n dict[s[i]] = 1\n \nm = max(dict.values())\n\nkeys = [k for k, v in dict.items() if v == m]\nfor i in range(len(keys)):\n print(keys[i])\n", "n = int(input())\ns = ['.'] * n\nfor i in range(n):\n s[i] = str(input())\n\ndict = {}\n\nfor i in range(n):\n if s[i] in dict:\n dict[s[i]] += 1\n else:\n dict[s[i]] = 1\n \nm = max(dict.values())\n\nkeys = [k for k, v in dict.items() if v == m]\nkeys.sort()\nfor i in range(len(keys)):\n print(keys[i])\n"]
['Wrong Answer', 'Accepted']
['s052769712', 's055873393']
[35176.0, 35172.0]
[609.0, 732.0]
[308, 320]
p02773
u107915058
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\nd = {}\nfor _ in range(N):\n S = input()\n if S in d:\n d[S] += 1\n else:\n d[S] = 1\nm = d[max(d)]\nl=[]\nfor i in d:\n if d[i] == m:\n l.append(i)\nfor i in sorted(l):\n print(i)', 'd = {}\nfor i in range(n):\n if s[i] in d:\n d[s[i]] += 1\n else:\n d[s[i]] = 1\nm = d[max(d)]\nl=[]\nfor i in d:\n if d[i] == m:\n l.append(i)\nfor i in sorted(l):\n print(i)', 'ss = sorted(list(set(s)))\nlens = len(ss)\nl = [0]*len(ss)\nfor i in range(lens):\n l[i] =s.count(ss[i])\nfor i in range(lens):\n if l[i] == max(l):\n print(ss[i])', 'n = int(input())\ns = list(input() for _ in range(n))\nd = {}\nfor i in range(n):\n if s[i] in d:\n d[s[i]] += 1\n else:\n d[s[i]] = 1\n\nm = max(d.values())\nl=[]\nfor i in d:\n if d[i] == m:\n l.append(i)\nfor i in sorted(l):\n print(i)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s100868606', 's445539636', 's923523144', 's620528894']
[9132.0, 9052.0, 8960.0, 38580.0]
[25.0, 25.0, 24.0, 453.0]
[220, 196, 169, 256]
p02773
u108898293
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import itertools,collections\na=int(input())\nl1=[str(input()) for n in range(0,a)]\nc = collections.Counter(l1)\naa=int(c.most_common()[0][1])\n#print(c.most_common(0))\n#print(aa)\na2 =[print(w)for w,r in c.most_common() if r==aa]\n', 'import itertools,collections\na=int(input())\nl1=[str(input()) for n in range(0,a)]\nc = collections.Counter(l1)\naa=int(c.most_common()[0][1])\n#print(c.most_common(0))\n#print(aa)\na2 =[w for w,r in c.most_common() if r==aa]\na2=list(sorted(a2))\na3=[print(w1) for w1 in a2]']
['Wrong Answer', 'Accepted']
['s405160315', 's687970959']
[47128.0, 45044.0]
[614.0, 834.0]
[226, 267]
p02773
u111473084
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\n\ndata = {}\nnames = []\nfor i in range(n):\n s = input()\n if s in names:\n data[s] += 1\n else:\n data[s] = 1\n names.append(s)\n\nmax_poll = 0\nwinner = []\nfor key, value in data.items():\n if max_poll < value:\n max_poll = value\n winner = [key]\n elif max_poll == value:\n winner.append(key)\n\nsorted(winner)\n#winner.reverse()\nfor i in winner:\n print(i)\n', 'n = int(input())\ndata = {}\nmax_poll = 1\n\nfor i in range(n):\n s = input()\n try:\n data[s] += 1\n except:\n data[s] = 1\n if max_poll < data[s]:\n max_poll = data[s]\n\nwinner = []\nfor key, value in data.items():\n if max_poll == value:\n winner.append(key)\n\nwinner.sort()\nfor i in winner:\n print(i)\n']
['Wrong Answer', 'Accepted']
['s594018564', 's767967098']
[5016.0, 32096.0]
[2111.0, 812.0]
[418, 335]
p02773
u111652094
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['\nfrom collections import Counter\n\n\nN = int(input())\nS = []\nfor i in range(N):\n S.append(input())\n\nC=Counter(S).most_common()\nL=len(C)\n\nprint(C[0][0])\n\nfor i in range(1,L):\n if C[0][1]==C[i][1]:\n print(C[i][0])', '\nfrom collections import Counter\n\n\nN = int(input())\nS = []\nfor i in range(N):\n S.append(input())\n\nC=Counter(S).most_common()\nL=len(C)\n\nD=[]\n\nD.append(C[0][0])\n\nfor i in range(1,L):\n if C[0][1]==C[i][1]:\n D.append(C[i][0])\nD.sort()\nM=len(D)\n\nfor i in range(M):\n print(D[i])']
['Wrong Answer', 'Accepted']
['s278761794', 's848249970']
[45032.0, 45040.0]
[559.0, 768.0]
[222, 288]
p02773
u112317104
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import defaultdict\n\ndef solve():\n N = int(input())\n d = defaultdict(int)\n for _ in range(N):\n a = input()\n d[a] += 1\n\n m = 0\n for k, v in d.items():\n m = max(m, v)\n \n l = []\n for k, v in d.items():\n if m == v:\n l.append(k)\n l.sort()\n for ans in l:\n print(ans)\n \nprint(solve())', 'from collections import defaultdict\nfrom operator import itemgetter\n\nN = int(input())\nA = [input() for _ in range(N)]\nd = defaultdict(int)\nfor a in A:\n d[a] += 1\n\nli = sorted(d.items())\nl = sorted(li, key = itemgetter(0), reverse=True)\nmax_key = l[0][0]\n\nfor k, v in li:\n if k == max_key:\n print(k)\n else:\n continue', 'from collections import defaultdict\n\ndef solve():\n N = int(input())\n d = defaultdict(int)\n m = 0\n for _ in range(N):\n a = input()\n d[a] += 1\n m = max(d[a], m)\n\n l = []\n for k, v in d.items():\n if m == v:\n l.append(k)\n l.sort()\n for ans in l:\n print(ans)\n \nsolve()']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s038465684', 's198648002', 's595531903']
[32480.0, 46696.0, 32488.0]
[725.0, 777.0, 780.0]
[372, 338, 336]
p02773
u113255362
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['Row = int(input())\ndictA= {}\na = ""\nmid = 0\nfor i in range (Row):\n a = input()\n dictA.setdefault(a,0) \n dictA[a] += 1\n mid = max(mid, dictA[a])\nsDict = sorted(dictA.items())\nprint(sDict)\nfor i in range(len(dictA)):\n if sDict[i][1]== mid:\n print(sDict[i][0])', 'Row = int(input())\ndictA= {}\na = ""\nmid = 0\nfor i in range (Row):\n a = input()\n dictA.setdefault(a,0) \n dictA[a] += 1\n mid = max(mid, dictA[a])\nsDict = sorted(dictA.items())\nfor i in range(len(dictA)):\n if sDict[i][1]== mid:\n print(sDict[i][0])']
['Wrong Answer', 'Accepted']
['s431624971', 's514791749']
[52288.0, 46692.0]
[760.0, 680.0]
[265, 252]
p02773
u114641312
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\n\nn = int(input())\nS = []\nfor _ in range(n):\n S.append(input()) \n\n\ncounter = Counter(S)\n\nmostnum = 0\nans = []\nfor c in counter.most_common():\n if mostnum < c[1]:\n mostnum = c[1]\n ans.append(c[0])\n else:\n break\n\nans.sort()\n\nfor a in ans:\n print(a)', 'from collections import Counter\n\nn = int(input())\nS = []\nfor _ in range(n):\n S.append(input()) \n\n\ncounter = Counter(S)\n\nmostnum = 0\nans = []\nfor c in counter.most_common():\n if mostnum <= c[1]:\n mostnum = c[1]\n ans.append(c[0])\n else:\n break\n\nans.sort()\n\nfor a in ans:\n print(a)']
['Wrong Answer', 'Accepted']
['s747439318', 's475987935']
[45040.0, 45040.0]
[415.0, 690.0]
[494, 495]
p02773
u116038906
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['\nN = int(input())\nword = [ input() for i in range(N) ]\n\n\nfrom collections import Counter\nkazu_word = Counter(word)\n\n\nkazu_word_a = max(kazu_word.values()) \nkazu_word_max =[i for i,v in kazu_word.items() if v == kazu_word_a )]\n\n\n\nprint("\\n".join(kazu_word_max.sort())) ', '\nN = int(input())\nword = [ input() for i in range(N) ]\n\n\nfrom collections import Counter\nkazu_word = Counter(word)\n\n\nkazu_word_a = max(kazu_word.values()) \nkazu_word_max =[i for i,v in kazu_word.items() if v == kazu_word_a ]\nkazu_word_max_sorted = sorted(kazu_word_max)\n\nprint(*kazu_word_max_sorted,sep="\\n")']
['Runtime Error', 'Accepted']
['s147511782', 's914098389']
[2940.0, 37516.0]
[17.0, 591.0]
[607, 530]
p02773
u116233709
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import collections\nn=int(input())\nli=[]\nfor i in range(n):\n s=str(input())\n li.append(s)\nli.sort(reverse=True)\nc=collections.Counter(li)\nx=len(c)\nans=[]\nfor i in range(x):\n if c.most_common(x)[i][1]==c.most_common(x)[0][1]:\n ans.append(c.most_common(x)[i][0])\n else:\n break\nfor j in range(len(ans)):\n print(ans[j])\n \n \n \n\n\n\n ', 'import collections\nn=int(input())\nli=[]\nfor i in range(n):\n s=str(input())\n li.append(s)\nli.sort(reverse=True)\nc=collections.Counter(li)\nprint(c.most_common()[0][0])\nfor i in range(1,n):\n if c.most_common()[i][1]==c.most_common()[0][1]:\n print(c.most_common()[i][0])\n else:\n break\n \n \n \n\n\n\n ', 'import collections\nn=int(input())\nli=[input() for _ in range(n)]\nc=collections.Counter(li)\nM=max(c.values())\nans=[]\nfor k,v in c.items():\n if v==M:\n ans.append(k)\nans.sort()\nfor i in range(len(ans)):\n print(ans[i])\n \n\n\n\n ']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s391923923', 's777083561', 's255959722']
[45084.0, 45076.0, 35564.0]
[2106.0, 2106.0, 660.0]
[368, 333, 236]
p02773
u117541450
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\n\n\nN=int(input())\nl=[\'\']*N\nfor i in range(N):\n l[i]=input()\n\nl.sort()\n\nprint(l)\nc=1\nc_crt=1\npre=""\nans=[]\nfor e in l+[""]:\n if e == pre:\n c_crt+=1\n else:\n if c_crt > c:\n ans=[pre]\n c=c_crt\n elif c_crt == c:\n ans.append(pre)\n c_crt=1\n pre=e\nfor e in ans:\n print(e)', 'from collections import Counter\n\nl=[]\nN=int(input())\nfor _ in range(N):\n l.append(input())\n\nc = Counter(l)\nprint(c)', 'from collections import Counter\n\n\nN=int(input())\nl=[\'\']*N\nfor i in range(N):\n l[i]=input()\n\nl.sort()\n\nc=1\nc_crt=1\npre=""\nans=[]\nfor e in l+[""]:\n if e == pre:\n c_crt+=1\n else:\n if c_crt > c:\n ans=[pre]\n c=c_crt\n elif c_crt == c:\n ans.append(pre)\n c_crt=1\n pre=e\nfor e in ans:\n print(e)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s761705156', 's936655293', 's931127503']
[25988.0, 58684.0, 21120.0]
[645.0, 512.0, 727.0]
[370, 118, 361]
p02773
u118760114
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\nn = int(input())\ndic = {}\nb = []\nfor i in range(n):\n a = input()\n b.append(a)\n if i in dic:\n dic[i] += 1\n else:\n dic[i] = 1\nM = max(dic.values())\nfor j, k in sorted(dic.items):\n if k == M:\n print(j)\n', '\nn = int(input())\ndic = {}\nb = []\nfor i in range(n):\n a = input()\n b.append(a)\n if i in dic:\n dic[i] += 1\n else:\n dic[i] = 1\nM = max(dic.values())\nfor j,k in sorted(dic.items()):\n if k == M:\n print(j)\n', 'from collections import Counter\nn = int(input())\ndic = {}\nb = []\nfor i in range(n):\n a = input()\n b.append(a)\n if i in dic:\n dic[i] += 1\n else:\n dic[i] = 1\n\nfor j, k in sorted(dic.items):\n if k == max(dic):\n print(j)\n', '\nn = int(input())\ndic = {}\nb = []\nfor i in range(n):\n a = input()\n b.append(a)\nfor o in b:\n if o in dic:\n dic[o] += 1\n else:\n dic[o] = 1\nM = max(dic.values())\nfor j,k in sorted(dic.items()):\n if k == M:\n print(j)\n']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s089386322', 's536355624', 's807355607', 's084546037']
[39428.0, 51496.0, 39436.0, 45712.0]
[338.0, 546.0, 330.0, 904.0]
[267, 237, 253, 249]
p02773
u121879791
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["from collections import Counter\nn=int(input())\nname=[input() for _ in range(n)]\n\ncnt=Counter(name)\nl=max(cnt.values())\nans=[s for s,c in cnt.items() if c==1]\nans.sort()\nprint('\\n'.join(ans))", "from collections import Counter\n \nn = int(input())\nsss = [input() for _ in range(n)]\ncnt = Counter(sss)\nl = max(cnt.values())\nans = [s for s, c in cnt.items() if c == l]\nans.sort()\nprint('\\n'.join(ans))"]
['Wrong Answer', 'Accepted']
['s428698716', 's984680039']
[35952.0, 35952.0]
[528.0, 520.0]
[190, 202]
p02773
u121891161
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\ns = []\nfor i in range(n):\n s.append(str(input()))\n\nd = {}\n\nfor item in s:\n if item in d.keys():\n d[item] += 1\n else:\n d[item] = 1\n\nstart = time.time()\nm = [k for k, v in d.items() if v == max(d.values())]\nm.sort()\nfor item in m:\n print(item)\n', 'from collections import Counter\nimport itertools\n\nn = int(input())\ns = []\nfor i in range(n):\n s.append(str(input()))\n\ncnt_words = Counter(s)\n\nmode_v = cnt_words.most_common()[0][-1]\nit = itertools.takewhile(\n lambda kv: kv[-1] == mode_v, cnt_words.most_common()\n)\nm = []\nfor i in it:\n m.append(i[0])\nm.sort()\nfor item in m:\n print(item)']
['Runtime Error', 'Accepted']
['s872659595', 's420408103']
[35220.0, 45032.0]
[418.0, 879.0]
[285, 348]
p02773
u123849536
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['#155c\nimport collections\nn = int(input())\ns = [input() for _ in range(n)]\n\nc = collections.Counter(s)\nret = []\ntmp = []\ncurrent_v = 0\n\nfor k, v in c.most_common():\n if current_v != v:\n current_v = v\n if tmp != []:\n ret.extend(sorted(tmp))\n break\n tmp.append(k)\n\nprint(ret)', '#155c\nimport collections\nn = int(input())\ns = [input() for _ in range(n)]\n\nc = collections.Counter(s)\nret = []\ntmp = []\nmax_v = max(c.values())\n\nfor k, v in c.most_common():\n if max_v == v:\n ret.append(k)\n else:\n break\n\nfor r in sorted(ret):\n print(r)']
['Wrong Answer', 'Accepted']
['s285104309', 's202551606']
[45040.0, 45040.0]
[405.0, 740.0]
[290, 260]
p02773
u129961029
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['a=int(input())\ns=[input()for _ in range(a)]\nc=Counter(s)\nm=0 \nm=max(m,v)\nans=[]\nfor k,v in c.items():\n if m == v:\n ans.append(k)\nans.sort()\nprint(ans)\n', 'import collections\na=int(input())\ns=[input()for _ in range(a)]\nc=collections.Counter(s)\nm=0 \nfor v in c.values(): \n m=max(m,v)\nans=[]\nfor k,v in c.items():\n if m == v:\n ans.append(k)\nans.sort()\nfor i in ans:\n print(i)\n']
['Runtime Error', 'Accepted']
['s639330143', 's028116896']
[17056.0, 35572.0]
[267.0, 656.0]
[161, 234]
p02773
u129978636
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n=int(input())\ns=sorted([input() for k in range(n)])\ns3 = sorted(list(set(s)))\nif(len(set(s))==len(s)):\n for u in range(len(s)):\n print(s[u])\n exit()\nelse:\n s1=s2 = [m for m in s3 if s.count(m)>1]\n i = (len(s)-len(s1))//len(s3) while(len(s2)!=0):\n s2 = [m for m in s3 if s.count(m)>i]\n if(len(s2)==0):\n break\n s1 = s2\n i+=1\nfor j in s1:\n print(j)', 'import collections\nn=int(input())\ns=[input() for k in range(n)]\nif(len(set(s))==len(s)):\n for u in range(len(s)):\n print(s[u])\n exit()\nelse:\n s1=[q for q in sorted(list(set(s))) if s.count(q) > 1]\nc=collections.Counter(s)\np=[] for i in s1:\n p.append(c[i])\nmax=max(p)\nprint(max)\nfor j, x in enumerate(p):\n if(x == max):\n print(s1[j])', 'n=int(input())\na={}\nfor _ in range(n):\n s=input()\n if(s in a):\n a[s]+=1\n else:\n a[s]=1\na=sorted(a.items(),key=lambda x:x[1],reverse=True)\nb=[]\nb.append(a[0][0])\nfor j in a[1:]:\n if(j[1]==a[0][1]):\n b.append(j[0])\n else:\n break\nfor t in sorted(b):\n print(t)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s798609439', 's941191112', 's812802900']
[2940.0, 2940.0, 43228.0]
[18.0, 18.0, 757.0]
[482, 458, 302]
p02773
u131411061
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["def main():\n N = int(input())\n S = [input() for _ in range(N)]#list()\n\n \n # S.append(input())\n \n\n\n# c = 0\n target = {}\n\n for word in S:\n if word in target:\n target[word] += 1\n else:\n target[word] = 1\n\n# c = S.count(i)\n# target[i] = c\n\n maximum = max(target.values())\n\n #for val in target.values():\n # if max < val:\n # max = val\n\n for key,val in target.items():\n if(val == maximum):\n print(key)\n\nif __name__ == '__main__':\n main()", "def main():\n N = int(input())\n S = [input() for _ in range(N)]#list()\n\n \n # S.append(input())\n \n\n\n# c = 0\n target = {}\n\n for word in S:\n if word in target:\n target[word] += 1\n else:\n target[word] = 1\n\n# c = S.count(i)\n# target[i] = c\n\n maximum = max(target.values())\n\n for key,val in sorted(target.items()):\n if(val == maximum):\n print(key)\n\nif __name__ == '__main__':\n main()"]
['Wrong Answer', 'Accepted']
['s211285124', 's079358243']
[35220.0, 45708.0]
[476.0, 777.0]
[657, 585]
p02773
u131638468
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n=int(input())\nbox={}\nfor i in range(n):\n vote=input()\n if not(vote in box):\n box[vote]=1\n else:\n box[vote]+=1\nm=0\nwin=[]\nfor num in box.values():\n if num > m:\n m=num\nfor name,num in box.items():\n if num==m:\n win.append(name)\nsorted(win)\nfor i in win:\n print(i)', 'n=int(input())\nbox={}\nfor i in range(n):\n vote=input()\n if not(vote in box):\n box[vote]=1\n else:\n box[vote]+=1\nm=0\nwin=[]\nfor num in box.values():\n if num > m:\n m=num\nfor name,num in box.items():\n if num==m:\n win.append(name)\nwin=sorted(win)\nfor i in win:\n print(i)']
['Wrong Answer', 'Accepted']
['s411918325', 's403877053']
[32984.0, 32988.0]
[656.0, 670.0]
[279, 283]
p02773
u134019875
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\nL = sorted(input() for _ in range(n))\ns = list(set(L))\nc = [0] * len(s)\nfor i in range(len(s)):\n c[i] = L.count(s[i])\nm = max(c)\nfor j in range(len(c)):\n if c[j] == m:\n print(s[j])', 'n = int(input())\nL = sorted(input() for _ in range(n))\ns = list(set(L))\nc = [0] * len(s)\nm = 0\nfor i in range(len(s)):\n c[i] = L.count(s[i])\n m = max(m, c[i])\nfor j in range(len(c)):\n if c[j] == m:\n print(s[j])\n', 'n = int(input())\nL = sorted(input() for _ in range(n))\ns = sorted(set(L))\nc = [0] * len(s)\nprev = 0\ncnt = 1\nl = 0\nfor i in range(len(L)):\n if L[i] == prev:\n cnt += 1\n else:\n c[l] = cnt\n l += 1\n cnt = 1\nm = max(c)\nfor j in range(len(c)):\n if c[j] == m:\n print(s[j])', 'n = int(input())\nd = {}\nfor _ in range(n):\n s = str(input())\n d[s] = 1 if s not in d else d[s] + 1\nM = max(d.values())\nL = [k for k, v in d.items() if v == M]\nL.sort()\nfor x in L:\n print(x)\n']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s347811235', 's496646596', 's784843145', 's457285133']
[29648.0, 29640.0, 29640.0, 35324.0]
[2105.0, 2105.0, 859.0, 457.0]
[210, 227, 308, 199]
p02773
u135265051
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import math\nimport statistics\nimport collections\na=int(input())\n#b,c=int(input()),int(input())\n# c=[]\n\n# c.append(i)\n#e1,e2 = map(int,input().split())\n# f = list(map(int,input().split()))\ng = [input() for _ in range(a)]\n# h = []\n\n# h.append(list(map(int,input().split())))\n\ng.sort()\n\nma=0\ncount=1\n\nfor i in range(a-1):\n if g[i]==g[i+1]:\n count+=1\n else:\n ma=max(ma,count)\n count=1\n\nma=max(ma,count)\nprint(ma)\ncount=1\nans=[]\n\nfor i in range(a-1):\n if g[i]==g[i+1]:\n count+=1\n else:\n if count==ma:\n ans.append(g[i])\n count=1\nif count==ma:\n ans.append(g[-1])\n\nfor i in ans:\n print(i)\n', 'import math\nimport statistics\nimport collections\na=int(input())\n#b,c=int(input()),int(input())\n# c=[]\n\n# c.append(i)\n#e1,e2 = map(int,input().split())\n# f = list(map(int,input().split()))\ng = [input() for _ in range(a)]\n# h = []\n\n# h.append(list(map(int,input().split())))\n\ng.sort()\n\nma=0\ncount=1\n\nfor i in range(a-1):\n if g[i]==g[i+1]:\n count+=1\n else:\n ma=max(ma,count)\n count=1\n\nma=max(ma,count)\ncount=1\nans=[]\n\nfor i in range(a-1):\n if g[i]==g[i+1]:\n count+=1\n else:\n if count==ma:\n ans.append(g[i])\n count=1\nif count==ma:\n ans.append(g[-1])\n\nfor i in ans:\n print(i)\n']
['Wrong Answer', 'Accepted']
['s485460008', 's294323196']
[26972.0, 26988.0]
[523.0, 502.0]
[733, 723]
p02773
u137226361
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["n = int(input())\n\ndic = {}\nfor _ in range(n):\n\n s =input()\n if s in dic:\n dic[s] += 1\n else:\n dic[s]=1\n\nmaxdic = max(dic.values())\n\nans = [i for i in dic if dic[i]==maxdic]\nprint('\\n'.join(ans))", "n = int(input())\n\ndic = {}\nfor _ in range(n):\n\n s =input()\n if s in dic:\n dic[s] += 1\n else:\n dic[s]=1\n\nmaxdic = max(dic.values())\n\nans = [i for i in dic if dic[i]==maxdic]\nprint('\\n'.join(sorted(ans)))"]
['Wrong Answer', 'Accepted']
['s030038848', 's894334384']
[36668.0, 36712.0]
[318.0, 368.0]
[217, 225]
p02773
u141410514
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\ns = []\nfor _ in range(n):\n s.append(input())\nd = {}\nname = set(s)\nfor a in name:\n d.update({a:0})\nfor x in s:\n d[x] += 1\nds = sorted(d.items(), key=lambda x:x[1])\nmax = ds[-1][1]\nans = []\nprint(max)\nfor x in reversed(ds):\n print(x[1])\n if x[1]==max:\n ans.append(x[0])\n else:\n break\nans.sort()\nfor x in ans:\n print(x)', 'n = int(input())\ns = []\nfor _ in range(n):\n s.append(input())\nd = {}\nname = set(s)\nfor a in name:\n d.update({a:0})\nfor x in s:\n d[x] += 1\nds = sorted(d.items(), key=lambda x:x[1])\nmax = ds[-1][1]\nans = []\nfor x in reversed(ds):\n if x[1]==max:\n ans.append(x[0])\n else:\n break\nans.sort()\nfor x in ans:\n print(x)']
['Wrong Answer', 'Accepted']
['s234965151', 's546423321']
[58124.0, 57740.0]
[927.0, 843.0]
[368, 341]
p02773
u142223843
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\nl=[]\nfor i in range(n):\n l.append(input())\nfrom collections import Counter\nS=Counter(l)\n\nfor letter, count in sorted(S.most_common()):\n print(letter)\n\n', 'n = int(input())\nl=[]\nfor i in range(n):\n l.append(input())\nfrom collections import Counter\nS=Counter(l)\n\nmn = max(S.values())\nfor letter, count in sorted(S.most_common()):\n if(count==mn):\n print(letter)\n']
['Wrong Answer', 'Accepted']
['s712397445', 's714642876']
[47668.0, 47660.0]
[875.0, 1070.0]
[252, 295]
p02773
u148856702
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = input()\nn = int(n)\n# strs= input().split()\nhashs = {}\n\nfor i in range(n):\n s = input()\n if s not in hashs.keys():\n hashs[s] = 1\n else:\n hashs[s] += 1\n\nmaxs = 0\nfor key, value in hashs.items():\n maxs = max(maxs, value)\n\nfor key, value in hashs.items():\n if value == maxs:\n print(key)', 'n = input()\nn = int(n)\n# strs= input().split()\nhashs = {}\n\nfor i in range(n):\n s = input()\n if s not in hashs.keys():\n hashs[s] = 1\n else:\n hashs[s] += 1\n\nmaxs = 0\nfor key, value in hashs.items():\n maxs = max(maxs, value)\n\nfor key, value in hashs.items():\n if value == maxs:\n print(key)', 'n = input()\nn = int(n)\n# strs= input().split()\nhashs = {}\n\nfor i in range(n):\n s = input()\n if s not in hashs.keys():\n hashs[s] = 1\n else:\n hashs[s] += 1\n\nmaxs = 0\nfor key, value in hashs.items():\n maxs = max(maxs, value)\n\nres = []\nfor key, value in hashs.items():\n if value == maxs:\n res.append(key)\nres.sort()\nfor m in range(len(res)):\n print(res[m])']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s437540132', 's486707169', 's425822650']
[32096.0, 32096.0, 32096.0]
[560.0, 594.0, 803.0]
[370, 370, 439]
p02773
u152554456
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\nnum_list = []\nfor i in range(n):\n num_list.append(input())\n\nfrom collections import Counter\nchecked = Counter(num_list)\nbefore_count = 0\ncheck_count = 0\n\nfor keyword, count in sorted(checked.items(), key=lambda x: -x[1]):\n # print(keyword, count)\n if check_count == 0:\n check_count += 1\n print(keyword)\n before_count = count\n else:\n if count != before_count:\n exit()\n else:\n check_count += 1\n print(keyword)\n before_count = count\n', 'n = int(input())\nnum_list = []\nfor i in range(n):\n num_list.append(input())\n\nfrom collections import Counter\nchecked = Counter(num_list)\nbefore_count = 0\ncheck_count = 0\nresult = []\nfor keyword, count in sorted(checked.items(), key=lambda x: -x[1]):\n if check_count == 0:\n check_count += 1\n result.append(keyword)\n before_count = count\n else:\n if count != before_count:\n break\n else:\n check_count += 1\n result.append(keyword)\n before_count = count\n\nfor st in sorted(result):\n print(st)']
['Wrong Answer', 'Accepted']
['s904942375', 's629929934']
[46844.0, 46476.0]
[576.0, 769.0]
[539, 577]
p02773
u153968927
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = input()\nN = int(N)\nS = {}\nfor n in range(N):\n word = input()\n if word in S.keys():\n S[word] += 1\n else:\n S[word] = 1\nmax_value = max(S.values())\nfor word in S.keys():\n if S[word] == max_value:\n print(word)\n', 'N = input()\nN = int(N)\nS = {}\nfor n in range(N):\n word = input()\n if word in S.keys():\n S[word] += 1\n else:\n S[word] = 1\nmax_value = max(S.values())\nkeys = sorted(list(S.keys()))\nfor word in keys:\n if S[word] == max_value:\n print(word)\n']
['Wrong Answer', 'Accepted']
['s445449590', 's565337353']
[32096.0, 32988.0]
[493.0, 698.0]
[223, 249]
p02773
u154473588
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['# input1 = list(map(int, (input().split())))\n# input2 = list(map(int, (input().split())))\nN = int(input())\ninput2 = []\nfor i in range(N):\n input2.append(input())\n\njisyo = {}\n\nfor a in input2:\n if a not in jisyo:\n jisyo[a] = 1\n else:\n jisyo[a] += 1\n\nresult = sorted(jisyo.items(), key=lambda x: x[1], reverse=True)\n\nm = 10000000000000000\n\nfor r in result:\n print(r[0])\n if r[1] < m:\n m = r[1]\n exit(0)\n', '# input1 = list(map(int, (input().split())))\n# input2 = list(map(int, (input().split())))\nN = int(input())\ninput2 = []\nfor i in range(N):\n input2.append(input())\n\njisyo = {}\n\nfor a in input2:\n if a not in jisyo:\n jisyo[a] = 1\n else:\n jisyo[a] += 1\n\nresult = sorted(jisyo.items(), key=lambda x: x[1], reverse=True)\n\nm = result[0][1]\nfor r in result:\n if m != r[1]:\n exit(0)\n print(r[0])\n', '# input1 = list(map(int, (input().split())))\n# input2 = list(map(int, (input().split())))\nN = int(input())\ninput2 = []\nfor i in range(N):\n input2.append(input())\n\njisyo = {}\n\nfor a in input2:\n if a not in jisyo:\n jisyo[a] = 1\n else:\n jisyo[a] += 1\n\nresult = sorted(jisyo.items(), key=lambda x: x[1], reverse=True)\n\nm = result[0][1]\nliststr = []\nfor r in result:\n if m != r[1]:\n break\n liststr.append(r[0])\n\nliststr.sort()\n\nfor a in liststr:\n print(a)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s358357650', 's548034812', 's960749295']
[44744.0, 46536.0, 47248.0]
[415.0, 528.0, 743.0]
[440, 422, 490]
p02773
u156815136
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["#from statistics import median\n#import collections\n#aa = collections.Counter(a) # list to list\n#from itertools import combinations # (string,3) 3回\n#\n#\n\n#\n#\n\nmod = 10**9 + 7\n\ndef readInts():\n return list(map(int,input().split()))\ndef main():\n n = int(input())\n dic = {}\n for i in range(n):\n s = input()\n if s in dic:\n dic[s] += 1\n else:\n dic[s] = 1\n max_ = max(dic.values())\n for k,v in dic.items():\n if v == max_:\n print(k)\nif __name__ == '__main__':\n main()\n", "#from statistics import median\n#import collections\n#aa = collections.Counter(a) # list to list\n#from itertools import combinations # (string,3) 3回\n#\n#\n\n#\n#\n\nmod = 10**9 + 7\n\ndef readInts():\n return list(map(int,input().split()))\ndef main():\n n = int(input())\n dic = {}\n for i in range(n):\n s = input()\n if s in dic:\n dic[s] += 1\n else:\n dic[s] = 1\n max_ = max(dic.values())\n L = []\n for k,v in dic.items():\n if v == max_:\n L.append(k)\n L = sorted(L)\n print(*L,sep='\\n')\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Accepted']
['s870823523', 's310985196']
[32096.0, 34012.0]
[482.0, 587.0]
[611, 666]
p02773
u160359809
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['dic={}\nmax1=0\nans=[]\nn=int(input())\nfor i in range(n):\n word=input()\n if word in dic:\n dic[word]+=1\n else:\n dic[word]=1\n\nfor k in dic.values():\n if k>max1:\n max1=k\nprint(max1)\n\nfor n,b in dic.items():\n print(n,b)\n if b==max1:\n ans.append(n)\nsorted(ans)\n\nfor i in ans:\n print(i)', 'dic={}\nmax1=0\nans=[]\nn=int(input())\nfor i in range(n):\n word=input()\n if word in dic:\n dic[word]+=1\n else:\n dic[word]=1\n\nfor k in dic.values():\n if k>max1:\n max1=k\nprint(max1)\n\nfor n,b in dic.items():\n print(n,b)\n if b==max1:\n ans.append(n)\nprint(ans)\n', 'dic={}\nmax1=0\nans=[]\nn=int(input())\nfor i in range(n):\n word=input()\n if word in dic:\n dic[word]+=1\n else:\n dic[word]=1\n\nfor k in dic.values():\n if k>max1:\n max1=k\nprint(max1)\n\nfor n,b in dic.items():\n print(n,b)\n if b==max1:\n ans.append(n)\nprint(sorted(ans))\n', 'dic={}\nmax1=0\nans=[]\nn=int(input())\nfor i in range(n):\n word=input()\n if word in dic:\n dic[word]+=1\n else:\n dic[word]=1\n\nfor k in dic.values():\n if k>max1:\n max1=k\n\nfor n,b in dic.items():\n if b==max1:\n ans.append(n)\n\n\nfor i in sorted(ans):\n print(i)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s294465948', 's876372182', 's966089484', 's037888538']
[35412.0, 40668.0, 42204.0, 32988.0]
[889.0, 640.0, 773.0, 634.0]
[326, 298, 306, 296]
p02773
u161712560
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = int(input())\n\nstrList = list([])\n\nfor i in range(N):\n strList.append(str(input()))\n\nstrDict = {}\n\nfor item in strList:\n if item not in strDict.keys():\n strDict[item] = 1\n else:\n strDict[item] += 1\n\nmaxList = list([])\n\nfor strKeys in strDict.keys():\n if strDict[strKeys] == max(strDict.values()):\n maxList.append(strKeys)\n\nprint(sorted(maxList))', 'N = input()\n\nstrList = list([])\n\nfor i in range(N):\n strList.append(str(input()))\n\nstrDict = {}\n\nfor item in strList:\n if item not in strDict.keys():\n strDict[item] = 1\n else:\n strDict[item] += 1\n\nmaxList = list([])\n\nfor strKeys in strDict.keys():\n if strDict[strKeys] == max(strDict.items()):\n maxList.append(strKeys)\n\nprint(maxList.sort())', 'N = int(input())\n\nstrList = list([])\n\nfor i in range(N):\n strList.append(str(input()))\n\nstrDict = {}\n\nfor item in strList:\n if item not in strDict.keys():\n strDict[item] = 1\n else:\n strDict[item] += 1\n\nmaxList = list([])\nmaxNum = max(strDict.values())\n\nfor strKeys in strDict.keys():\n if strDict[strKeys] == maxNum:\n maxList.append(strKeys)\n\nfor srtedItem in sorted(maxList):\n print(srtedItem)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s437959729', 's466079344', 's147562826']
[35220.0, 3064.0, 35220.0]
[2105.0, 19.0, 861.0]
[361, 354, 407]
p02773
u163421511
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\nw = {}\nfor _ in range(n):\n w[i] = w.get(input(), 0) + 1\nans = sorted(i for i, j in w.items() if j == max(w.values()))\nfor i in ans:\n print(i)\n', 'n = int(input())\nw = {}\nfor _ in range(n):\n \ts = input()\n w[s] = w.get(s, 0) + 1\nans = sorted(i for i, j in w.items() if j == max(w.values()))\nfor i in ans:\n print(i)\n', 'n = int(input())\ns = list(input() for _ in range(n))\ns.sort()\nnow = s[0]\nans = [s[0],]\ncnt = 0\nm_cnt = 0\n\nfor i in range(n):\n word = s[i]\n if word == now:\n cnt +=1\n if cnt > m_cnt:\n ans = [word,]\n m_cnt = cnt\n elif cnt == m_cnt:\n ans.append(word)\n else:\n cnt = 1\n now = word\n if cnt > m_cnt:\n ans = [word,]\n m_cnt = cnt\n elif cnt == m_cnt:\n ans.append(word)\n\nfor k in sorted(ans):\n print(k)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s005172114', 's134355615', 's546126229']
[9152.0, 8952.0, 26932.0]
[27.0, 26.0, 434.0]
[165, 174, 518]
p02773
u164031709
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n=int(input())\npoll={}\nm=0\nfor v in range(n):\n s=input()\n if s in poll:\n poll[s]+=1\n if poll[s]>m:\n m=poll[s]\n else:\n poll[s]=0\nfor s in poll:\n if poll[s]==m:\n print(s)\n \n', 'n=int(input())\npoll={}\nm=0\nrtn=[]\nfor v in range(n):\n s=input()\n if s in poll:\n poll[s]+=1\n if poll[s]>m:\n m=poll[s]\n else:\n poll[s]=0\nfor s in poll:\n if poll[s]==m:\n rtn.append(s)\nrtn.sort()\nfor x in rtn:\n print(x)\n \n \n']
['Wrong Answer', 'Accepted']
['s379856391', 's692611597']
[32096.0, 32096.0]
[444.0, 665.0]
[225, 284]
p02773
u166340293
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N=int(input())\ns=[input() for i in range (N)]\n\nfor q in range N:\n for i in range N-1:\n if s[i]>s[i+1]:\n s0=s[i]\n s[i]=s[i+1]\n s[i+1]=s0\n\ncount=1\nmaximum=0\n\nfor j in range N-1:\n if s[j]=s[j+1]:\n count+=1\n else:\n if count>maximum:\n a=[]\n a.append(s[j])\n maximum=count\n number=1\n elif count=maximum:\n a.append(s[j])\n number+=1\n count=0\n \nfor p in range number:\n print(a[p])', 'N=int(input())\ns=[input() for i in range (N)]\n\nfor q in range N:\n for i in range N-1:\n if s[i]>s[i+1]:\n s0=s[i]\n s[i]=s[i+1]\n s[i+1]=s0\n\ncount=1\nmaximum=0\n\nfor j in range N-1:\n if s[j]=s[j+1]:\n count+=1\n else:\n if count>maximum:\n a=[]\n a.append(s[j])\n maximum=count\n number=1\n elif count=maximum:\n a.append(s[j])\n number+=1\n count=0\n \nfor p in range number:\n print(a[p])', 'N=int(input())\ns=[input() for i in range (N)]\n\ns.sort()\ncount=1\nmaximum=0\n\nfor j in range (N-1):\n if s[j]==s[j+1]:\n count+=1\n if j==N-2:\n if count>maximum:\n a=[]\n a.clear()\n a.append(s[j])\n maximum=count\n number=1\n elif count==maximum:\n a.append(s[j])\n number+=1\n else:\n if count>maximum:\n a=[]\n a.clear()\n a.append(s[j])\n maximum=count\n number=1\n elif count==maximum:\n a.append(s[j])\n number+=1\n count=1 \n if maximum==1 and j==N-2:\n a.append(s[N-1])\n number+=1\nfor p in range (number):\n print(a[p])']
['Runtime Error', 'Runtime Error', 'Accepted']
['s723930776', 's884670977', 's481271188']
[2940.0, 2940.0, 20680.0]
[17.0, 19.0, 669.0]
[437, 437, 620]
p02773
u166621202
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import collections\nN = int(input())\nS = [str(input()) for _ in range(N)]\n\nc = collections.Counter(sorted(S))\nkeys = [k for k, v in c.items() if v == c.most_common()[0][1]]\nprint(*keys)\n', 'N = int(input())\nS = {}\nfor i in range(N):\n tmp = input()\n if tmp in S:\n S[tmp] += 1\n else:\n S[tmp] = 1\n\nmost_com = max(S.values())\nkeys = [k for k,v in S.items() if v == most_com]\nkeys.sort()\n\nfor i in range(len(keys)):\n print(keys[i])\n']
['Wrong Answer', 'Accepted']
['s837158005', 's669461847']
[45064.0, 32096.0]
[2106.0, 680.0]
[185, 263]
p02773
u166807268
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import OrderedDict\nN = int(input())\nans = dict()\nfor _ in range(N):\n k = str(input())\n if k in ans:\n ans[k]+=1\n else:\n ans.update({k:1})\ngroupedByValue = defaultdict(list)\nfor key, value in sorted(ans.items()):\n groupedByValue[value].append(key)\nl = groupedByValue[max(groupedByValue)]\nfor i in l:\n print(i)', 'from collections import defaultdict\nfrom collections import OrderedDict\nN = int(input())\nans = dict()\nfor _ in range(N):\n k = str(input())\n if k in ans:\n ans[k]+=1\n else:\n ans.update({k:1})\ngroupedByValue = defaultdict(list)\nfor key, value in sorted(ans.items()):\n groupedByValue[value].append(key)\nl = groupedByValue[max(groupedByValue)]\nfor i in l:\n print(i)']
['Runtime Error', 'Accepted']
['s410771041', 's796184717']
[32480.0, 45268.0]
[473.0, 1013.0]
[353, 389]
p02773
u168333670
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = int(input())\n\ndicts = {}\n\nfor _ in range(N):\n S = input()\n if S in dicts:\n dicts[S] += 1\n else:\n dicts[S] = 1\n\ndicts = sorted(dicts.items(), key=lambda x:x[1])\nmax_list = []\n\nbuf = dicts[1][1]\nfor k, v in dicts:\n if v == buf:\n max_list.append(k)\n else:\n break\n\nfor k in max_list:\n print(k)', 'N = int(input())\n\ndicts = {}\n\nfor _ in range(N):\n S = input()\n if S in dicts:\n dicts[S] += 1\n else:\n dicts[S] = 1\n\nmax_list = [kv[0] for kv in d.items() if kv[1] == max(dicts.values())]\n\nprint(sorted(max_list))', 'N = int(input())\n\ndicts = {}\n\nfor _ in range(N):\n S = input()\n if S in dicts:\n dicts[S] += 1\n else:\n dicts[S] = 1\n\ndicts = sorted(dicts.items(), key=lambda x:x[1], reverse=True)\nmax_list = []\n\nbuf = dicts[0][1]\nfor k, v in dicts:\n if v == buf:\n max_list.append(k)\n else:\n break\n\nfor k in sorted(max_list):\n print(k)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s877929109', 's962675188', 's084283555']
[43228.0, 32092.0, 43224.0]
[633.0, 363.0, 769.0]
[339, 233, 361]
p02773
u171132311
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['def main():\n n = int(input())\n words = {}\n for _ in range(n):\n a = input()\n if a in words:\n words[a] += 1\n else:\n words[a] = 1\n results = [kv[0] for kv in words.items() if kv[1] == max(words.values())]\n results.sort()\n print(\' \'.join(map(str, results)))\n\n\nif __name__ == "__main__":\n main()\n', 'import sys\ninput = sys.stdin.readline\n\n\ndef main():\n n = int(input())\n words = {}\n for _ in range(n):\n a = input()\n if a in words:\n words[a] += 1\n else:\n words[a] = 1\n results = [kv[0] for kv in words.items() if kv[1] == max(words.values())]\n results.sort()\n print(\' \'.join(map(str, results)))\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n n = int(input())\n words = {}\n for _ in range(n):\n a = input()\n if a in words:\n words[a] += 1\n else:\n words[a] = 1\n results = [key\n for key in words.keys() if words[key] == max(words.values())]\n results.sort()\n print(\' \'.join(map(str, results)))\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n n = int(input())\n words = {}\n for _ in range(n):\n a = input()\n if a in words:\n words[a] += 1\n else:\n words[a] = 1\n\n max_val = max(words.values())\n \n for key, value in sorted(words):\n if value != max_val:\n continue\n else:\n print(key)\n \n # print(\'{}:{}\'.format(key, value))\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n n = int(input())\n words = []\n for _ in range(n):\n words.append(input())\n words_set = set(words)\n pairs = {}\n for i in words_set:\n pairs[i] = words.count(i)\n results = [kv[0] for kv in pairs.items() if kv[1] == max(pairs.values())]\n results.sort()\n print(\' \'.join(map(str, results)))\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n n = int(input())\n words = {}\n for _ in range(n):\n a = input()\n if a in words:\n words[a] += 1\n else:\n words[a] = 1\n\n max_val = max(words.values())\n \n for key, value in sorted(words.items()):\n if value != max_val:\n continue\n else:\n print(key)\n \n # print(\'{}:{}\'.format(key, value))\n\n\nif __name__ == "__main__":\n main()\n']
['Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s208116906', 's774861405', 's815227796', 's861205933', 's878459357', 's906949215']
[32096.0, 32348.0, 32096.0, 32096.0, 29076.0, 44124.0]
[2104.0, 2104.0, 2108.0, 487.0, 2105.0, 769.0]
[355, 395, 373, 539, 377, 547]
p02773
u173148629
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\nN=int(input())\nS=[input() for _ in range(N)]\n\nC=Counter(S)\nA=[]\nB=[]\n\nfor i,j in C.most_common():\n A.append(i)\n B.append(j)\nfor k in range(len(A)):\n if B[k]==B[0]:\n print(A[k])\n', 'from collections import Counter\nN=int(input())\nS=[input() for _ in range(N)]\n\nC=Counter(S)\nA=[]\nB=[]\n\nfor i,j in C.most_common():\n A.append(i)\n B.append(j)\nfor k in range(len(A)):\n if B[k]=B[0]:\n print(A[k])\n', 'from collections import Counter\nN=int(input())\nS=[input() for _ in range(N)]\n\nC=Counter(S)\nA=[]\nB=[]\nT=[]\n\nfor i,j in C.most_common():\n A.append(i)\n B.append(j)\nfor k in range(len(A)):\n if B[k]==B[0]:\n T.append(A[k])\nT=sorted(T)\nfor m in range(len(T)):\n print(T[m])\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s656602219', 's834015337', 's517068282']
[49000.0, 3064.0, 49264.0]
[680.0, 18.0, 844.0]
[225, 224, 283]
p02773
u175590965
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input()\ns = {}\nfor i in range(n):\n si = input()\n if si in s:\n s[si] +=1\n else:\n s[si] = 0\nl = max(s.values())\nans = []\nfor i in s:\n if s[i] == l:\n ans.append(i)\nans.sort()\nfor i in ans:\n print(i)', 'n = int(input()\ns = dict()\nfor i in range(n):\n si = input()\n if si in s:\n s[si] +=1\n else:\n s[si] = 0\nl = max(s.values())\nans = []\nfor i in s:\n if s[i] == l:\n ans.append(i)\nans.sort()\nfor i in ans:\n print(i)', 'n = int(input()\ns = dict()\nfor i in range(n):\n si = input()\n if si in s:\n s[si] +=1\n else:\n s[si] = 0\nl = max(s.values())\nans = []\nfor i in s:\n if s[i] == 1:\n ans.append(i)\nans.sort()\nfor i in ans:\n print(i)', 'n = int(input())\ns = dict()\nfor i in range(n):\n si = input()\n if si in s:\n s[si] +=1\n else:\n s[si] = 0\nl = max(s.values())\nans = []\nfor i in s:\n if s[i] ==l:\n ans.append(i)\nans.sort()\nfor i in ans:\n print(i)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s024804844', 's070944424', 's585004669', 's281682447']
[9008.0, 9008.0, 9004.0, 35288.0]
[27.0, 29.0, 26.0, 463.0]
[239, 243, 243, 243]
p02773
u177125607
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\nd = {}\nfor i in range(n):\n S = input()\n d[S] = d[S]+1 if S in d else 1\nL = sorted(d.items(), key=lambda x: x[1], reverse=True)\nfor l in L:\n if l[1] == L[0][1]:\n print(l[0])', "n = int(input())\nd = {}\nfor i in range(n):\n S = input()\n d[S] = d[S]+1 if S in d else 1\nL = sorted(d.items(), key=lambda x: x[1], reverse=True)\nprint(*sorted([l[0] for l in L if l[1] == L[0][1]]), sep='\\n')"]
['Wrong Answer', 'Accepted']
['s017080553', 's678083522']
[47428.0, 49936.0]
[390.0, 474.0]
[205, 212]
p02773
u178304274
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['#C-Poll\nimport collections\nn=int(input())\nwords = [input() for _ in range(n)]\ncount = collections.Counter(words)\nleng = len(count)\nFlg = True\nansallay = []\nfor num in range(n-1)\n \n if(leng == 1):\n ansallay.append(count.most_common()[num][0])\n break\n ansallay.append(count.most_common()[num][0])\n if(count.most_common()[0][1] != count.most_common()[num+1][1]):\n break\n num += 1\n if(num == leng-1):\n if(count.most_common()[0][1] == count.most_common()[num][1]):\n ansallay.append(count.most_common()[num][0])\n break\nansallay.sort()\nfor word in ansallay:\n print(word)', '#C-Poll\nimport collections\nn=int(input())\nnum=0\nwords = [input() for _ in range(n)]\ncount = collections.Counter(words)\nFlg = True\nansallay = []\nwhile Flg:\n \n if(count.most_common()[0][1] == count.most_common()[0][-1]):\n ansallay.append(count.most_common()[num][0])\n break\n ansallay.append(count.most_common()[num][0])\n if(count.most_common()[0][1] != count.most_common()[num+1][1]):\n Flg = False\n break\n num += 1\n if(num == n-1):\n if(count.most_common()[0][1] == count.most_common()[num][1]):\n ansallay.append(count.most_common()[num][0])\n break\nansallay.sort()\nfor word in ansallay:\n print(word)', '#C-Poll\nimport collections\nn=int(input())\nwords = [input() for _ in range(n)]\ncount = collections.Counter(words)\nleng = len(count)\nFlg = True\nansallay = []\nfor num in range(n-1):\n \n if(leng == 1):\n ansallay.append(count.most_common()[num][0])\n break\n ansallay.append(count.most_common()[num][0])\n if(count.most_common()[0][1] != count.most_common()[num+1][1]):\n break\n num += 1\n if(num == leng-1):\n if(count.most_common()[0][1] == count.most_common()[num][1]):\n ansallay.append(count.most_common()[num][0])\n break\nfor word in ansallay:\n print(word)', '#C-Poll\nimport collections\nn=int(input())\nwords = [input() for _ in range(n)]\ncount = collections.Counter(words)\nleng = len(count)\nansallay = []\n\nrecord = count.most_common()[0][1]\nms=count.most_common()\nfor num in range(leng):\n if(ms[num][1] == record):\n ansallay.append(ms[num][0])\n else:\n break\nansallay.sort()\nfor word in ansallay:\n print(word)\n\n']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s052165521', 's461963378', 's793473850', 's253794427']
[2940.0, 45040.0, 45184.0, 47636.0]
[17.0, 597.0, 2107.0, 757.0]
[700, 719, 685, 443]
p02773
u183976155
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = int(input())\nS = [input() for i in range(N)]\nimport collections\ns = collections.Counter(S)\nM = max(s.values())\ns = [e for e in s if s[e] == M]\nfor e in s:\n print(e)', 'N = int(input())\nS = [input() for i in range(N)]\nimport collections\ns = collections.Counter(S)\nM = max(s.values())\ns = [e for e in s if s[e] == M]\nt = sorted(s)\nfor e in t:\n print(e)']
['Wrong Answer', 'Accepted']
['s575642472', 's751409969']
[35472.0, 35472.0]
[506.0, 635.0]
[171, 185]
p02773
u185405877
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n=int(input())\nl={}\nans=[]\nfor i in range(n):\n s=input()\n if s in l:\n l[s]+=1\n else:\n l.setdefault(s,1)\nmax_l=max(l.values)\n\nfor i in l.keys():\n if l[i]==max_l:\n ans.append(i)\n \nans.sort()\n \nfor j in ans:\n print(j)', 'n=int(input())\nl={}\nans=[]\nfor i in range(n):\n s=input()\n if s in l:\n l[s]+=1\n else:\n l.setdefault(s,1)\nmax_l=max(l.values())\n\nfor i in l.keys():\n if l[i]==max_l:\n ans.append(i)\n \nans.sort()\n \nfor j in ans:\n print(j)']
['Runtime Error', 'Accepted']
['s020551033', 's089099661']
[32096.0, 32096.0]
[366.0, 695.0]
[245, 247]
p02773
u188305619
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import collections\nN = int(input())\nS = {}\nfor i in range(N):\n value = input()\n if value not in S:\n S[value] = 1\n else:\n S[value] += 1\nS_largest = max(S.values())\nS_sorted = sorted(S.items(),reverse=True)\nprint(S_sorted)\nans = []\nfor i in range(len(S_sorted)):\n if S_sorted[i][1] == S_largest:\n ans.append(S_sorted[i][0])\n else:\n break\nans_sorted = sorted(ans)\nfor a in ans_sorted:\n print(a)\n', 'import collections\nN = int(input())\nS = {}\nfor i in range(N):\n value = input()\n if value in S:\n S[value] += 1\n else:\n S[value] = 1\nS_sorted = sorted(S)\nfor ans in S_sorted:\n print(ans)\n', 'import collections\nN = int(input())\nS = {}\nfor i in range(N):\n value = input()\n if value not in S:\n S[value] = 1\n else:\n S[value] += 1\nS_largest = max(S.values())\nS_sorted = sorted(S.items(),reverse=True)\nans = []\nfor i in range(len(S_sorted)):\n if S_sorted[i][1] == S_largest:\n ans.append(S_sorted[i][0])\n else:\n break\nans_sorted = sorted(ans)\nfor a in ans_sorted:\n print(a)\n', 'import collections\nN = int(input())\nS = {}\nfor i in range(N):\n value = input()\n if value not in S:\n S[value] = 1\n else:\n S[value] += 1\nS_largest = max(S.values())\nS_sorted = sorted(S.items(), key=lambda x:x[1], reverse=True)\nans = []\nfor i in range(len(S_sorted)):\n if S_sorted[i][1] == S_largest:\n ans.append(S_sorted[i][0])\n else:\n break\nans_sorted = sorted(ans)\nfor a in ans_sorted:\n print(a)\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s034381717', 's266034712', 's637899285', 's422033262']
[52796.0, 35576.0, 49556.0, 50228.0]
[727.0, 420.0, 684.0, 511.0]
[438, 211, 422, 442]
p02773
u188745744
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import collections\nN = int(input())\nlistA = []\nfor i in range(N):\n listA.append(input())\nc = collections.Counter(listA)\nc = c.most_common()\nmax_number = c[0][1]\nprint(c[0][0])\nA = len(c)\nfor i in range(1,A):\n if max_number == c[i][1]:\n print(c[i][0])\n else:\n exit()', 'import collections\nN = int(input())\nlistA = []\nfor i in range(N):\n listA.append(input())\nc = collections.Counter(listA)\nc = c.most_common()\nmax_number = c[0][1]\nprint(c[0][0])\nfor i in range(1,N+1):\n if max_number == c[i][1]:\n print(c[i][0])\n else:\n exit()', 'import collections\nN = int(input())\nlistA = []\nlistB = []\nfor i in range(N):\n listA.append(input())\nc = collections.Counter(listA)\nc = c.most_common()\nmax_number = c[0][1]\nlistB.append(c[0][0])\nA = len(c)\nfor i in range(1,A):\n if max_number == c[i][1]:\n listB.append(str(c[i][0]))\n else:\n break\nlistB.sort()\nfor i in listB:\n print(i)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s350358254', 's939068415', 's804875926']
[45036.0, 45120.0, 45044.0]
[559.0, 565.0, 820.0]
[288, 279, 359]
p02773
u189188797
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n=int(input())\ns=[]\nansl=[]\nfor i in range(n):\n s.append(input())\ncounter = Counter(s)\nmax=counter.most_common(1)[0][1]\nfor w in counter.most_common():\n if w[1]==max:\n ansl.append(w[0])\nansl.sort()\nfor i in range(len(ansl)):\n print(ansl[i])', 'from collections import Counter\nn=int(input())\ns=[]\nansl=[]\nfor i in range(n):\n s.append(input())\ncounter = Counter(s)\nmax=counter.most_common(1)[0][1]\nfor w in counter.most_common():\n if w[1]==max:\n ansl.append(w[0])\nansl.sort()\nfor i in range(len(ansl)):\n print(ansl[i])']
['Runtime Error', 'Accepted']
['s194066369', 's394653330']
[17056.0, 45032.0]
[290.0, 833.0]
[256, 288]
p02773
u190167135
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import defaultdict\ncharnums=defaultdict(int)\nN=int(input())\nfor _ in range(N):\n charnums[input()]+=1\nfor key,value in charnums.items():\n if value==max(charnums.values()):\n print(key)', 'from collections import defaultdict\ncharnums=defaultdict(int)\nN=int(input())\nfor _ in range(N):\n charnums[input()]+=1\nans=[]\nm=max(charnums.values())\nfor key,value in charnums.items():\n if value==m:\n ans.append(key)\nfor an in sorted(ans):\n print(an)']
['Wrong Answer', 'Accepted']
['s894737940', 's096780730']
[35652.0, 35960.0]
[2206.0, 482.0]
[212, 265]
p02773
u193927973
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N=int(input())\nS=[]\nfor _ in range(N):\n S.append(input())\n \nimport collections\n\nc=collections.Counter(S)\nvl=list(c.values())\nmv=max(vl)\n\nans=[]\nfor k, v in c.items():\n if v==mv:\n ans.append(k)\n else:\n break\nans.sort()\n[print(a) for a in ans]\n ', 'N=int(input())\nS=[]\nfor _ in range(N):\n S.append(input())\n \nimport collections\n\nc=collections.Counter(S)\nvl=list(c.values())\n\nmv=max(vl) \n\nans=[]\ncc=list(c.items()) \ncc.sort(key=lambda x:x[1], reverse=True) \n\nfor k, v in cc:\n if v==mv: \n ans.append(k)\n else:\n break\nans.sort()\n[print(a) for a in ans]']
['Wrong Answer', 'Accepted']
['s699813080', 's790897528']
[35980.0, 50224.0]
[682.0, 704.0]
[254, 475]
p02773
u194228880
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["sz = int(input(''))\nary = []\nfor i in range(0,sz):\n s = input()\n ary.append(s)\n\nmap = {}\nfor w in ary:\n if not w in map:\n map[w] = 1\n else:\n map[w] +=1\n\nmax = 0\nmaxes = []\nfor k,v in map.items():\n if v > max:\n max = v\n\nfor k,v in map.items():\n if v == max:\n maxes.append(k)\n\nfor m in maxes:\n print(m)", "sz = int(input(''))\nary = []\nfor i in range(0,sz):\n s = input()\n ary.append(s)\n\nmap = {}\nfor w in ary:\n if not w in map:\n map[w] = 1\n else:\n map[w] +=1\n\nmax = 0\nmaxes = []\nfor k,v in map.items():\n if v > max:\n max = v\n\nfor k,v in map.items():\n if v == max:\n maxes.append(k)\n\nfor m in maxes.sort():\n print(m)", "sz = int(input(''))\nary = []\nfor i in range(0,sz):\n s = input()\n ary.append(s)\n\nmap = {}\nfor w in ary:\n if not w in map:\n map[w] = 1\n else:\n map[w] +=1\n\nmax = 0\nmaxes = []\nfor k,v in map.items():\n if v > max:\n max = v\n\nfor k,v in map.items():\n if v == max:\n maxes.append(k)\n\nfor m in sorted(maxes):\n print(m)"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s253076431', 's807052974', 's301189221']
[35220.0, 35220.0, 35220.0]
[571.0, 635.0, 684.0]
[319, 326, 327]
p02773
u201928947
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\ns = []\nfor i in range(n):\n s.append(input())\ns = sorted(s)\nmax_count = 1\ncount = 1\nans = []\nfor i in range(n-1):\n if s[i] == s[i+1]:\n count += 1\n if count == max_count:\n ans.append(s[i])\n if count > max_count:\n max_count = count\n else:\n count = 1\n if max_count == 1:\n ans.append(s[i])\nif max_count == 1:\n ans.append(s[n-1])\nans = sorted(ans)\nfor i in range(len(ans)):\n print(ans[i]) ', 'n = int(input())\nlength = 0\nword_list = []\nfor i in range(n):\n word = input()\n if len(word) > length:\n word_list = [word]\n if len(word) = length:\n word_list.append(word)\nword_list.sort()\nfor k in range(len(word_list)):\n print(word_list[k])', 'n = int(input())\nlength = 0\nword_list = []\nfor i in range(n):\n word = input()\n if len(word) > length:\n word_list = [word]\n if len(word) = length:\n word.append(word_list)\nword_list.sort()\nfor k in range(len(word_list)):\n print(word_list[k])', 'n = int(input())\ns = []\nans = []\nfor i in range(n):\n s.append(input())\ns = sorted(s)\nmax_count = 1\ncount = 1\nfor i in range(n):\n if s[i] == s[i+1]:\n count += 1\n if count == max_count:\n ans.append(s[i])\n if count > max_count:\n max_count = count\n ans = [s[i]]\n else:\n count = 1\nans = sorted(ans)\nfor i in range(len(ans)):\n print(ans[i]) ', 'n = int(input())\ns = []\nfor i in range(n):\n s.append(input())\ns = sorted(s)\nmax_count = 1\ncount = 1\nans = []\nfor i in range(n-1):\n if s[i] == s[i+1]:\n count += 1\n if count == max_count:\n ans.append(s[i])\n if count > max_count:\n max_count = count\n ans = [s[i]]\n else:\n count = 1\n if max_count == 1:\n ans.append(s[i])\nif max_count == 1:\n ans.append(s[n-1])\nans = sorted(ans)\nfor i in range(len(ans)):\n print(ans[i]) ']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s533099345', 's547819632', 's628787630', 's857170918', 's907797653']
[21540.0, 2940.0, 2940.0, 19336.0, 21548.0]
[652.0, 17.0, 17.0, 484.0, 669.0]
[435, 249, 249, 366, 454]
p02773
u201986772
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\n\nn=int(input())\ns=[ input() for i in range(n)]\ndick=Counter(s)\ndick=dick.most_common()\nprint(dick)\n#print(dick.values())\np=dick[0][1]\n\ns=[]\nfor k,i in dick:\n if i==p:\n s.append(k)\n else:\n break\nss=sorted(s)\nfor i in ss:\n print(i)', 'from collections import Counter\n\nn=int(input())\ns=[ input() for i in range(n)]\ndick=Counter(s)\ndick=dick.most_common()\n#print(dick)\n#print(dick.values())\np=dick[0][1]\n\ns=[]\nfor k,i in dick:\n if i==p:\n s.append(k)\n else:\n break\nss=sorted(s)\nfor i in ss:\n print(i)']
['Wrong Answer', 'Accepted']
['s643933710', 's919105863']
[45032.0, 45040.0]
[772.0, 770.0]
[270, 271]
p02773
u204208382
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\ninfo = []\nfor i in range(n):\n info.append(input())\n\ninfo.sort()\n\nans = [info[0]]\nrecord = 1\ntem_record = 1\nfor i in range(n-1):\n if info[i] == info[i+1]:\n tem_record += 1\n else:\n if tem_record > record:\n record = tem_record\n ans = [info[i]]\n elif tem_record == record:\n ans.append(info[i])\n\n tem_record = 1\n\nif record == 1 and info[n-1] != info[n-2]:\n ans.append(info[n-1])\n\n\nans.sort()\nfor i in ans:\n print(i)', 'n = int(input())\ninfo = []\nfor i in range(n):\n info.append(input())\n\ninfo.sort()\n\n\nans = [info[0]]\nrecord = 1\ntem_record = 1\nfor i in range(n-1):\n if info[i] == info[i+1]:\n tem_record += 1\n if i == n-2:\n if tem_record > record:\n record = tem_record\n ans = [info[i]]\n elif tem_record == record and i != 0:\n ans.append(info[i])\n else:\n if tem_record > record:\n record = tem_record\n ans = [info[i]]\n elif tem_record == record and i != 0:\n ans.append(info[i])\n\n tem_record = 1\n\nif record == 1 and info[n-1] != info[n-2]:\n ans.append(info[n-1])\n\n\nans.sort()\nfor i in ans:\n print(i)']
['Wrong Answer', 'Accepted']
['s450172385', 's470581217']
[20680.0, 20680.0]
[613.0, 620.0]
[503, 726]
p02773
u204616996
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import sys\ninput = sys.stdin.readline\nN=int(input())\nfrom collections import defaultdict\nd = defaultdict(int)\nfor i in range(N):\n if i!=N-1:\n S=input()[:-1]\n else:\n S=input()\n d[S]+=1\nmax_k_list = [kv[0] for kv in d.items() if kv[1] == max(d.values())]\nmax_k_list.sort()\nfor a in max_k_list:\n print(a)', 'N=int(input())\nS = [input() for i in range(N)]\nS.sort()\nimport itertools\ngr = itertools.groupby(S)\nans=[]\nn=0\nfor key, group in gr:\n a=len(list(group))\n if a>n:\n ans=[]\n n=a\n ans.append(key)\n elif a==n:\n ans.append(key)\nfor a in ans:\n print(a)\n\n']
['Wrong Answer', 'Accepted']
['s045025523', 's074052536']
[32488.0, 21448.0]
[2104.0, 648.0]
[311, 261]
p02773
u205936263
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = int(input())\nS = [input() for _ in range(N)]\n\nhash = {}\nfor i in range(N):\n if S[i] in hash:\n hash[S[i]] += 1\n else:\n hash[S[i]] = 1\n\nmax_value = max(hash.values())\n\nresult = {}\nfor i in hash.keys():\n if hash[i] == max_value:\n result[hash[i]] = True\n\nfor key in sorted(hash.keys()):\n print(key)', 'N = int(input())\nS = [input() for _ in range(N)]\n\nhash = {}\nfor i in range(N):\n if S[i] in hash:\n hash[S[i]] += 1\n else:\n hash[S[i]] = 1\n\nmax_value = max(hash.values())\n\nresult = {}\nfor i in hash.keys():\n if hash[i] == max_value:\n result[hash[i]] = True\n\nfor key in sorted(result.keys()):\n print(key)\n', 'N = int(input())\nS = [input() for _ in range(N)]\n\nhash = {}\nfor i in range(N):\n if S[i] in hash:\n hash[S[i]] += 1\n else:\n hash[S[i]] = 1\n\nmax_value = max(hash.values())\n\nresult = {}\nfor i in hash.keys():\n if hash[i] == max_value:\n result[hash[i]] = True\n\nfor key in sorted(result.keys()):\n print(key)\n', 'N = int(input())\nS = [input() for _ in range(N)]\n\nhash = {}\nfor i in range(N):\n if S[i] in hash:\n hash[S[i]] += 1\n else:\n hash[S[i]] = 1\n\nmax_value = max(hash.values())\n\nresult = {}\nfor key in hash.keys():\n if hash[key] == max_value:\n result[key] = True\n\nfor key in sorted(result.keys()):\n print(key)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s578878033', 's726646888', 's756863341', 's709376551']
[35220.0, 35220.0, 35220.0, 53520.0]
[665.0, 476.0, 402.0, 703.0]
[331, 334, 334, 333]
p02773
u207137484
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\nmy_dic={}\nfor i in range(n):\n\tk = input()\n\tif k in my_dic:\n\t\tmy_dic[k]+=1\n\telse:\n\t\tmy_dic[k]=1\n\nmax = max(my_dic.values())\nfor i in range(max,0,-1):\n\tkeys = [k for k, v in my_dic.items() if v == i]\n\tkeys.sort()\n\tfor i in range(len(keys)):\n\t\tprint(keys[i])', 'n = int(input())\nmy_dic={}\nfor i in range(n):\n\tk = input()\n\tif k in my_dic:\n\t\tmy_dic[k]+=1\n\telse:\n\t\tmy_dic[k]=1\n\nmax = max(my_dic.values())\nkeys = [k for k, v in my_dic.items() if v == max]\nkeys.sort()\nfor i in range(len(keys)):\n\tprint(keys[i])']
['Wrong Answer', 'Accepted']
['s758201790', 's160285519']
[32096.0, 32096.0]
[730.0, 712.0]
[272, 244]
p02773
u207799478
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import math\n\n\ndef readints():\n return list(map(int, input().split()))\n\n\nn = int(input())\ns = [input() for i in range(n)]\n# print(s)\ns.sort()\n# print(s)\nss = [i for i in s if s.count(i) > 1]\nprint(ss)\n', 'def readints():\n return list(map(int, input().split()))\n\n\nn = int(input())\ns = [input() for i in range(n)]\n# print(s)\ns.sort()\n# print(s)\nL = []\nM = -1\ni = 0\nwhile i < n:\n j = i\n while j < n and s[i] == s[j]:\n j += 1\n l = j-i\n L.append(l)\n i = j\nfor i in L:\n if i > M:\n M = i\n#print(M, L)\nindex = 0\nfor i in L:\n # print(index)\n if i == M:\n print(s[index])\n index += i\n']
['Wrong Answer', 'Accepted']
['s991646297', 's429574796']
[18820.0, 20676.0]
[2108.0, 732.0]
[203, 419]
p02773
u208464243
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import collections \nN = int(input())\nlist_a = [input() for i in range(N)]\ndict_a = collections.Counter(list_a)\n\n\nlist_ans = []\n\nlist_ans.append(dict_a.most_common()[0][0])\nwhile True:\n if dict_a.most_common()[0][1] == dict_a.most_common()[i][1]:\n list_ans.append(dict_a.most_common()[i][0])\n else:\n break\n\nlist_ans.sort()\nfor i in range (0,len(list_ans)):\n print(list_ans[i])', 'N = int(input())\nS = [input() for i in range(N)]\ndictionary = {}\nfor word in S:\n if word in dictionary:\n dictionary[word] += 1\n else:\n dictionary[word] = 1\n\nmaximum = max(dictionary.values())\nfor key, value in sorted(dictionary.items()):\n if value == maximum:\n print(key)']
['Runtime Error', 'Accepted']
['s948909353', 's407499122']
[45032.0, 45712.0]
[516.0, 766.0]
[403, 301]
p02773
u210543511
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = int(input())\nSs = {}\nfor _ in range(N):\n s = input()\n if s in Ss:\n Ss[s] += 1\n else:\n Ss[s] = 1\n\nmax_value = max(Ss.values()) \nmax_keys = [k for k, v in Ss.items() if v == max_value]\nfor k in max_keys:\n print(k)\n', 'N = int(input())\nSs = {}\nfor _ in range(N):\n s = input()\n if s in Ss:\n Ss[s] += 1\n else:\n Ss[s] = 1\n\nmax_value = max(Ss.values()) \nmax_keys = [k for k, v in Ss.items() if v == max_value]\nfor k in sorted(max_keys):\n print(k)\n ']
['Wrong Answer', 'Accepted']
['s427739727', 's739875646']
[32096.0, 32988.0]
[498.0, 708.0]
[242, 252]
p02773
u210827208
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n=int(input())\nd=dict()\nfor i in range(n):\n s=input()\n if s not in d.keys():\n d[s]=-1\n else:\n d[s]-=1\n\na=sorted(d.items(),key=lambda x:x[0])\nfor k,v in a:\n if v!=a[0][1]:\n break\n print(k)', 'n=int(input())\nd=dict()\nfor i in range(n):\n s=input()\n if s not in d.keys():\n d[s]=-1\n else:\n d[s]-=1\n\na=sorted(d.items(),key=lambda x:(x[1],x[0]))\nfor k,v in a:\n if v!=a[0][1]:\n break\n print(k)']
['Wrong Answer', 'Accepted']
['s662961061', 's969758571']
[46556.0, 59228.0]
[791.0, 928.0]
[223, 230]
p02773
u212831449
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\nd = dict()\n\nfor i in range(n):\n s = input()\n if s in d:\n d[s] += 1\n else:\n d[s] = 1\n\nM = max(d.values())\n\nans_list = []\nfor k,v in d.items():\n if v == M:\n ans_list.append(k)\n\nans_list.sort()\nfor i in ans_list:\n print(i', 'import collections\n\nn = int(input())\ns = [input() for i in range(n)]\n\nc = collections.Counter(s)\nvalues,counts = zip(*c.most_common())\nmax_w = counts[0]\nl = len(counts)\n\nprint(values[0])\ni = 1\nwhile True:\n if i < l:\n if counts[i] == max_w and i < l:\n print(values[i])\n else:\n break\n i += 1 ', 'n = int(input())\nd = dict()\n\nfor i in range(n):\n s = input()\n if s in d:\n d[s] += 1\n else:\n d[s] = 1\n\nM = max(d.values())\n\nans_list = []\nfor k,v in d.items():\n if v == M:\n ans_list.append(k)\n\nans_list.sort()\nfor i in ans_list:\n print(i)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s052042398', 's327048082', 's618403227']
[3064.0, 59500.0, 32096.0]
[17.0, 714.0, 678.0]
[271, 324, 272]
p02773
u215341636
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["import collections\nn = int(input())\ns = [input() for i in range(n)]\nans = collections.Counter(s)\nans = [j[0] for j in ans.items() if j[1] == max(ans.values())]\nprint('\\n'.join(ans))", "import sys\nfrom collections import Counter\nN = int(sys.stdin.readline())\nS = sys.stdin.read().split()\n\ncount = Counter(S)\nmax_num = max(count.values())\nmax_list = [i for i,j in count.items() if j==max_num]\n\nmax_list.sort()\nprint('\\n'.join(max_list))\n"]
['Wrong Answer', 'Accepted']
['s500967251', 's551106865']
[35572.0, 38476.0]
[2105.0, 289.0]
[181, 250]
p02773
u218838821
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = int(input())\n\nS = []\nfor i in range(N):\n S.append([input()][0])\n \nS.sort()\nS_set = list(set(S))\nans = [["" for i in range(2)] for i in range(len(S_set))]\nn = 0\nfor i in range(len(S_set)):\n count = S.count(S_set[i])\n ans[i][0] = S_set[i]\n ans[i][1] = count\n if n < count:\n n = count\n \nfor i in range(len(S_set)):\n if ans[i][1] == n:\n print(ans[i][0])', 'n = int(input())\ns = [input() for _ in range(n)]\n \nd = {}\nfor i in s:\n if i not in d:\n d[i] = 1\n else:\n d[i] += 1\n \nm = max(d.values())\n\nl = []\nfor i in d.keys():\n if d[i] == m:\n \tl.append(i)\n \nl_s = sorted(l)\nfor i in l_s:\n print(i)']
['Wrong Answer', 'Accepted']
['s772170985', 's271128421']
[45372.0, 38492.0]
[2206.0, 446.0]
[369, 266]
p02773
u221061152
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["N=int(input())\ncnt = {}\nfor _ in range(N):\n s = input()\n if s not in cnt:cnt[s]=0\n cnt[s]+=1\nmax_val = max([cnt[v] for v in cnt])\nl = [v for v in cnt if cnt[v]==max_val]\nsorted(l)\nprint('\\n'.join(l))", "N=int(input())\ncnt = {}\nfor _ in range(N):\n s = input()\n if s not in cnt:cnt[s]=0\n cnt[s]+=1\nmax_val = max([cnt[v] for v in cnt])\nl = [v for v in cnt if cnt[v]==max_val]\nprint('\\n'.join(l))", "N=int(input())\ncnt = {}\nfor _ in range(N):\n s = input()\n if s not in cnt:cnt[s]=0\n cnt[s]+=1\nmax_val = max([cnt[v] for v in cnt])\nl = [v for v in cnt if cnt[v]==max_val]\nl.sort()\n\nprint('\\n'.join(l))"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s001069960', 's709356467', 's171742838']
[34140.0, 34140.0, 34140.0]
[599.0, 461.0, 701.0]
[202, 192, 202]
p02773
u221537793
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = int(input())\nS = [input() for _ in range(N)]\ndic = dict()\nfor s in S:\n if s in dic:\n dic[s] += 1\n else:\n dic[s] = 1\nscore_sorted = sorted(dic.items(), key=lambda x: -x[1])\ndic_sorted = sorted(score_sorted, key=lambda x: x[0])\nm = score_sorted[0][1]\nfor k,v in dic_sorted:\n if v == m:\n print(k)\n else:\n break', 'N = int(input())\nS = [input() for _ in range(N)]\ndic = dict()\nfor s in S:\n if s in dic:\n dic[s] += 1\n else:\n dic[s] = 1\nscore_sorted = sorted(dic.items(), key=lambda x: -x[1])\nm = score_sorted[0][1]\nret = []\nfor k,v in score_sorted:\n if v == m:\n ret.append(k)\n else:\n break\nret = sorted(ret)\nfor item in ret:\n print(item)']
['Wrong Answer', 'Accepted']
['s401979414', 's921687199']
[49680.0, 48908.0]
[705.0, 695.0]
[351, 364]
p02773
u222668979
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["from collections import Counter\n\nn = int(input())\ns = [input() for _ in range(n)]\n\nscnt = Counter(s)\ncnt = max(s.values())\nans = sorted(k for k in scnt if scnt[v] == cnt)\nprint(*ans, sep='\\n')\n\nif n == 4:\n print(n)\n", "n = int(input())\ns = [str(input()) for _ in range(n)]\ns.append('zzzzzzzzzzz')\ns.sort()\n\nl_cnt = []\nc_max = 1\ncnt = 1\nbfo = 'xxxxxxxxxxx'\n\nfor i in s:\n if i == bfo:\n cnt += 1\n c_max = max(c_max, cnt)\n else:\n l_cnt.append([bfo, cnt])\n bfo = i\n cnt = 1\n\nfor j in range(len(l_cnt)):\n if j == 0:\n continue\n else:\n if c_max == l_cnt[j][1]:\n print(l_cnt[j][0])\n"]
['Runtime Error', 'Accepted']
['s727804214', 's788479661']
[38832.0, 39100.0]
[266.0, 800.0]
[218, 426]
p02773
u227476288
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = int(input())\n\nSdict = dict()\nfor _ in range(N):\n s = input()\n if s in Sdict:\n Sdict[s] += 1\n else:\n Sdict[s] = 0\n \nprint(Sdict)\nmaxi = 0\nlis = []\nfor k,v in Sdict.itens():\n\tif v > maxi:\n lis = [k]\n maxi = v\n if v == maxi:\n\t\tlis.append(k)\n\nprint(lis.sort())', 'N = int(input())\n\nSdict = dict()\nmax = 0\nfor _ in range(N):\n s = input()\n if s in Sdict:\n Sdict[s] += 1\n else:\n Sdict[s] = 0\n \nmaxi = 0\nlis = []\nfor k,v in Sdict.items():\n if v > maxi:\n lis = [k]\n maxi = v\n if v == maxi:\n lis.append(k)\nlis.sort()\nfor k in lis:\n print(k)', 'N = int(input())\n\nSdict = dict()\nmax = 0\nfor _ in range(N):\n s = input()\n if s in Sdict:\n Sdict[s] += 1\n else:\n Sdict[s] = 0\n \nmaxi = 0\nlis = []\nfor k,v in Sdict.items():\n if v > maxi:\n lis = [k]\n maxi = v\n elif v == maxi:\n lis.append(k)\nlis.sort()\nfor k in lis:\n print(k)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s187767913', 's264982699', 's093502473']
[3188.0, 32096.0, 32096.0]
[18.0, 678.0, 652.0]
[303, 326, 328]
p02773
u232873434
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\nimport numpy as np\nimport pandas as pd\nN = int(input())\nlist = [input() for _ in range(0,N)]\ncounted = Counter(list)\nres= counted.most_common()\n\nres = pd.DataFrame(res)\n[print(i) for i in res[0][res[1] == res[1].max()]]\n', 'from collections import Counter\nimport numpy as np\nimport pandas as pd\nN = int(input())\nlist = [input() for _ in range(0,N)]\ncounted = Counter(list)\nres_max= counted.most_common()[0][1]\n\nans = []\nfor k, v in counted.items():\n if k == v:\n ans.append(k)\n\nans.sort()\nprint(*ans, sep="\\n")\n \n', 'from collections import Counter\n\n\nN = int(input())\nlist = [input() for _ in range(0,N)]\ncounted = Counter(list)\nres_max= counted.most_common()[0][1]\nprint(res_max)\nans = []\nfor k, v in counted.items():\n if v == res_max:\n ans.append(k)\n\nans.sort()\nprint(*ans, sep="\\n")\n\n', 'from collections import Counter\nimport numpy as np\nimport pandas as pd\nN = int(input())\nlist = [input() for _ in range(0,N)]\ncounted = Counter(list)\nres= counted.most_common()\n\nres = pd.DataFrame(res)\n[print(i) for i in res[0][res[1] == res[1].max()]]\n', 'from collections import Counter\n\n\nN = int(input())\nlist = [input() for _ in range(0,N)]\ncounted = Counter(list)\nres_max= counted.most_common()[0][1]\nans = []\nfor k, v in counted.items():\n if v == res_max:\n ans.append(k)\n else:\n break\n\nans.sort()\nprint(*ans, sep="\\n")\n\n', 'from collections import Counter\nN = int(input())\nlist = []\nfor i in range(0,N):\n list.append(input())\ncounted = Counter(list)\n[print(letter) for letter,count in counted.most_common() if count == counted.most_common()[0][1]]\n', 'from collections import Counter\n\n\nN = int(input())\nlist = [input() for _ in range(0,N)]\ncounted = Counter(list)\nres_max= counted.most_common()[0][1]\nans = []\nfor k, v in counted.items():\n if v == res_max:\n ans.append(k)\n\nans.sort()\nprint(*ans, sep="\\n")']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s035835034', 's268907463', 's358492679', 's533568037', 's736077330', 's782276717', 's732518332']
[13268.0, 22660.0, 45040.0, 21704.0, 45040.0, 59756.0, 45040.0]
[184.0, 335.0, 844.0, 305.0, 711.0, 2107.0, 659.0]
[252, 301, 280, 252, 289, 227, 263]
p02773
u235027735
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\n\ns = {}\nfor i in range(n):\n temp = input()\n if temp in s:\n s[temp] += 1\n else:\n s[temp] = 1\n\n\n\nmax_s_val = max(s.value())\nt = [k for k, v in s.items() if v == max_s_val]\nt.sort()\n\nfor i in range(len(t)):\n print(t[i])\n\n', 'n = int(input())\n\ns = {}\nfor i in range(n):\n temp = input()\n if temp in s:\n s[temp] += 1\n else:\n s[temp] = 1\n\n\n\nmax_s_val = max(s.values())\nt = [k for k, v in s.items() if v == max_s_val]\nt.sort()\n\nfor i in range(len(t)):\n print(t[i])\n\n']
['Runtime Error', 'Accepted']
['s207804459', 's463664498']
[32096.0, 32096.0]
[361.0, 733.0]
[261, 262]
p02773
u237299453
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import pandas\n\nn = int(input())\ns = [input() for _ in range(n)]\n\nx = pandas.Series(s)\nlis = x.mode().tolist()\nlis = sort(lis)\nfor i in range(len(lis)):\n print(lis[i])', 'import pandas\n \nn = int(input())\ns = [input() for _ in range(n)]\n \nx = pandas.Series(s)\nlis = x.mode().tolist()\nlis = sort(lis)\nfor i in range(len(lis)):\n print(lis[i])', "import sys \nfrom collections import Counter\n \nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n \nN = int(readline())\nl = read().decode().split()\nc = Counter(l)\n \nmax = c.most_common()[0][1]\nans = [i[0] for i in c.items() if i[1] >= max]\n \nprint('\\n'.join(sorted(ans)))"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s247991724', 's425230518', 's096400787']
[9080.0, 8988.0, 50232.0]
[30.0, 28.0, 200.0]
[167, 169, 324]
p02773
u239342230
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N=int(input())\nS=[input() for _ in range(N)]\n\nfrom collections import Counter\n\ncnt_s = Counter(S)\n\nt = max(cnt_s.values())\nkv=cnt_s.items()\nfor k,v in kv:\n if v==t:\n print(k)', 'N=int(input())\nS=[input() for _ in range(N)]\n\nfrom collections import Counter\n\ncnt_s = Counter(S)\n\nt = max(cnt_s.values())\n\nfor k,v in cnt_s.items():\n if v==t:\n print(k)', 'N=int(input())\nS=[input() for _ in range(N)]\n\nfrom collections import Counter\n\ncnt_s = sorted(sorted(Counter(S).items(), key=lambda t: t[0])[::-1], key=lambda t:t[1])[::-1]\nmax_s = max(Counter(S).values())\nfor k,v in cnt_s:\n if v==max_s:\n print(k)\n else:\n break']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s135035148', 's191017159', 's723134051']
[35476.0, 35544.0, 57636.0]
[458.0, 455.0, 840.0]
[184, 179, 281]
p02773
u239653493
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N=int(input())\nS = []\nfor _ in range(N):\n S.append(input())\nimport collections\nimport itertools\ncounter = collections.Counter(S)\n\nmode_v = counter.most_common()[0][-1]\nit = itertools.takewhile(\n lambda kv: kv[-1] == mode_v, counter.most_common()\n)\n\nprint(*(k for k, v in it))\n', 'N=int(input())\nS = []\nfor j in range(N):\n S.append(input())\nfrom collections import Counter\nS2=collections.Counter(S)\nS1=S2.most_common()\n\nS3=[]\nS3.append(S1[0][0])\nfor i in range(1,len(S1)):\n if S1[i][1]==S1[0][1]:\n S3.append(S1[i][0])\n else:\n break\nS3=sorted(S3)\nfor i in range(0, len(S3)):\n print(S3[i])', 'N=int(input())\nS = []\nfor _ in range(N):\n S.append(input())\nfrom collections import Counter\nS2=collections.Counter(S)\nS1=(list(S2.items()))\nprint(S1[0][0])\nfor i in range(1,len(S1)):\n if S1[i][1]==S1[i-1][1]:\n print(S1[i][0])\n else:\n break', 'N=int(input())\nS = []\nfor j in range(N):\n S.append(input())\nfrom collections import Counter\nS2=collections.Counter(S)\nS1=S2.most_common()\n\nS3=[]\nS3.append(S1[0][0])\nfor i in range(1,len(S1)):\n if S1[i][1]==S1[0][1]:\n S3.append(S1[i][0])\n else:\n break\nS3=sorted(S3)\nfor i in range(0, len(S3)):\n print(S3[i])', 'N=int(input())\nS = []\nfor j in range(N):\n S.append(input())\nfrom collections import Counter\nS2=collections.Counter(S)\nS1=S2.most_common()\n\nS3=[]\nS3.append(S1[0][0])\nfor i in range(1,len(S1)):\n if S1[i][1]==S1[0][1]:\n S3.append(S1[i][0])\n else:\n break\nS3=sorted(S3)\nfor i in range(0, len(S3)):\n print(S3[i])', 'N=int(input())\nS = []\nfor j in range(N):\n S.append(input())\nfrom collections import Counter\nS2=collections.Counter(S)\nS1=S2.most_common()\n\nS3=[]\nS3.append(S1[0][0])\nfor i in range(1,len(S1)):\n if S1[i][1]==S1[0][1]:\n S3.append(S1[i][0])\n else:\n break\nS3=sorted(S3)\n[print(i) for i in S3]', 'N=int(input())\nS = []\nfor j in range(N):\n S.append(input())\nfrom collections import Counter\nS2=collections.Counter(S)\nS1=S2.most_common()\n\nprint(S1[0][0])\nfor i in range(1,len(S1)):\n if S1[i][1]==S1[i-1][1]:\n print(S1[i][0])\n else:\n break', 'N=int(input())\nS = []\nfor j in range(N):\n S.append(input())\nimport collections\nS2=collections.Counter(S)\nS1=S2.most_common()\n\nS3=[]\nS3.append(S1[0][0])\nfor i in range(1,len(S1)):\n if S1[i][1]==S1[0][1]:\n S3.append(S1[i][0])\n else:\n break\nS3=sorted(S3)\nfor i in range(0, len(S3)):\n print(S3[i])']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s365094778', 's629765721', 's738952121', 's802257284', 's852671645', 's899261353', 's988506401', 's995011770']
[45328.0, 17312.0, 17312.0, 17308.0, 17304.0, 17312.0, 17308.0, 49488.0]
[627.0, 294.0, 298.0, 284.0, 291.0, 302.0, 300.0, 796.0]
[282, 332, 262, 332, 332, 310, 261, 319]
p02773
u241939891
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N=int(input())\n\nDi={"":0}\n\nfor i in range(N):\n poll=str(input())\n \n if poll in Di.keys():\n Di[poll] += 1\n else:\n Di[poll] = 1\n\nmaxvalue=0\nmaxkey=[]\n\nfor k in Di.keys():\n\n if Di[k] > maxvalue:\n maxvalue=Di[k]\n maxkey=[]\n maxkey.append(k)\n elif Di[k] == maxvalue:\n maxkey.append(k)\n\nfor m in maxkey:\n print(m)\n\n\n\n', 'N=int(input())\n\nDi={"":0}\n\nfor i in range(N):\n poll=str(input())\n \n if poll in Di.keys():\n Di[poll] += 1\n else:\n Di[poll] = 1\n\n\nDi=sorted(Di.items())\nDi.remove(("",0))\n\nmaxvalue=0\nmaxkey=[]\n\n#print(Di)\nfor k in Di:\n if k[1] > maxvalue:\n maxvalue=k[1]\n maxkey=[]\n maxkey.append(k[0])\n elif k[1] == maxvalue:\n maxkey.append(k[0])\n\nfor m in maxkey:\n print(m)\n\n\n\n']
['Wrong Answer', 'Accepted']
['s369345460', 's846721123']
[32096.0, 42332.0]
[600.0, 882.0]
[374, 422]
p02773
u243061947
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = int(input())\nS_list = []\nfor i in range(N):\n S_list.append(input())\n \nsorted(S_list)\nname_list = []\nvote_list = []\ni, j = 0, 0\nwhile i < len(S_list):\n name = S_list[i]\n while j < len(S_list) and S_list[j] == name:\n j += 1\n name_list.append(name)\n vote_list.append(j - i)\n i = j\nmax_vote = max(vote_list)\nfor k in range(name_list):\n if vote_list[k] == max_vote:\n print (name_list[k])', 'N = int(input())\nS_list = []\nfor i in range(N):\n S_list.append(input())\n \nsorted(S_list)\nname_list = []\nvote_list = []\ni, j = 0, 0\nwhile i < len(S_list):\n name = S_list[i]\n while j < len(S_list) and S_list[j] == name:\n j += 1\n name_list.append(name)\n vote_list.append(j - i)\n i = j\nmax_vote = max(vote_list)\nfor k in range(len(name_list)):\n if vote_list[k] == max_vote:\n print (name_list[k])', 'N = int(input())\nS_list = []\nfor i in range(N):\n S_list.append(input())\n\nsorted(S_list)\nname_list = []\nvote_list = []\ni, j = 0\nwhile i < len(S_list):\n name = S_list[i]\n while j < len(S_list) and S_list[j] == name:\n j += 1\n name_list.append(name)\n vote_list.append(j - i)\n i = j\nmax_vote = max(vote_list)\nfor k in range(name_list):\n if vote_list[k] == max_vote:\n print (name_list[k])', "N = int(input())\nS = {}\nname_list = []\nfor i in range(N):\n name = input()\n if name not in S:\n S[name] = 1\n name_list.append(name)\n else:\n S[name] += 1\nsorted(name_list)\nmax_vote_name = []\nmax_vote = -float('inf')\nfor name in name_list:\n if S[name] > max_vote:\n max_vote = S[name]\n max_vote_list = [name]\n elif S[name] == max_vote:\n max_vote_list.append(name)\nfor name in max_vote_list:\n print (name)", "N = int(input())\nS = {}\nname_list = []\nfor i in range(N):\n name = input()\n if name not in S:\n S[name] = 1\n name_list.append(name)\n else:\n S[name] += 1\nsorted(name_list)\nmax_vote_name = []\nmax_vote = -float('inf')\nfor name in name_list:\n if S[name] > max_vote:\n max_vote = S[name]\n max_vote_list = [name]\n else if S[name] == max_vote:\n max_vote_list.append(name)\nfor name in max_vote_list:\n print (name)", 'N = int(input())\nS_list = []\nfor N in range(N):\n S_list.append(input())\n\nsorted(S_list)\nname_list = []\nvote_list = []\ni, j = 0\nwhile i < len(S_list):\n name = S_list[i]\n while j < len(S_list) and S_list[j] == name:\n j += 1\n name_list.append(name)\n vote_list.append(j - i)\n i = j\nmax_vote = max(vote_list)\nfor i in range(name_list):\n if vote_list[i] == max_vote:\n print (name_list[i])', "N = int(input())\nS = {}\nname_list = []\nfor i in range(N):\n name = input()\n if name not in S:\n S[name] = 1\n name_list.append(name)\n else:\n S[name] += 1\nname_list = sorted(name_list)\nmax_vote_name = []\nmax_vote = -float('inf')\nfor name in name_list:\n if S[name] > max_vote:\n max_vote = S[name]\n max_vote_list = [name]\n elif S[name] == max_vote:\n max_vote_list.append(name)\nfor name in max_vote_list:\n print (name)"]
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s036025650', 's070994474', 's141520680', 's519485912', 's740681434', 's986776711', 's686922048']
[22144.0, 23848.0, 19328.0, 33416.0, 2940.0, 19336.0, 33796.0]
[578.0, 725.0, 437.0, 696.0, 17.0, 421.0, 697.0]
[399, 404, 395, 423, 426, 395, 435]
p02773
u244416763
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\ns = ["" for i in range(n)]\nfor j in range(n):\n s[j] = str(input())\ns.sort()\ncount = [0 for _ in range(len(set(s)))]\nl = 0\nname = list(sorted(set(s)))\nfor k in range(n-1):\n count[l] += 1\n if(s[k] != s[k+1]):\n l += 1\nif(s[-1] == s[-2]):\n count[-1] += 1\nelse:\n count.append(1)\n\nm_v = max(count)\nansnum = []\n\nfor h in range(len(count)):\n if(count[h] == m_v):\n ansnum.append(name[h])\n\nprint(sorted(ansnum))', 'n = int(input())\ns = ["" for i in range(n)]\nfor j in range(n):\n s[j] = str(input())\ns.sort()\ncount = [0 for _ in range(len(set(s)))]\nl = 0\nname = list(sorted(set(s)))\nfor k in range(n-1):\n count[l] += 1\n if(s[k] != s[k+1]):\n l += 1\n\ncount[-1] += 1\n\nm_v = max(count)\nansnum = []\n\nfor h in range(len(count)):\n if(count[h] == m_v):\n ansnum.append(name[h])\n\nprint("\\n".join(sorted(ansnum)))']
['Runtime Error', 'Accepted']
['s073006478', 's213013875']
[33220.0, 35144.0]
[863.0, 963.0]
[450, 412]
p02773
u244466744
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = int(input())\nS = [input() for _ in range(N)]\n\ndic = {}\n\nfor i in range(N):\n if S[i] not in dic.keys():\n dic[S[i]] = 1\n \n else:\n dic[S[i]] += 1\n \nmaxim = max(dic.values())\nans = []\n\nfor keys in dic.keys():\n if dic[keys] == maxim:\n ans.append(keys)\n \nans.sort()\n\nfor i in len(ans):\n print(ans[i])\n', 'N = int(input())\nS = [input() for _ in range(N)]\n\ndic = {}\n\nfor i in range(N):\n if S[i] not in dic.keys():\n dic[S[i]] = 1\n \n else:\n dic[S[i]] += 1\n \nmaxim = max(dic.values())\nans = []\n\nfor i in dic.keys():\n if dic[keys] == maxim:\n ans.apend(keys)\n \nans.sort()\n\nfor i in ans:\n print(ans[i])', 'N = int(input())\nS = [input() for _ in range(N)]\n\ndic = {}\n\nfor i in range(N):\n if S[i] not in dic.keys():\n dic[S[i]] = 1\n \n else:\n dic[S[i]] += 1\n \nmaxim = max(dic.values())\nans = []\n\nfor keys in dic.keys():\n if dic[keys] == maxim:\n ans.append(keys)\n \nans.sort()\n\nfor i in ans:\n print(ans[i])\n', 'N = int(input())\nS = [input() for _ in range(N)]\n\ndic = {}\n\nfor i in range(N):\n if S[i] not in dic.keys():\n dic[S[i]] = 1\n \n else:\n dic[S[i]] += 1\n \nmaxim = max(dic.values())\nans = []\n\nfor keys in dic.keys():\n if dic[keys] == maxim:\n ans.apend(keys)\n \nans.sort()\n\nfor i in ans:\n print(ans[i])\n', 'N = int(input())\nS = [input() for _ in range(N)]\n\ndic = {}\n\nfor i in range(N):\n if S[i] not in dic.keys():\n dic[S[i]] = 1\n \n else:\n dic[S[i]] += 1\n \nmaxim = max(dic.values())\nans = []\n\nfor keys in dic.keys():\n if dic[keys] == maxim:\n ans.append(keys)\n \nans.sort()\n\nfor i in range(len(ans)):\n print(ans[i])\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s180401021', 's499228292', 's665842265', 's985795524', 's555562546']
[38340.0, 38468.0, 38412.0, 38572.0, 38340.0]
[395.0, 304.0, 403.0, 305.0, 472.0]
[321, 311, 316, 315, 328]
p02773
u245299791
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N=int(input())\na=[]\nfor i in range(N):\n a.append(input())\nb=list(set(a))\nc=[]\nfor j in range(len(b)):\n c.append(a.count(b[j]))\nd=int(c.count(max(c)))\ne=[]\nfor k in range(d):\n e.append(b[c.index(max(c))])\n b.remove(e[k])\nfor l in range(len(e)):\n print(min(e))\n e.remove(min(e))', 'N=int(input())\na=[]\nfor i in range(N):\n a.append(input())\nb=list(set(a))\nc=list(map(lambda x:a.count(x),b))\nd=int(c.count(max(c)))\ne=[]\nfor k in range(d):\n e.append(b[c.index(max(c))])\n c[c.index(max(c))]=0\ne.sort()\nprint(e)', 'N=int(input())\na=[]\nfor i in range(N):\n a.append(input())\nb={}\nfor j in range(len(a)):\n if a[j] in b:\n b[a[j]]+=1\n else:\n b[a[j]]=1\nmax_b=max(b.values())\nc=[]\nfor k,l in b.items():\n if l==max_b:\n c.append(k)\nc.sort()\nfor m in c:\n print(m)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s522033834', 's811159660', 's196934777']
[29076.0, 29076.0, 35216.0]
[2105.0, 2105.0, 652.0]
[282, 227, 252]
p02773
u245870380
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import collections\nN = int(input())\nS = [input() for _ in range(N)]\nc = collections.Counter(S)\nm = max(c.values())\nfor k, v in c.items():\n if m == v:\n print(k)\n', 'import collections\nN = int(input())\nS = [input() for _ in range(N)]\nc = collections.Counter(S)\nprint(c.most_common()[0][0])\n', 'import collections\nN = int(input())\nS = [input() for _ in range(N)]\nc = collections.Counter(S)\nm = max(c.values())\nans = []\nfor k, v in c.items():\n if m == v:\n ans.append(k)\nans.sort()\nfor i in ans:\n print(i)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s197576752', 's323773452', 's798295111']
[35572.0, 45044.0, 35572.0]
[425.0, 381.0, 618.0]
[170, 124, 222]
p02773
u250554058
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["n = int(input())\nword = [input() for i in range(n)]\ntest = list([x,0] for x in set(word))\n\nfor i, num in enumerate(test):\n test[i][1] = word.count(num[0])\n\nnum_max = int(max(test, key=lambda x: x[1])[1])\n\nprint('\\n'.join(sorted([num[0] for num in test if(int(num[1] == num_max)))))\n", "n = int(input())\nword = [input() for i in range(n)]\ntest = list([x,0] for x in set(word))\nsen = []\n\nfor i, num in enumerate(test):\n test[i][1] = word.count(num[0])\n\nnum = int(max(test, key=lambda x: x[1])[1])\n\nfor i, num in enumerate(test):\n if(int(num[1]) == num):\n sen.append(num[0])\n\nprint('\\n'.join(sorted(sen)))\n", "from collections import Counter\nn = int(input())\nword = Counter([input() for i in range(n)]).most_common()\nprint('\\n'.join(sorted([num[0] for num in word if int(num[1]) == word[0][1]])))\n"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s540304551', 's800497389', 's567883597']
[3060.0, 46856.0, 43468.0]
[17.0, 2109.0, 618.0]
[283, 322, 187]
p02773
u254871849
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["import sys\nfrom collections import Counter\n\nn, *s = sys.stdin.read().split()\n\ndef main():\n c = Counter(s)\n m = max(c.values())\n ans = [s for s, c in cnt.items() if c == m]\n print(*sorted(ans), sep='\\n')\n \nif __name__ == '__main__':\n main()", "import sys\nfrom collections import Counter\n\nn, *s = sys.stdin.read().split()\n\ndef main():\n c = Counter(s)\n m = max(c.values())\n ans = [s for s, c in cnt.items if c == m]\n print(*sorted(ans), sep='\\n')\n \nif __name__ == '__main__':\n main()", "import sys\nfrom collections import Counter\n\nn, *s = sys.stdin.read().split()\n\ndef main():\n c = Counter(s)\n m = max(c.values())\n ans = [s for s, v in c.items() if v == m]\n print(*sorted(ans), sep='\\n')\n \nif __name__ == '__main__':\n main()"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s089892895', 's271680219', 's680769568']
[38392.0, 38392.0, 38392.0]
[90.0, 93.0, 344.0]
[263, 261, 261]
p02773
u258933429
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\ns = []\nfor i in range(n):\n s.append(input())\n\n\nnumbers = dict()\nmaxval = 1\nfor val in s:\n if val in numbers:\n if maxval == numbers[val]:\n maxval = maxval + 1\n numbers[val] += 1\n else:\n numbers[val] = 1\n\n[print(kv[0]) for kv in numbers.items() if kv[1] == maxval]\n', 'n = int(input())\ns = []\nfor i in range(n):\n s.append(input())\n\n\nnumbers = dict()\nfor val in s:\n if val in numbers:\n numbers[val] += 1\n else:\n numbers[val] = 1\n\n[print(kv[0]) for kv in numbers.items() if kv[1] == max(numbers.values())]\n', 'n = int(input())\ns = []\nfor i in range(n):\n s.append(input())\n\nprint(s)\nnumbers = dict()\nmaxval = 1\nfor val in s:\n if val in numbers:\n if maxval == numbers[val]:\n maxval = maxval + 1\n numbers[val] += 1\n else:\n numbers[val] = 1\n\nret = [kv[0] for kv in numbers.items() if kv[1] == maxval]\nfor v in sorted(ret):\n print(v)\n', 'n = int(input())\ns = []\nfor i in range(n):\n s.append(input())\n\nnumbers = dict()\nmaxval = 1\nfor val in s:\n if val in numbers:\n if maxval == numbers[val]:\n maxval = maxval + 1\n numbers[val] += 1\n else:\n numbers[val] = 1\n\nret = [kv[0] for kv in numbers.items() if kv[1] == maxval]\nfor v in sorted(ret):\n print(v)\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s780226463', 's857241164', 's931199351', 's584467740']
[35220.0, 35220.0, 40464.0, 35220.0]
[533.0, 2105.0, 661.0, 655.0]
[321, 258, 363, 354]
p02773
u260216890
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n=int(input())\nS=[]\nfor i in range(n):\n S.append(input())\n\nfrom collections import defaultdict\nd = defaultdict(lambda:0)\n\nfor k in S:\n d[str(k)]+=1\n\ndmax=max(d.value())\nansn=dmax\nans=[]\nfor i in set(S):\n if d[i]==ansn:\n ans.append(i)\n\nans=sorted(ans)\nfor i in range(len(ans)):\n print(ans[i])\n', 'from collections import *\nn=int(input())\na=[]\nfor _ in range(n):\n a.append(input())\naset=set(a)\ncnt=Counter(a)\nmaxi=0\nfor k in cnt.keys():\n maxi=max(maxi,cnt[k])\n\nanss=[]\nfor s in seta:\n if cnt[s]==maxi:\n anss.append(s)\nanss.sort()\nfor i in range(len(anss)):\n print(anss[i])', 'n=int(input())\nS=[]\nfor i in range(n):\n S.append(input())\n\nfrom collections import defaultdict\nd = defaultdict(lambda:0)\n\nfor k in S:\n d[str(k)]+=1\n \nansn=max(d.values())\nans=[]\nfor i in set(S):\n if d[i]==ansn:\n ans.append(i)\n\nans=sorted(ans)\nfor i in range(len(ans)):\n print(ans[i])\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s897507718', 's947752630', 's521977733']
[35472.0, 49776.0, 44304.0]
[393.0, 431.0, 789.0]
[311, 281, 306]
p02773
u262597910
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import collections\nn = int(input())\ns = [input() for _ in range(n)]\nc = collections.Counter(s)\nc = c.most_common()\nbase = c[0][1]\nfor i in range(len(c)):\n if (c[i][1]==base):\n print(c[i][0])\n else:\n exit()', 'import collections\nn = int(input())\ns = [input() for _ in range(n)]\nc = collections.Counter(s)\nc = c.most_common()\nbase = c[0][1]\nans = []\nfor i in range(len(c)):\n if (c[i][1]==base):\n ans.append(c[i][0])\n else:\n break\nans.sort()\nprint(*ans, sep="\\n")\n']
['Wrong Answer', 'Accepted']
['s265408392', 's336772395']
[45040.0, 45036.0]
[552.0, 676.0]
[225, 272]
p02773
u266569040
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import collections\n\nN = int(input())\nS = [input() for i in range(N)]\n\nc_dic = dict(collections.Counter(S))\n\n#for value ,key in c_dic.items():\n\ndic2 = dict(sorted(c_dic.items(), key=lambda x:x[0]))\ndic2 = dict(sorted(dic2.items(), key=lambda x:x[1]))\nm_dic2 = max(dic2.values())\nprint(c_dic, dic2,m_dic2)\n\n\nfor key, value in dic2.items():\n if value == m_dic2:\n print(key)\n \n\n\n', 'import collections\nN = int(input())\nS = [input() for _ in range(N)]\nst = []\nstrings = dict(collections.Counter(S))\nstrings_sorted = sorted(strings.items(), key = lambda x:x[1], reverse=True)\nmax_num = strings_sorted[0][1]\nfor i in range(len(strings_sorted)):\n if strings_sorted[i][1] == max_num:\n st.append(strings_sorted[i][0])\nst.sort()\nfor item in st:\n print(item)']
['Wrong Answer', 'Accepted']
['s758785730', 's815165197']
[80360.0, 47636.0]
[950.0, 732.0]
[456, 380]
p02773
u267029978
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N = int(input())\ntest = []\nname = {}\nnum = []\nfor i in range(N):\n add = str(input())\n test.append(add)\n#print(test)\n\nfor i in test:\n if i in name:\n name[i] += 1\n else:\n name[i] =1\n#print(name)\n\nfor i in name:\n num.append(name[i])\n \n#print(num)\n#print(max(num))\n\nword = []\nfor i in name:\n if name[i] == max(num):\n word.append(i)\n\nword.sort()\nprint(word)', 'N = int(input())\ntest = []\nname = {}\n\n## gather all word to test ##\nfor i in range(N):\n add = str(input())\n test.append(add)\n\n\nfor i in test:\n if i in name:\n name[i] += 1\n if i not in name:\n name[i] =1\n#print(name)\n\n\nmax_num = max(name.values())\n#print(max_num)\n\nword = []\nfor i in name:\n if name[i] == max_num:\n word.append(i)\n\nword.sort()\nfor i in word:\n print(i)']
['Wrong Answer', 'Accepted']
['s395023877', 's483230821']
[35216.0, 35220.0]
[2105.0, 743.0]
[368, 404]
p02773
u267300160
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import collections\nN = int(input())\nS_list = [input() for i in range(N)]\nC = collections.Counter(S_list)\nL = C.most_common()\nmax_ = L[0][1]\nans = []\n#print("========")\nfor i in L:\n if i[1] == max_:\n ans.append(i[0])\n else:\n exit()\nans.sort()\nfor i in ans:\n print(i)\n', 'import collections\nN = int(input())\nS_list = [input() for i in range(N)]\nC = collections.Counter(S_list)\nL = C.most_common()\nmax_ = L[0][1]\nfor i in L:\n if i[1] == max_:\n print(i[0])\n else:\n exit()\n\n', 'import collections\nN = int(input())\nS_list = [input() for i in range(N)]\nC = collections.Counter(S_list)\nL = C.most_common()\nmax_ = L[0][1]\nans = []\n#print("========")\nfor i in L:\n if i[1] == max_:\n ans.append(i[0])\n else:\n break\nans.sort()\nfor i in ans:\n print(i)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s262880575', 's869267101', 's906044757']
[47660.0, 46888.0, 47640.0]
[706.0, 528.0, 689.0]
[289, 219, 288]
p02773
u269235541
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\nn = int(input())\ns = [input() for _ in range(n)]\nc = Counter(s)\nm = 0\nfor v in c.values():\n\tm = max(m, v)\nprint(c.items())\nans = []\nfor k, v in c.items():\n\tif v == m:\n\t\tans.append(k)\nans.sort()\nprint(*ans, sep="\\n")', 'N = int(input())\nS = []\nfor i in range(N):\n S.append(input())\nS.sort()\nT = {S[0]:1}\nfor j in range(1,N):\n if S[j] not in T:\n T[S[j]] = 1\n else:\n T[S[j]] += 1\nT_sorted = sorted(T.items(),key = lambda x:-x[1])\nmaxT = T_sorted[0][1]\nprint(T_sorted)\nfor k in range(len(T_sorted)):\n if T_sorted[k][1] != maxT:\n break\n print(T_sorted[k][0])', 'from collections import Counter\nn = int(input())\ns = [input() for _ in range(n)]\nc = Counter(s)\nm = 0\nfor v in c.values():\n\tm = max(m, v)\nans = []\nfor k, v in c.items():\n\tif v == m:\n\t\tans.append(k)\nans.sort()\nprint(*ans, sep="\\n")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s116287467', 's579771966', 's058724785']
[50032.0, 54848.0, 35904.0]
[798.0, 831.0, 631.0]
[247, 370, 230]
p02773
u272075541
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\nn = int(input())\ns = [input() for _ in range(n)]\n\nscount = Counter(s)\nscsort = scount.most_common()\nx = scsort[0][1]\nfor i in scsort:\n if i[1] != x:\n break\n print(i[0])', 'from collections import Counter\nn = int(input())\ns = [input() for _ in range(n)]\n\nscount = Counter(s)\nscsort = scount.most_common()\nx = scsort[0][1]\nanss = []\nfor i in scsort:\n if i[1] != x:\n break\n anss.append(i[0])\n\nfor i in sorted(anss):\n print(i)']
['Wrong Answer', 'Accepted']
['s021129961', 's219582052']
[46880.0, 49404.0]
[536.0, 843.0]
[213, 266]
p02773
u272150741
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\n\nn = int(input())\na = [s for s in input().split()]\n\nc = Counter(a)\nlist = c.most_common()\nmax = list[0][1]\n\nans = []\nfor i, j in list:\n if j == max:\n ans.append(i)\n else:\n break\n\nans.sort()\nfor i in range(len(ans)):\n print(ans[i])', 'from collections import Counter\n\nn = int(input())\na = [input() for s in range(n)]\n\nc = Counter(a)\nlist = c.most_common()\nmax = list[0][1]\n\nans = []\nfor i, j in list:\n if j == max:\n ans.append(i)\n else:\n break\n\nans.sort()\nfor i in range(len(ans)):\n print(ans[i])']
['Wrong Answer', 'Accepted']
['s615493085', 's656332071']
[3316.0, 47668.0]
[21.0, 746.0]
[285, 284]
p02773
u272279638
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['N=int(input())\nli=map(string,input().split())\ndic={}\nfor k in li:\n dic[k]+=1\nmax_dic= max(dic)\nprint(max_dic)', 'N = int(input())\nD = {}\nfor _ in range(N):\n S = input()\n if S not in D: D[S]=0\n D[S]+=1\n\nM = max(D.values())\nfor S in sorted(list(D)):\n if D[S]==M:\n print(S)\n\n\n\n']
['Runtime Error', 'Accepted']
['s570178413', 's777930339']
[3060.0, 33116.0]
[17.0, 684.0]
[110, 178]
p02773
u273262677
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
["\nr=[]\nimport sys\n\nn = int(sys.stdin.readline())\nsn = sys.stdin.read().split()\n\nd={}\nfor i in l:\n if i in d:\n d[i]+=1\n else:\n d[i]=1\n\nm = max(d.values())\nfor key,value in d.items():\n if value==m:\n r.append(key)\nsorted_r = sorted(r)\nprint(*sorted_r,sep='\\n')", "\nr=[]\nimport sys\n\nn = int(sys.stdin.readline())\nsn = sys.stdin.read().split()\n\nd={}\nfor i in l:\n if i in d:\n d[i]+=1\n else:\n d[i]=1\n\nm = max(d.values())\nfor key,value in d.items():\n if value==m:\n r.append(key)\nsorted_r = sorted(r)\nprint(*sorted_r,sep='\\n')", "from collections import Counter\nimport sys\nn = int(sys.stdin.readline())\nsn = sys.stdin.read().split()\nc = Counter(sn)\nnum = max(c.values())\nans = [i for i, j in c.items() if j == num]\nans.sort()\nprint('\\n'.join(ans))"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s077972117', 's432355163', 's694922283']
[19860.0, 19884.0, 38476.0]
[37.0, 37.0, 354.0]
[286, 286, 217]
p02773
u277104886
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\nn = int(input())\ns = list(input() for _ in range(n))\nls = Counter(s).most_common()\na = []\na.append(ls[0][0])\nfor i in range(1, len(ls)):\n if ls[i][1] == ls[0][1]:\n a.append(ls[i][0])\nfor i in a:\n print(i)', 'from collections import Counter\nn = int(input())\ns = list(input() for _ in range(n))\nls = Counter(s).most_common()\na = []\na.append(ls[0][0])\nfor i in range(1, len(ls)):\n if ls[i][1] == ls[0][1]:\n a.append(ls[i][0])\nfor i in sorted(a):\n print(i)']
['Wrong Answer', 'Accepted']
['s649915744', 's173616889']
[45052.0, 45052.0]
[606.0, 746.0]
[249, 257]
p02773
u281610856
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\ndict = {}\nmx = 0\nfor i in range(n):\n s = input()\n if s not in dict:\n dict[s] = 0\n dict[s] += 1\n mx = max(mx, dict[s])\nprint(dict)\nprint(mx)\nans = []\nfor s in dict:\n if dict[s] == mx:\n ans.append(s)\nans.sort()\nfor s in ans:\n print(s)', 'import collections\n\n\nN = int(input())\nS = [input() for _ in range(N)]\nc = collections.Counter(S)\nvalues, counts = zip(*c.most_common())\nans = []\nif len(values) == 1:\n ans.append(values[0])\nelse:\n for i in range(N):\n if counts[i] == counts[0]:\n ans.append(values[i])\n else:\n break\nans.sort()\nfor i in range(len(ans)):\n print(ans[i])']
['Wrong Answer', 'Accepted']
['s806108659', 's440270431']
[37844.0, 59504.0]
[806.0, 818.0]
[281, 376]
p02773
u281796054
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['import collections\nn = int(input())\nList = list()\nfor _ in range(n):\n List.append(input())\ns=collections.Counter(List)\ns_inv={v:k for k,v in s.items()}\nprint(s_inv[max(s.values())])', 'import collections\nn = int(input())\nl1 = list()\nfor i in range(n):\n l1.append(input())\nc = collections.Counter(l1)\nm = max(c.values())\nC = sorted(c.items())\nfor i in C:\n if i[1]==m:\n print(i[0])\n']
['Wrong Answer', 'Accepted']
['s708017134', 's931231321']
[35572.0, 46104.0]
[350.0, 821.0]
[182, 200]
p02773
u283285729
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input())\nb = {}\nfor i in range(n):\n temp = input()\n if temp not in b:\n b[temp] = 1\n else:\n b[temp] += 1\n\nlist1 = sorted(b.items(), key=lambda x: x[1])\nlist1.reverse()\n\na = 0\nlist2=[]\nwhile list1[0][1] == list1[a][1]:\n list2.append(list1[a][0])\n list2.sort()\n a += 1\n\nprint(list2)\n', 'n = int(input())\nb = {}\nfor i in range(n):\n temp = input()\n if temp not in b:\n b[temp] = 1\n else:\n b[temp] += 1\n\nlist1 = sorted(b.items(), key=lambda x: x[1])\nlist1.reverse()\n\na = 0\nlist2=[]\nwhile a<len(list1) and list1[0][1] == list1[a][1]:\n list2.append(list1[a][0])\n list2.sort()\n a += 1\n\nprint(list2)\n', 'n = int(input())\nb = {}\nfor i in range(n):\n temp = input()\n if temp not in b:\n b[temp] = 1\n else:\n b[temp] += 1\n\nlist1 = sorted(b.items(), key=lambda x: x[1])\n\na = len(list1)-1\ntemp = len(list1)-1\nlist2 = []\nwhile a >= 0 and list1[temp][1] == list1[a][1]:\n list2.append(list1[a][0])\n a -= 1\nlist2.sort()\n\nfor a in list2:\n print(a)\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s333045742', 's534943253', 's079941392']
[43228.0, 43228.0, 45788.0]
[2105.0, 2106.0, 762.0]
[320, 337, 363]
p02773
u284363684
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\n\n# input\nN = int(input())\nS = []\ns_append = S.append\n\nfor i in range(N):\n s = input()\n s_append(s)\n\n\ns_counter = Counter(S)\nmax = max(s_counter.values())\n\nprinted_items = []\nappend = printed_items.append\nfor i in s_counter.items():\n if s[1] == max and s[0] not in printed_items:\n print(s[0])\n append(s[0])', 'from collections import Counter\n\n# input\nN = int(input())\nS = []\nappend = S.append\n\nfor i in range(N):\n s = input()\n append(s)\n\n\ns_counter = Counter(S)\nmax = max(s_counter.values())\n\nfor i in s_counter.items():\n if s[1] == max:\n print(s[0])\n', 'from collections import Counter\n\n# input\nN = int(input())\nS = []\ns_append = S.append\n\nfor i in range(N):\n s = input()\n s_append(s)\n\n\ns_counter = Counter(S)\nmax = max(s_counter.values())\n\nprinted_items = []\nappend = printed_items.append\nmax_s = [s[0] for s in s_counter.items() if s[1] == max]\nfor i in sorted([s for s in S if s in max_s]):\n print(i)', 'from collections import Counter\n\n# input\nN = int(input())\nS = []\ns_append = S.append\n\nfor i in range(N):\n s = input()\n s_append(s)\n\n\ns_counter = Counter(S)\nmax = max(s_counter.values())\n\nprinted_items = []\nappend = printed_items.append\nfor i in [s[0] for s in s_counter.items() if s[1] == max]:\n print(i)', 'from collections import Counter\n\n# input\nN = int(input())\nS = []\ns_append = S.append\n\nfor i in range(N):\n s = input()\n s_append(s)\n\n\ns_counter = Counter(S)\nmax = max(s_counter.values())\n\nprinted_items = []\nappend = printed_items.append\nfor i in s_counter.items():\n if i[1] == max and i[0] not in printed_items:\n print(i[0])\n append(i[0])', 'from collections import Counter\n\n# input\nN = int(input())\nS = []\ns_append = S.append\n\nfor i in range(N):\n s = input()\n s_append(s)\n\n\ns_counter = Counter(S)\nmax = max(s_counter.values())\n\nprinted_items = []\nappend = printed_items.append\nmax_s = [s[0] for s in s_counter.items() if s[1] == max]\nfor i in [s for s in S if s in max_s]:\n print(i)', 'from collections import Counter\n\n# input\nN = int(input())\nS = []\ns_append = S.append\n\nfor i in range(N):\n s = input()\n s_append(s)\n\n\ns_counter = Counter(S)\nmax = max(s_counter.values())\n\nprinted_items = []\nappend = printed_items.append\nmax_s = [s[0] for s in s_counter.items() if s[1] == max]\nfor i in sorted(max_s):\n print(i)\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s326275328', 's412067627', 's572789336', 's631711682', 's679737505', 's769182986', 's060979046']
[35572.0, 35568.0, 35572.0, 35572.0, 35572.0, 35568.0, 35568.0]
[368.0, 356.0, 2105.0, 465.0, 2105.0, 2105.0, 691.0]
[367, 264, 365, 320, 367, 357, 343]
p02773
u288001809
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['case = int(input())\nl = [""] * case\nfor i in range(case):\n l[i] = input()\n\nfor str in sorted(set(l)):\n print(str)', 'case = int(input())\nl = [""] * case\nfor i in range(case):\n l[i] = input()\n\nfor str in set(l):\n print(str)', 'import collections\n\ncase = int(input())\nl = [""] * case\nfor i in range(case):\n l[i] = input()\n\nc = collections.Counter(l)\n\nvalues, counts = zip(*c.most_common())\ncnt = 0\nfor i in range(len(counts)):\n str = values[i]\n if cnt < counts[i]:\n cnt = counts[i]\n print(str)\n elif cnt == counts[i]:\n print(str)\n else:\n break\n ', 'import collections\n\ncase = int(input())\nl = [""] * case\nfor i in range(case):\n l[i] = input()\n\nc = collections.Counter(l)\n\nvalues, counts = zip(*c.most_common())\nvalues = sorted(values)\ncnt = 0\nfor i in range(len(counts)):\n str = values[i]\n if cnt < counts[i]:\n cnt = counts[i]\n print(str)\n elif cnt == counts[i]:\n print(str)\n else:\n break\n ', 'import collections\n\ncase = int(input())\nl = [""] * case\nfor i in range(case):\n l[i] = input()\n\nc = collections.Counter(l)\n\nvalues, counts = zip(*c.most_common())\ncnt = 0\nstr_list = []\nfor i in range(len(counts)):\n if cnt < counts[i]:\n cnt = counts[i]\n str_list.append(values[i])\n elif cnt == counts[i]:\n str_list.append(values[i])\n else:\n break\n\nstr_list = sorted(str_list)\nfor tar_str in str_list:\n print(tar_str)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s057729290', 's553340582', 's556390611', 's586621493', 's814674489']
[28904.0, 28904.0, 59484.0, 59488.0, 59492.0]
[575.0, 410.0, 714.0, 953.0, 945.0]
[115, 107, 337, 361, 431]
p02773
u289102924
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['from collections import Counter\nn = int(input())\ns = []\nans = []\n\nfor i in range(n):\n s.append(input())\n\nc = Counter(s)\nc_s = c.most_common()\nm = c.most_common()[0][1]\nprint(c_s)\nprint(m)\n\nfor j in range(len(c_s)):\n if c_s[j][1] != m:\n break\n else:\n ans.append(c_s[j][0])\n\nans.sort()\nfor t in ans:\n print(t)', 'from collections import Counter\nn = int(input())\ns = []\nans = []\n\nfor i in range(n):\n s.append(input())\n\nc = Counter(s)\nc_s = c.most_common()\nm = c.most_common()[0][1]\n\nfor j in range(len(c_s)):\n if c_s[j][1] != m:\n break\n else:\n ans.append(c_s[j][0])\n\nans.sort()\nfor t in ans:\n print(t)']
['Wrong Answer', 'Accepted']
['s220316385', 's714468063']
[59376.0, 59376.0]
[920.0, 829.0]
[333, 313]
p02773
u291988695
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['i=int(input())\nl=[""]*i\nfor k in range(i):\n l[k]=input()\nl.sort()\nmaxi=0\nkosu=0\nfor k in l:\n kosu+=1\n if kosu=maxi:\n li.append(k)\n elif kosu>maxi:\n li.clear()\n li.append(k)\nprint(*li)', 'i=int(input())\nl=[""]*i\nfor k in range(i):\n l[k]=input()\nl.sort()\nmaxi=0\nkosu=0\nli=[]\nsubk=""\nfor k in l:\n if subk!=k:\n kosu=0\n subk=k\n kosu+=1\n if kosu==maxi:\n li.append(k)\n elif kosu>maxi:\n li.clear()\n li.append(k)\n maxi=kosu\nfor k in li:\n print(k)']
['Runtime Error', 'Accepted']
['s903024223', 's878162470']
[2940.0, 20636.0]
[17.0, 646.0]
[196, 274]
p02773
u293838812
2,000
1,048,576
We have N voting papers. The i-th vote (1 \leq i \leq N) has the string S_i written on it. Print all strings that are written on the most number of votes, in lexicographical order.
['n = int(input().rstrip())\n \ncurrent_max = 0\ncurrent = []\ntable = {}\n \nfor i in range(n):\n s = input().rstrip()\n table[s] = table[s] + 1 if table.get(s) is not None else 0\n if table[s] > current_max:\n current = [s]\n current_max = table[s]\n elif table[s] == current_max:\n current.append(s)\n else:\n continue\n \nscore_sorted = sorted(table.items(), key=lambda x:-x[1])\n\nmax = 0\nresults = []\nfor k, v in score_sorted:\n if max > v:\n break\n results.append(k)\n\nresults.sort()\n\nfor word in results:\n print(word)', 'n = int(input().rstrip())\n \ncurrent_max = 0\ncurrent = []\ntable = {}\n \nfor i in range(n):\n s = input().rstrip()\n table[s] = table[s] + 1 if table.get(s) is not None else 0\n if table[s] > current_max:\n current = [s]\n current_max = table[s]\n elif table[s] == current_max:\n current.append(s)\n else:\n continue\n \nscore_sorted = sorted(table.items(), key=lambda x:-x[1])\n\nmax = 0\nfor k, v in score_sorted:\n if max > v:\n break\n max = v\n print(k)', 'n = int(input().rstrip())\n \ncurrent_max = 0\ncurrent = []\ntable = {}\n \nfor i in range(n):\n s = input().rstrip()\n table[s] = table[s] + 1 if table.get(s) is not None else 1\n \nscore_sorted = sorted(table.items(), key=lambda x:-x[1])\n\nmax = 0\nresults = []\nfor k, v in score_sorted:\n if max > v:\n break\n max = v\n results.append(k)\n\nresults.sort()\n\nfor word in results:\n print(word)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s739675877', 's884573206', 's323082017']
[47364.0, 46468.0, 45788.0]
[860.0, 679.0, 740.0]
[556, 494, 397]