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
u614215819
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\nstrlist = []\nN = int(input())\nfor i in range(N):\n strlist.append(str(input()))\nc = collections.Counter(strlist)\np = max(c.values())\nfor i in c.most_common():\n if i[1] == p:\n print(i[0])', 'import collections\nstrlist = []\nanswer = []\nN = int(input())\nfor i in range(N):\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s232773345', 's979275668', 's011679899']
[46892.0, 47068.0, 37488.0]
[601.0, 804.0, 599.0]
[217, 257, 239]
p02773
u616382321
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 _ in range(N)]\n\ncnt = collections.Counter(S)\nmax_cnt = max(cnt.values())\n\nans_list = []\n\nfor key, value in cnt.items():\n print(key, value)\n if value == max_cnt:\n ans_list.append(key)\n\nprint(*sorted(ans_list), sep='\\n')\n\n", "import co...
['Wrong Answer', 'Accepted']
['s842331891', 's913446972']
[38888.0, 38908.0]
[497.0, 399.0]
[287, 265]
p02773
u616542081
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 = []\n\nfor i in range(N):\n S.append(input())\n\nset_S = list(set(S))\nans = []\nmax_cnt = 0\nfor i in range(len(set_S)):\n cnt = 0\n for j in range(N):\n if set_S[i] == S[j]:\n cnt += 1\n if max_cnt < cnt:\n temp = [set_S[i],cnt]\n ans.append(temp)\n\nans_f = []\n\nfor i in r...
['Wrong Answer', 'Accepted']
['s532706111', 's673742123']
[35520.0, 35388.0]
[2206.0, 425.0]
[430, 183]
p02773
u617225232
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.
["# -*- coding: utf-8 -*-\nfrom collections import Counter\n# input\nn = int(input())\ns = []\nfor i in range(n):\n s.append(input())\nc = Counter(s)\n# output\n#ma = c.most_common()[0][1]\no = list(k for k, v in s.items() if v == s.most_common()[0][1])\n\no.sort()\nprint('\\n'.join(o))\n", "# -*- coding: utf-8 -*-\...
['Runtime Error', 'Accepted']
['s648174944', 's629258620']
[35576.0, 45040.0]
[307.0, 682.0]
[316, 352]
p02773
u619084943
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())\np = [input() for i in range(n)]\n\nc = collections.Counter(p)\nm = c.most_common()\nmost = m[0][1]\n\nanswer = []\n\nanswer.append(m[0][0])\n\nfor i in range(len(m)-1):\n if m[i+1][1] == most:\n answer.append(m[i+1][0])\n else:\n break\n\nfor output in sorte...
['Runtime Error', 'Runtime Error', 'Accepted']
['s422407909', 's776089462', 's581940165']
[3064.0, 17052.0, 49204.0]
[17.0, 274.0, 723.0]
[334, 307, 327]
p02773
u620238824
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(input() for i in range(N)) \n\nA = {}\nfor i in S:\n A.setdefault(i, 1)\n A[i] += 1\n\nB = max(A.values())\nC = [i for i in A if A[i] == B]\nC = sorted(C)\nprint(C)', 'N = int(input())\nS = list(input() for i in range(N)) \nS = sorted(S)\n\nimport collections\nA = collections.Counte...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s391176411', 's897892917', 's727088414']
[38936.0, 38452.0, 35604.0]
[593.0, 2105.0, 722.0]
[227, 243, 241]
p02773
u620846115
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 i in range(N)]\nc=collections.Counter(s)\nmax_c_list = [kv[0] for kv in c.items() if kv[1] == max(c.values())]\nprint(sorted(max_c_list))', 'import collections\nN=int(input())\ns=[str(input()) for i in range(N)]\nc=collections.Counter(s)\nmaximum =max(c.values()...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s318593235', 's864447684', 's409673963']
[38868.0, 38780.0, 38552.0]
[2206.0, 289.0, 429.0]
[188, 224, 223]
p02773
u622847899
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\n\n\ncount={}\nfor i in range(n):\n if s[i] not in count:\n count[s[i]] = 1\n else:\n count[s[i]] += 1\n\nans = [k for k,v in count.items() if v == max(count.values())]\nfor i in range(len(ans)):\n print(ans[i])\n', 'n=int(input())\ns=[input() for...
['Wrong Answer', 'Accepted']
['s163847841', 's234218075']
[35220.0, 35336.0]
[2105.0, 700.0]
[269, 361]
p02773
u624613992
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)]\nword = collections.Counter(s)\nword = word.most_common()\nmax_num = word[0][1]\nfor i in range(len(word)):\n if word[i][1] == max_num:\n print(word[i][0])\n else:\n exit()', 'import collections\nn = int(input())\ns = [input() f...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s055781272', 's070875867', 's183037912', 's759671763']
[45044.0, 45040.0, 45040.0, 45084.0]
[533.0, 825.0, 893.0, 1100.0]
[252, 264, 239, 224]
p02773
u624617831
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\ndef main():\n n = int(input())\n\n s_list = []\n\n for i in range(n):\n s = str(input())\n s_list.append(s)\n\n c = collections.Counter(s_list)\n c_list = c.most_common()\n\n print_count = len(c_list)\n for j in range(len(c_list)-1):\n if c_list[j+1][1] ...
['Wrong Answer', 'Accepted']
['s699261065', 's570749358']
[46888.0, 49208.0]
[594.0, 751.0]
[477, 592]
p02773
u627803856
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)]\nd={}\nfor i in range(n):\n d[s[i]] = d.get(s[i],0) + 1\n\nmax_k_list = [kv[0] for kv in d.items() if kv[1] == max(d.values())]\nmax_k_list.sort()\nprint(*max_k_list)', 'n = int(input())\nd = {}\nfor _ in range(n):\n s = input()\n d[s] = d.get(s, 0) + 1\n\nsorted_d...
['Time Limit Exceeded', 'Accepted']
['s586833787', 's500906671']
[35220.0, 45788.0]
[2105.0, 771.0]
[205, 331]
p02773
u628581330
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(input().split())\ndic ={}\nfor key in s:\n if key not in dic:\n count = 1\n dic[key] = count\n count = count+1\nres = sorted(list(filter(lambda key:dic[key]==max(dic.values()),list(dic))))\nfor key in res:\n print(key)', 'n = int(input())\ndic ={}\nfor i in range(n):\n ...
['Wrong Answer', 'Accepted']
['s509051700', 's824497464']
[3060.0, 33112.0]
[17.0, 831.0]
[254, 268]
p02773
u629560745
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())\ndic = {}\ns = []\nfor _ in range(N):\n s.append(input())\n\nfor i in s:\n if i in dic.keys():\n dic[i] += 1\n else:\n dic[i] = 1\nresult = []\nnum = 0\nfor i in dic.keys():\n if dic[i] > num:\n result = []\n result.append(i)\n num = dic[i]\n elif dic[...
['Wrong Answer', 'Accepted']
['s092574700', 's345349432']
[35216.0, 35216.0]
[523.0, 708.0]
[365, 379]
p02773
u629607744
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 i():\n\treturn int(input())\ndef i2():\n\treturn map(int,input().split())\ndef s():\n\treturn str(input())\ndef l():\n\treturn list(input())\ndef intl():\n\treturn list(int(k) for k in input().split())\n\nn = i()\n#s = {s():0 for _ in range(n)}\n\na = {}\nfor i in range(n):\n\ts = input()\n\ttry:\n\t\ta[s] += 1\n...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s226762979', 's678662346', 's936280653']
[51564.0, 4656.0, 48836.0]
[664.0, 2104.0, 563.0]
[520, 137, 534]
p02773
u630554891
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 = []\nmax = 0\n\nfor i in range(n):\n s.append(input())\n\nc = collections.Counter(s)\n\nfor i in c.items():\n if i[1] > max:\n max = i[1]\n\ns2 = [i[0] for i in c.items() if i[1] == max]\n\nfor j in range(len(s2)):\n print(s2[j])', 'import collections\n\nn=int(...
['Wrong Answer', 'Accepted']
['s050320339', 's900820609']
[35572.0, 35572.0]
[596.0, 727.0]
[268, 281]
p02773
u631525844
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\nnum = int(input())\nvalue = [input() for i in range(num)]\nvotes = Counter(value)\ndict = {}\n\nfor value in votes.values():\n dict[value] = []\n\nfor (key, value) in votes.iteritems():\n dict[value].append(key)\nmaxVote = sorted(dict.keys(), reverse=True)[0]\nif len(dict[maxVot...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s531622135', 's944340690', 's800149689']
[35568.0, 35572.0, 35564.0]
[335.0, 529.0, 628.0]
[384, 399, 359]
p02773
u634079249
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\nimport os\nimport math\n\nii = lambda: int(sys.stdin.buffer.readline().rstrip())\nil = lambda: list(map(int, sys.stdin.buffer.readline().split()))\nfl = lambda: list(map(float, sys.stdin.buffer.readline().split()))\niln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]\n\niss = lam...
['Wrong Answer', 'Accepted']
['s950942575', 's203593863']
[32100.0, 35608.0]
[327.0, 643.0]
[911, 973]
p02773
u639340617
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 = collections.Counter(s)\ncommon = c.most_common()\n\ncount = common[0][1]\n\nfor i in common:\n if i[1] == count:\n print(i[0])\n else:\n break\n \n', "from collections import Counter\n\nn = int(input())\ns = [input() for i in rang...
['Wrong Answer', 'Accepted']
['s599864276', 's779429164']
[46860.0, 45028.0]
[508.0, 732.0]
[219, 343]
p02773
u639592190
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 \nS_set = list(set(S))\nS_dic = {}\nM = 0\nfor s in S_set:\n S_dic[s] = S.count(s)\n M = max(M, S.count(s))\n \nS_dic_sorted = sorted(S_dic.items(), key=lambda x: x[0])\nfor l in S_dic_sorted:\n if l[1] == M:\n print(l[0])\n else...
['Wrong Answer', 'Accepted']
['s373344018', 's982721616']
[29076.0, 45040.0]
[2105.0, 928.0]
[315, 266]
p02773
u644546699
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\ndef resolve():\n N = int(input())\n S_list = []\n for i in range(N):\n S_list.append(input())\n \n cc = collections.Counter(S_list)\n cc_list = cc.most_common()\n\n for i in cc_list:\n print(i[0])\n\n\nif __name__ == "__main__":\n resolve()', 'import collect...
['Wrong Answer', 'Accepted']
['s593061576', 's280739404']
[46868.0, 49232.0]
[501.0, 680.0]
[284, 498]
p02773
u649460320
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.
["if __name__ == '__main__':\n dic = dict()\n n = int(input())\n for i in range(n):\n val = input()\n if val in dic.keys():\n dic[val]+=1\n else:\n dic[val] = 1\n max_keys = max(dic.values())\n values_of_max_key = [val for val in dic if dic[val] == max_keys]\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s506427051', 's762105055', 's796930997', 's497212318']
[32096.0, 32096.0, 32096.0, 32988.0]
[501.0, 532.0, 516.0, 662.0]
[353, 367, 353, 431]
p02773
u652569315
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())\nl=[input() for i in range(n)]\nc = collections.Counter(l)\nll=len(c)\nfor i in range(ll):\n print(c.most_common()[i][0])\n\n', 'n=int(input())\nl=[input() for i in range(n)]\nl.sort()\nll=list(set(l))\nll.sort()\nm=len(ll)\nans=[0]*m\ncount=0\nj=0\nfor i in range(len(l)-1):\n if ...
['Wrong Answer', 'Accepted']
['s349859815', 's454542314']
[45040.0, 29628.0]
[2106.0, 807.0]
[153, 319]
p02773
u652656291
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\nmax_d = max(d.values())\nans = sorted([a[0] for i in d.items() if a[1] == max_d])\nprint(ans)', "n = int(input())\nd = {}\nfor _ in range(n):\n s = input()\n if s in d:\n d[s] =...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s152477984', 's233610145', 's337828921', 's822260234', 's938906104', 's624004115']
[32096.0, 34012.0, 32096.0, 3060.0, 37464.0, 35220.0]
[338.0, 603.0, 345.0, 18.0, 570.0, 702.0]
[210, 229, 216, 317, 215, 286]
p02773
u653971946
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\nimport sys\n\nN = int(input())\nS = [input() for _ in range(N)]\n# print(S)\n\nc = collections.Counter(S)\n# print(c.most_common())\n\noutputs = []\nfor i, (key, value) in enumerate(c.most_common()):\n outputs.append(key)\n if not (i == len(c.most_common())-1 and c.most_common()[i+1][1] == v...
['Runtime Error', 'Accepted']
['s745681258', 's850365278']
[59368.0, 20676.0]
[476.0, 585.0]
[371, 504]
p02773
u655663334
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\nd = {}\n\nfor i in range(N):\n s = input()\n if s in d:\n d[s] = d[s] + 1\n else:\n d[s] = 1\n\nhoge = max(d.values)\n\nmax_kv_list = [kv[0] for kv in d.items() if kv[1] == hoge]\n\nmax_kv_list = sorted(max_kv_list)\nfor ans in max_kv_list:\n print(ans)', 'N = int(input()...
['Runtime Error', 'Accepted']
['s707363665', 's189826256']
[32096.0, 33112.0]
[356.0, 658.0]
[282, 284]
p02773
u658325491
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)]\nc = collections.Counter(s)\n\n\nprint(c.most_common()[0][0])\nfor i in range(1, len(c)):\n if c.most_common()[i][1] == c.most_common()[i-1][1]:\n print(c.most_common()[i][0])\n else:\n break\n', 'n = int(input())\n\nd = {}\nf...
['Wrong Answer', 'Accepted']
['s657046074', 's621972956']
[45164.0, 32096.0]
[2105.0, 641.0]
[272, 255]
p02773
u658987783
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())\nx={}\n\ncount=0\nfor i in range(n):\n s=input()\n if s in x:\n x[s]+=1\n else:\n x[s]=1\na=max(x.values())\nanswer=sorted(x)\nfor a in answer:\n print(a)\n\n', 'n=int(input())\nx={}\n\ncount=0\nfor i in range(n):\n s=input()\n if s in x:\n x[s]+=1\n else:\n x[s]=1\n\na=max(x.values(...
['Wrong Answer', 'Accepted']
['s816855511', 's564593135']
[32096.0, 32988.0]
[582.0, 653.0]
[168, 213]
p02773
u661439250
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())\ns = []\nfor i in range(n):\n s.append(input())\nans = {}\nfor i in s:\n if i in ans:\n ans[i] += 1\n else:\n ans[i] = 1\nprint(ans)\nans2 = sorted(ans.items(), key=lambda x:x[1], reverse=True)\nprint(ans2)\nans_list = {ans2[0][0]}\nans_cnt = ans2[0][1]\nfor i, j in ans2:\n ...
['Wrong Answer', 'Accepted']
['s832844197', 's186547688']
[69388.0, 60020.0]
[971.0, 749.0]
[434, 410]
p02773
u661580140
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\nsetted_S = set(S)\ncounted_S = collections.Counter(S)\n\nans_ls = []\nfor k, v in counted_S.items():\n if v == max(counted_S.values()):\n ans_ls.append(k)\n else:\n break\n\nans_ls.sort()\n\nfor i in ans_ls:\n print(i)',...
['Wrong Answer', 'Accepted']
['s797003976', 's583417756']
[49776.0, 58096.0]
[2105.0, 797.0]
[298, 364]
p02773
u663438907
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 \nfrom collections import Counter\nN = int(input())\nS = []\nfor i in range(N):\n S.append(str(input()))\nans_list = []\n \n\nc = Counter(S)\nkeys, values = zip(*c.most_common())\n\nfor i in range(len(values)):\n if max(values) == values[i]:...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s735936818', 's783718701', 's758522477']
[17308.0, 59500.0, 47636.0]
[344.0, 2105.0, 977.0]
[406, 335, 276]
p02773
u666195238
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 = {}\nfor i in range(n):\n a = input()\n if (not (a in list)):\n dict[a] = 0\n else:\n dict[a] += 1\nb = max(dict.values())\nfor i in dict.keys():\n if dict[i] == b:\n print(i+"\\n")\n ', 'n = int(input())\ndict = {}\nfor i in range(n):\n a = input()\n if (not (a in dict.keys())...
['Runtime Error', 'Accepted']
['s903635936', 's945431293']
[3060.0, 32096.0]
[17.0, 706.0]
[209, 262]
p02773
u671239754
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\nfrom collections import Counter\nn=int(input())\nstring_list=[input() for i in range(n)]\nc = collections.Counter(string_list)\nmax = c.most_common()[0][1]\nfor i in c.items():\n if i[1] == max:\n print(i[0])\n', 'import collections\nfrom collections import Counter\nn=int(input())\nstrin...
['Wrong Answer', 'Accepted']
['s579712582', 's148973443']
[45032.0, 45028.0]
[541.0, 745.0]
[231, 303]
p02773
u672316981
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_lst = [str(input()) for i in range(n)]\ns_lst.sort()\n\ncount_lst = []\ncount = 1\n\nif n==1:\n count_lst.append(1)\nelse:\n for i in range(1,n):\n s1 = s_lst[i-1]\n s2 = s_lst[i]\n\n if s1==s2:\n count += 1\n if i==n-1:\n count_lst.a...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s157822904', 's943434477', 's637492019']
[31164.0, 31172.0, 31172.0]
[943.0, 934.0, 1015.0]
[741, 701, 757]
p02773
u672882146
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\nn=int(input())\ns = []\nfor _ in range(n):\n s.append(input())\n#print(s)\n#s = list(itertools.chain.from_iterable(s))\n#print(s)\ns_u = list(set(s))\nbox = []\nbox.append([s_u[0],s.count(s_u[0])])\nfor i in range(1,len(s_u)):\n if max(box) < s.count(s_u[i]):\n box.remove(max(box))\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s245527483', 's994258538', 's863431581']
[29096.0, 2940.0, 32988.0]
[324.0, 17.0, 781.0]
[515, 282, 305]
p02773
u673361376
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_s = {}\nfor _ in range(N):\n s = input()\n if s in cnt_s:\n cnt_s[s] += 1\n else:\n cnt_s[s] - 1\n \nmax_cnt = max(cnt_s.values())\n\nans = []\nfor key, value in cnt_s.items():\n if value == max_cnt:\n ans.append(key)\n \n[print(s) for s in sorted(ans)]', 'N = int(input())\ncnt_s ...
['Runtime Error', 'Accepted']
['s310909113', 's933107197']
[3064.0, 34012.0]
[17.0, 662.0]
[274, 275]
p02773
u674588203
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=[]\n\nfor _ in range(N):\n s=input()\n S.append(s)\n\nc=Counter(S)\n\nmax_s_list= [kv[0] for kv in c.items() if kv[1]==max(c.values())]\n\nans=sorted(max_s_list)\nfor a in max_s_list:\n print(a)', 'from collections import OrderedDict\n\nN=int(input())\nS=[...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s211407196', 's459403936', 's484436713', 's611880944', 's695615023', 's290796564']
[35564.0, 19688.0, 3956.0, 35568.0, 29076.0, 49228.0]
[2105.0, 415.0, 2104.0, 2105.0, 2105.0, 731.0]
[241, 234, 351, 216, 451, 317]
p02773
u677121387
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 = max(c.values())\nans = sorted(k for k,v in c.items() if v == m)\nprint(ans)', 'from collections import Counter\nn = int(input())\ns = [input() for _ in range(n)]\nc = Counter(s)\nm = max(c.values())\nans = sorted(k...
['Wrong Answer', 'Accepted']
['s642301409', 's902653253']
[37744.0, 35952.0]
[529.0, 501.0]
[173, 184]
p02773
u677523557
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\nfrom collections import Counter\n\nN = int(input())\nSs = Counter([input().rstrip() for _ in range(N)])\nm = max(Ss.values())\nfor k, v in Ss.items():\n if v == m:\n print(k)', 'import sys\ninput = sys.stdin.readline\nfrom collections import Counter\n\nN = int(input()...
['Wrong Answer', 'Accepted']
['s217474646', 's818199013']
[35564.0, 35572.0]
[278.0, 425.0]
[215, 262]
p02773
u678167152
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 = input()\n if S in s_list:\n s_list[S] += 1\n else:\n s_list[S] = 0\nmax = 0\nmaxs = []\nfor s,c in s_list.items():\n if c > max:\n maxs = [s]\n max = c\n elif c == max:\n maxs.append(s)\nfor m in maxs:\n print(m)', "from collections import C...
['Wrong Answer', 'Accepted']
['s425786339', 's953043553']
[32096.0, 38716.0]
[506.0, 392.0]
[272, 255]
p02773
u680851063
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())\nl = [input() for _ in [0] * n]\n\ncounted = collections.Counter(l)\nprint(counted)\n\n\nm = max(counted.values())\nprint(m)\n\n\nchars = [key for key, value in counted.items()\n if value == m]\n\n#chars = []\n#for key, value in counted.items():\n# if value == m:\...
['Wrong Answer', 'Accepted']
['s928440848', 's689987605']
[58668.0, 35936.0]
[755.0, 592.0]
[414, 274]
p02773
u681811488
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\nimport itertools\n\na = int(input())\n\ns = [input() for i in range(a)]\n\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\nl = []\n\nfor k, v in it:\n l.append(k)\n\nl = ' '.join(l)\...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s296067867', 's358593771', 's913133461', 's897534108']
[45032.0, 45296.0, 45040.0, 45040.0]
[523.0, 607.0, 719.0, 805.0]
[307, 271, 304, 322]
p02773
u684906944
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_dic = dict()\n\nfor i in range(n):\n s = input()\n if s not in s_dic:\n s_dic[s] = 1\n else:\n s_dic[s] += 1\n\n\ns_dic_s = sorted(s_dic.items(), key= lambda x:x[1], reverse=True)\n\n# print(len(s_dic_s))\n\nm_count = max(s_dic_s)[1]\n# print(m_count)\n\nfor i in range(len(s_dic_s)):\n ...
['Wrong Answer', 'Accepted']
['s624763913', 's174754795']
[44892.0, 70756.0]
[614.0, 1063.0]
[386, 641]
p02773
u686989171
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())\nstring_list=[input() for i in range(n)]\nimport collections\nimport numpy as np\nc = collections.Counter(string_list)\nd=c.most_common()\nx=int(d[0][1])\nz=[]\nfor i in range(len(d)):\n y=int(d[i][1])\n if x==y:\n z.append(str(d[i][0]))\n \nz.sort(reverse=True)\nfor i in range(len(z)):\n prin...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s940861073', 's996283320', 's849227360']
[56336.0, 55568.0, 56360.0]
[1043.0, 715.0, 925.0]
[310, 238, 298]
p02773
u687574784
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())\nfrom collections import defaultdict\nd=defaultdict(int)\nfor _ in range(n):\n d[input()]+=1\n\nL=[(v,k) for (k,v) in d.items()]\nL.sort(reverse=True)\nmax_cnt=L[0][0]\n#print('*'*30)\nans=[]\nfor l in L:\n if l[0]==max_cnt:\n ans.append(l[1])\n else :\n break\n\nfor a in ans:\...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s137875748', 's715860185', 's610952456']
[181592.0, 45472.0, 33404.0]
[2106.0, 978.0, 797.0]
[315, 313, 246]
p02773
u690781906
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\ncounter = Counter(s)\nindex = 0\nans = []\nfor k, v in counter.most_common():\n if index == 0:\n max_v = v\n ans.append(k)\n else:\n if v == max_v:\n ans.append(k)\n else:\n ...
['Wrong Answer', 'Accepted']
['s340220017', 's909514935']
[45040.0, 45040.0]
[806.0, 809.0]
[386, 385]
p02773
u690833702
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 collections\n\ndef main():\n N = int(input())\n S = list()\n S = [input() for _ in range(N)]\n \n s = collections.counter(S)\n \n MaxCount = max(s.values())\n \n ans = []\n \n for key, value in s.items():\n if value == MaxCount:\n ans.append(key)\n \n ans.sort()...
['Runtime Error', 'Accepted']
['s153109257', 's465310015']
[23512.0, 38780.0]
[234.0, 420.0]
[356, 352]
p02773
u691225483
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())\ndic = {}\nfor _ in range(n):\n k = input()\n dic[k] = 1 if k not in dic else dic[k] + 1\nresult = []\nfor i,j in dic.items():\n result.append((j,i))\n result.sort()\n maxi = result[-1][0]\n reresult=[]\n for i in result:\n if maxi == i[0]:\n reresult.append(i[1])\n for i in sorte...
['Wrong Answer', 'Accepted']
['s455356780', 's140800128']
[59476.0, 32096.0]
[2104.0, 695.0]
[333, 261]
p02773
u692453235
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\nN = int(input())\nS_dic = defaultdict(int)\n\nfor i in range(N):\n S = input()\n S_dic[S] += 1\n\nm = max(S_dic.values())\nmax_S = [i[0] for i in S_dic.items() if i[1] == m ]\nprint("\\n".join(max_S))', 'from collections import defaultdict\n\nN = int(input())\nS_dic = defaultd...
['Wrong Answer', 'Accepted']
['s206264870', 's415968081']
[34396.0, 34384.0]
[486.0, 656.0]
[229, 242]
p02773
u692746605
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())\nC=collections.Counter([input() for _ in range(N)])\nv,c=zip(*C.most_common())\nprint(v[0])\nfor i in range(1,len(v)):\n if c[0]!=c[i]:\n break\n print(v[i])\n', 'import collections\n\nN=int(input())\nC=collections.Counter([input() for _ in range(N)])\nv,c=zip(*C.most_common(...
['Wrong Answer', 'Accepted']
['s319697353', 's765445450']
[57940.0, 57932.0]
[611.0, 770.0]
[191, 184]
p02773
u693134887
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.
['for _ in range(n):\n s += input()+" "\nls = s.split()\ncounter = 0\nres = []\nfor x in ls:\n if ls.count(x) > counter:\n counter = ls.count(x)\nfor x in set(ls):\n if ls.count(x) == counter:\n res.append(x)\nr = sorted(res)\nprint("\\n".join(r))', 'from collections import Counter\nn = int(input...
['Runtime Error', 'Accepted']
['s455046696', 's945515364']
[3064.0, 45040.0]
[18.0, 623.0]
[255, 246]
p02773
u693173434
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\nvote = {}\nfor i in range(n):\n if s[i] in vote:\n vote[s[i]] +=1\n else:\n vote[s[i]] = 1\nmax_kv_list = [kv[0] for kv in vote.items() if kv[1] == max(vote.values())]\nmax_kv_list.sort()\n\nprint('¥n'.join(max_kv_list))", 'from collections impo...
['Wrong Answer', 'Accepted']
['s166073089', 's641754959']
[35220.0, 32480.0]
[2105.0, 755.0]
[282, 277]
p02773
u693933222
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())\n\nl = []\n\nfor i in range(n):\n l.append(input())\nc = collections.Counter(l)\ncx = c.most_common()\nnm = cx[0][1]\nprint(cx[0][0])\nfor i in range(1, len(cx)):\n if (nm == cx[i][1]):\n print(cx[i][0])\n else:\n break', 'import collections\n\nn = int(inp...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s257257433', 's789683332', 's719404377']
[46864.0, 46888.0, 49240.0]
[679.0, 585.0, 888.0]
[265, 240, 349]
p02773
u694665829
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.
["box={}\nn=int(input())\nfor i in range(n):\n v=input()\n if v in box:\n box[v]+=1\n else:\n box[v]=1\nm=max(box.values())\nf=[k for k,v in box.items() if v==m]\nprint('\\n'.join(f))", "box={}\nn=int(input())\nfor i in range(n):\n v=input()\n if v in box:\n box[v]+=1\n else:\n ...
['Wrong Answer', 'Accepted']
['s156942751', 's081730332']
[36836.0, 36692.0]
[306.0, 392.0]
[193, 202]
p02773
u695644361
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=Counter([input()for _ in[0]*n])\nm=s.most_common(1)[0][1]\nr=(k for k,v in s.items() if v==m)\nfor a in r:print(a)', 'from collections import Counter\nn=int(input())\ns=Counter([input()for _ in[0]*n])\nm=s.most_common(1)[0][1]\nr=sorted((k for k,v in s.items() if v==...
['Wrong Answer', 'Accepted']
['s282771433', 's881735147']
[41208.0, 41204.0]
[339.0, 422.0]
[160, 168]
p02773
u697386253
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\nimport itertools\nn = int(input())\ns = list(input() for i in range(n))\ns.sort()\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)\nprint(it)', 'import collections\nn = int(input())\ns =...
['Wrong Answer', 'Accepted']
['s069108076', 's942524006']
[45076.0, 35580.0]
[687.0, 670.0]
[262, 267]
p02773
u698197687
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\ndef words_sort_ordered(words_list):\n cnt = Counter()\n for word in words_list:\n cnt[word] += 1\n\n written_words_number = []\n for x in cnt.values():\n written_words_number.append(x)\n\n answer_words_list = []\n\n for word, number in dict(cnt).ite...
['Wrong Answer', 'Accepted']
['s860024813', 's212691729']
[43492.0, 43120.0]
[2105.0, 727.0]
[591, 697]
p02773
u699944218
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)]\ncount = 0\nfor i in range(n-1):\n for j in range(n-1-i):\n if S[i] == S[j]:\n count += 1\nprint(count)', 'from collections import Counter\nN = int(input())\nA = [None for i in range(N)]\nfor i in range(N):\n A[i] = input()\nA = Counter(A)\nkeyA = list(A.key...
['Wrong Answer', 'Accepted']
['s163376957', 's969141361']
[17056.0, 37312.0]
[2108.0, 752.0]
[155, 406]
p02773
u703823201
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 n in range(N)]\n\ncnt = collections.Counter(S)\nm = max(cnt.values())\n\nfor k, v in dict(sorted(cnt.items())):\n if v == m:\n print(k)', 'import collections\nN = int(input())\nS = [input() for n in range(N)]\n\ncnt = collections.Counter(S)\nm = max(cnt...
['Runtime Error', 'Accepted']
['s975067815', 's957401846']
[68080.0, 35572.0]
[730.0, 646.0]
[191, 238]
p02773
u703950586
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\nS.sort()\na = S[0]\nc = 0\nmoji = []\n\nfor i in S:\n if a != i:\n moji.append([c,a])\n a = i\n c = 0\n c += 1\nif c > 0:\n moji.append([c,a])\n\nmoji.sort(reverse=True)\nmaxc = moji[0][0]\nfor j in moji:\n if j[0]...
['Wrong Answer', 'Accepted']
['s944092923', 's080945789']
[40644.0, 41408.0]
[817.0, 864.0]
[328, 371]
p02773
u703969935
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 = []\nfor i in range(N):\n S_list.append(input())\n\nc = collections.Counter(S_list)\n\nwords = []\ncounter = 0\n\n\nwhile(True):\n words.append(c.most_common()[counter][0])\n try:\n if c.most_common()[counter][1] == c.most_common()[counter+1][1]:\n counter += 1...
['Wrong Answer', 'Accepted']
['s605179821', 's299695277']
[45352.0, 49156.0]
[2106.0, 708.0]
[425, 244]
p02773
u704563784
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())\ncounts = {}\nbest = 0\nbest_words = []\nfor idx in range(n):\n string = input()\n if counts.get(string) is None: counts[string] = 1\n else: counts[string] += 1\n\n score = counts[string]\n\n if score > best:\n best = score\n best_words = [string]\n \n elif score ==...
['Wrong Answer', 'Accepted']
['s389628316', 's100665794']
[33420.0, 33416.0]
[534.0, 683.0]
[388, 396]
p02773
u706929073
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)]\ns.sort()\n\ncount = {}\nfor s_i in s:\n if not s_i in count:\n count[s_i] = 0\n count[s_i] += 1\nres = sorted(zip(count.keys(), count.values()),\n key=lambda x: x[1], reverse=True)\n\nnum = res[0][1]\nres2 = []\nfor res_i in res:\n if res_...
['Wrong Answer', 'Accepted']
['s102771077', 's516584966']
[47668.0, 47752.0]
[924.0, 873.0]
[409, 407]
p02773
u708890186
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=[]\nc=[]\nfor i in range(N):\n tmp=input()\n if not (tmp in S):\n S.append(tmp)\n c.append(1)\n else:\n c[S.index(tmp)]+=1\nm=max(c)\nfor i in range(len(S)):\n if c[i]==m:\n print(S[i])', 'import collections\nN=int(input())\nS=[input() for i in range(N)]\nc=collections.Counter(S)\nif...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s191010772', 's232954895', 's354630716', 's508482907', 's523017299', 's650436412', 's896096272', 's047100707']
[4468.0, 45036.0, 45228.0, 47280.0, 35572.0, 4536.0, 45228.0, 47640.0]
[2104.0, 2106.0, 2105.0, 2106.0, 309.0, 2104.0, 2109.0, 719.0]
[206, 294, 157, 277, 276, 215, 221, 302]
p02773
u711238850
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)\nma = max(c.values())\nfor k,v in c.items():\n if ma == v:\n print(k)\n', 'from collections import Counter\nn = int(input())\ns = [input() for _ in range(n)]\n\nc = Counter(s)\nma = max(c.values())\nfor k,v in c:\...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s113088618', 's144545643', 's623336809']
[35568.0, 35572.0, 35572.0]
[443.0, 317.0, 616.0]
[167, 158, 225]
p02773
u713914478
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 = collections.Counter(s)\nvalues, counts = zip(*c.most_common())\n\nfor i in range(counts.count(max(counts))):\n\tprint(values[i])', 'import collections\nN = int(input())\ns = [input() for i in range(N)]\n\nc = collections.Counter(s)\nvalues...
['Wrong Answer', 'Accepted']
['s426492605', 's389304809']
[59504.0, 59504.0]
[661.0, 773.0]
[197, 247]
p02773
u718949306
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 n in range(N):\n A.append(input())\nA.sort()\nB = []\nfor n in range(N):\n C = 0\n for i in range(N):\n if A[n] == A[i]:\n C += 1\n B.append(C)\nm = max(B)\nD = []\nfor i in range(N):\n if m <= B[i]:\n D.append(A[i])\nD = list(set(D))\nfor i in ran...
['Time Limit Exceeded', 'Accepted']
['s109308440', 's928906109']
[17792.0, 33416.0]
[2104.0, 703.0]
[327, 321]
p02773
u721425712
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 _ in range(n):\n ll = input()\n l.append(ll)\n \nss = set(l)\ns = list(ss)\n\nans = []\nfor i in range(len(s)):\n cnt = l.count(s[i])\n ans.append(cnt)\n \nm = max(ans)\nres = []\nfor j in range(len(ans)):\n if ans[j] == m:\n res.append(l[j])\n \nres.so...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s294742091', 's726006551', 's887898722']
[29076.0, 29076.0, 32220.0]
[2105.0, 2105.0, 650.0]
[346, 346, 241]
p02773
u723345499
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.
['[print(n) for n in max_name] [print(n) for n in max_name] n = int(input())\nname = {}\nfor _ in range(n):\n st = str(input())\n if st in name:\n tmp = name[st] + 1\n name[st] = tmp\n else:\n name[st] = 1\n\nmax_val = max(name.values())\nmax_name = [k for k, v in name.items() if v==max_va...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s506893744', 's667606900', 's843993888', 's907632086', 's817238760']
[2940.0, 32096.0, 32600.0, 32096.0, 32988.0]
[17.0, 554.0, 509.0, 521.0, 706.0]
[355, 298, 296, 298, 312]
p02773
u723792785
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())\ns = [input() for _ in range(n)]\nc = collections.Counter(s).most_common() \n\n\n#[('vet', 2), ('beet', 2), ('beat', 1), ('bed', 1), ('bet', 1)]\n \nans = []\nmax = c[0][1] \nfor item,count in c:\n\tif count==max:\n\t\tans.append(item)\n\telse:\n\t\tbreak \n \nan...
['Runtime Error', 'Accepted']
['s627952486', 's038790771']
[17408.0, 45040.0]
[262.0, 841.0]
[609, 608]
p02773
u726984689
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())\nT = list(set(S))\nfor i in range(len(T)):\n count.append(S.count(T[i]))\nbest = max(count)\nans = []\nfor i in range(len(T)):\n if count[i] == best:\n ans.append( T[i])\nans = sorted(ans)\nfor i in range(len(ans)):\n print(ans[i]) ', 'from colle...
['Runtime Error', 'Accepted']
['s838618992', 's612721633']
[29076.0, 49428.0]
[326.0, 972.0]
[290, 291]
p02773
u727148417
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 = {}\n\nA = [""]*N\nfor i in range(0, N):\n A[i] = A[i] + input()\n\nfor i in range(0, N):\n if not (A[i] in S.keys()):\n S[A[i]] = 1\n else:\n S[A[i]] = S[A[i]] + 1\n\nmax = 0\nfor value in S.values():\n if value > max:\n max = value\n\nS0 = {}\nfor key, value i...
['Wrong Answer', 'Accepted']
['s484311814', 's144207538']
[53600.0, 35952.0]
[592.0, 529.0]
[389, 204]
p02773
u728318205
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 = list(input() for i in range(1,n+1))\n\nfrom collections import Counter\n\nc = Counter(s_list)\nmax = max(list(c.values()))\n\nlist = []\nfor kv in c.items():\n if kv[1]== max:\n list.append(kv[0])\n\nlist_new = '\\n'.join(list)\n\nprint(list_new)\n \n\n \n\n\n", "n =i...
['Wrong Answer', 'Accepted']
['s239041335', 's244474860']
[35992.0, 35984.0]
[413.0, 557.0]
[288, 301]
p02773
u729535891
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 itertools import Counter\nn = int(input())\nlst = [0]*n\nfor i in range(n):\n s = input()\n lst[i] = s\n\nc = Counter(lst)\nmax_num = max(c.values())\nmost_lst = sorted([k for k, v in c.items() if v == max_num])\nfor x in most_lst:\n print(x)', 'from collections import Counter\nn = int(input())\nlst = [...
['Runtime Error', 'Accepted']
['s614895189', 's787854672']
[3060.0, 35560.0]
[18.0, 643.0]
[245, 247]
p02773
u731436822
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 numpy as np\nN = int(input())\nS = [input() for __ in range(N)]\n\nS = np.array(S)\nkeys = set(S)\nans = {}\ncnt = 0\nls = []\nfor key in keys:\n ans[key] = len(np.where(S == key)[0])\n\nmax_v = max(ans.values())\nkeys = [k for k, v in d.items() if v == max_v]\nkeys.sort()\nfor key in keys:\n print(key)'...
['Runtime Error', 'Accepted']
['s846537302', 's623558802']
[51564.0, 34012.0]
[2110.0, 610.0]
[301, 270]
p02773
u735069283
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 s=str(input())\n S +=[s]\nT=collections.Counter(S)\nP=list(T.keys())\nQ=list(T.values())\nfor i in range(len(P)):\n if Q[i]==max(Q):\n print(P[i])', 'import collections\nN=int(input())\nS=[]\nfor i in range(N):\n s=str(input())\n S +=[s]\nT=collec...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s504006740', 's980354082', 's564401887']
[35564.0, 46844.0, 49396.0]
[2105.0, 731.0, 970.0]
[204, 231, 270]
p02773
u735335967
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 = collections.Counter([input() for i in range(n)])\n\nvalues, counts = zip(*s.most_common())\n\nlen = counts.count(max(counts))\n\nfor i in range(len):\n print(values[i])\n', 'n = int(input())\ns = sorted([input() for i in range(n)])\nc = [1]*n\n\nfor i in range(n-1):\n i...
['Wrong Answer', 'Accepted']
['s965998311', 's188459087']
[57940.0, 24744.0]
[657.0, 645.0]
[205, 204]
p02773
u736342571
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(0,n):\n c = input()\n if c in d:\n d[c] +=1\n else:\n d[c] = 1\nmax_k_list = [kv[0] for kv in d.items() if kv[1] == max(d.values())]\nfor i in range(0,len(max_k_list)):\n print(max_k_list[i])', 'q=int(input())\ndic={}\nfor i in range(q):\n s=input()\n if not s ...
['Wrong Answer', 'Accepted']
['s907176513', 's081585294']
[35228.0, 35600.0]
[2207.0, 431.0]
[232, 228]
p02773
u736470924
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 if S in D:\n D[S] += 1\n else:\n D[S] = 1\n\nD_sorted = sorted(D.items(), key=lambda x:x[0])\nD_sorted = sorted(D_sorted, key=lambda x:x[1], reverse=True)\nfor k in D_sorted:\n print(k[0])\n', 'N = int(input())\nD = {}\nfor i in range(N):\n S = i...
['Wrong Answer', 'Accepted']
['s494313243', 's356051379']
[46684.0, 46684.0]
[772.0, 875.0]
[248, 309]
p02773
u743354620
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 _ in range(N)]\nc = collections.Counter(S)\nc.sort()\nvalues, counts = zip(*c.most_common())\nif len(values) == 1:\n print(values[0])\nelse:\n for i in range(N):\n if counts[i] == counts[0]:\n print(values[i])\n else:\n ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s210110318', 's525582565', 's708687267', 's695175747']
[35564.0, 45088.0, 59524.0, 46900.0]
[301.0, 537.0, 985.0, 942.0]
[311, 325, 325, 268]
p02773
u743374900
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 = input()\n if s in S:\n S[s] += 1\n else:\n S[s] = 1\nsorted_S = sorted(S.items(), key=lambda x: x[1], reverse=True)\na = []\ncount = -1\nfor s in sorted_S:\n if count == -1:\n a.append(s)\n count = sorted_S[s]\n elif count =...
['Runtime Error', 'Accepted']
['s675689257', 's095780158']
[43228.0, 47324.0]
[416.0, 800.0]
[414, 406]
p02773
u744034042
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)]\ns.sort()\nfrom collections import Counter\ns1 = collections.Counter(s)\ns2 = list(set(s))\ns2.sort()\nfor i in range(len(s2)):\n if s1[s2[i]] == max(s1.values()):\n print(s2[i])', 'n = int(input())\ns = [input() for i in range(n)]\nfrom collections import C...
['Runtime Error', 'Accepted']
['s352292493', 's647612945']
[17800.0, 35476.0]
[405.0, 635.0]
[229, 233]
p02773
u744683641
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())\nslist = []\nfor _ in range(n):\n s = input()\n slist.appemd(s)\n\nCounter(slist)', 'from collections import defaultdict\n\nn =int(input())\n\nd = defaultdict(int)\n\nfor _ in range(n):\n s = input()\n d[s] += 1\n\nresult = sorted(d.items(), key=lambda x: -x[...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s262685101', 's874697102', 's776346117']
[3316.0, 52056.0, 48732.0]
[21.0, 811.0, 769.0]
[126, 334, 345]
p02773
u744920373
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\nA = [input() for i in range(N)]\n\ndic = {}\n\nfor i in A:\n if i not in dic:\n dic[i] = 1\n else:\n dic[i] += 1\n\nde = 0\n\nans_list = []\n\n\nfor k, v in sorted(dic.items(), key=lambda x: x[1], reverse = True):\n if v != de and de !=0:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s696467584', 's931349403', 's837949693']
[44688.0, 46480.0, 49240.0]
[800.0, 578.0, 885.0]
[492, 398, 1276]
p02773
u745687363
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())\nm = max(S.count(S[i]), for i in range(N))\nS_new = set(S)\nfor s in S_new:\n if m == S.count(s):\n print(s)\n ', 'import collections\nN = int(input())\nS = []\nfor i in range(N):\n S.append(str(input()))\nA = collections.Counter(S)\nm = max(A.va...
['Runtime Error', 'Accepted']
['s993345789', 's680942925']
[2940.0, 44272.0]
[18.0, 765.0]
[173, 190]
p02773
u748241164
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 = [0] * N\ntime = [1] * N\nj = 0\nfor i in range(N):\n inp = str(input())\n if inp in s:\n x = s.index(inp)\n time[x] += 1\n else:\n s[j] = inp\n j += 1\n \nans = max(time)\n#print(s, time)\nfor i in range(N):\n if time[i] == ans:\n if s[i] != 0:\n print(s[i])', 'import ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s810097462', 's832593262', 's896055436', 's965074314']
[6132.0, 49192.0, 49192.0, 49192.0]
[2108.0, 869.0, 764.0, 912.0]
[289, 311, 327, 377]
p02773
u748311048
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())\nKnL=[]\nVnL=[]\n\nfor _ in range(N):\n inp=str(input())\n if not inp in KnL:\n KnL.append(inp)\n VnL.append([0,inp])\n VnL[KnL.index(inp)][0]+=1\n\nVnL.sort()\nVnL.reverse()\n\nfor i in range(len(VnL)):\n if VnL[0][0]>VnL[i][0]:\n exit()\n print(VnL[i][1])', 'import collections\nN=int(in...
['Wrong Answer', 'Accepted']
['s293031307', 's641511032']
[5108.0, 59500.0]
[2104.0, 903.0]
[269, 286]
p02773
u749742659
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 = {}\nma = 1\n\nfor i in range(n):\n wo = input()\n if(wo in dic):\n dic[wo] += 1\n if(dic[wo] > ma):\n ma = dic[wo]\n else:\n dic.update({wo:1})\n\n\nfor i in dic.keys():\n if(dic[i] == ma):\n print(i)\n', 'n = int(input())\n\ndic = {}\nma = ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s560244103', 's661208600', 's094550735']
[35224.0, 37484.0, 35416.0]
[401.0, 428.0, 472.0]
[261, 272, 313]
p02773
u750838232
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 _ in range(n)]\n\nc = collections.Counter(s)\n\nb, most = c.most_common(1)[0]\n\nfor i,j in c.most_common():\n if j != most:\n break\n print(i)', 'import collections\n\nn = int(input())\ns = [input() for _ in range(n)]\n\nc = collections.Counter(s)\n\nb, m...
['Wrong Answer', 'Accepted']
['s989796549', 's898436253']
[46872.0, 45804.0]
[561.0, 712.0]
[193, 248]
p02773
u751539777
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())\na = []\n\nfor i in range(N):\n a.append(str(input()))\na = collections.Counter(a)\nb = max(a.values())\n\nmax_k_list = [kv[0] for kv in a.items() if kv[1] == b]\nmax_k_list = sorted(max_k_list)\n\nfor i in max_k_list:\nprint(i) ', 'import collections\n\nn = int(input())\ns...
['Runtime Error', 'Accepted']
['s575915289', 's229967644']
[3064.0, 59376.0]
[17.0, 833.0]
[259, 310]
p02773
u752907966
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 from collections import Counter\n import sys\n input = sys.stdin.readline\n n=int(input())\n s=[]\n for _ in []*n:\n s.append(input().rstrip())\n c = Counter(s)\n ans=[]\n max_vote = max(c.values())\n for i,j in c.items():\n if j == max_vote:\n ans....
['Runtime Error', 'Accepted']
['s532847267', 's522153849']
[3316.0, 35932.0]
[21.0, 326.0]
[355, 368]
p02773
u756030237
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\na = int(input())\na_list = []\nans_list = []\n\nfor i in range(a):\n a_list.append(input())\n\na_counter = Counter(a_list)\n\n_v = 0\nfor k, v in a_counter.most_common():\n if _v == 0 or _v == v:\n _v = v\n ans_list.append(k)\n elif _v > v:\n break\n\nans = sor...
['Wrong Answer', 'Accepted']
['s341691984', 's486056415']
[45040.0, 45164.0]
[701.0, 746.0]
[323, 337]
p02773
u757030836
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())\n\nds ={} \nfor a in S:\n if a in ds:\n ds[a] +=1\n else:\n ds[a] =1\n \nm = max(ds.values())\n\nkeys = [k for k,v in ds.items() if v == m]\nprint(keys)', 'N = int(input())\n\nS = []\nfor i in range(N):\n S.append(input())\n\nds ={} \nf...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s046415571', 's567083058', 's748911128', 's975308380', 's404227806']
[37392.0, 37392.0, 37384.0, 37392.0, 35220.0]
[428.0, 432.0, 399.0, 440.0, 687.0]
[216, 223, 218, 211, 323]
p02773
u759518460
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())\nwords = [input() for _ in range(n)]\nc = collections.Counter(words)\nmax_c = c.most_common()\nans = [max_c[0][0]]\n\nfor i in range(1, len(max_c)):\n if max_c[i][1] == max_c[i-1][1]:\n ans.append(max_c[i][0])\n else:\n break\n\nans_sorted = sorted(ans, rever...
['Wrong Answer', 'Accepted']
['s286827676', 's460480714']
[49268.0, 49172.0]
[753.0, 778.0]
[363, 349]
p02773
u762275701
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 i in range(n):\n s = input()\n if s in dic:\n dic[s] += 1\n else:\n dic[s] = 1\n\n_max = 0\nfor v in dic.values():\n if _max < v:\n _max = v\n\nfor k,v in dic.items():\n if v == _max:\n print(k)', 'n = int(input())\n\ndic = {}\nfor i in range(n):\n s = input()\n if...
['Wrong Answer', 'Accepted']
['s616646491', 's736604433']
[32096.0, 44124.0]
[463.0, 776.0]
[228, 250]
p02773
u762420987
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())\nSc = Counter([input() for _ in range(N)]).most_common()\nprint(Sc)\nmax_num = Sc[0][1]\nans = []\nfor key, val in Sc:\n if val == max_num:\n ans.append(key)\nans.sort()\nfor t in ans:\n print(t)', 'N = int(input())\nfrom collections import Counter\nSc = ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s211534422', 's495141569', 's419061823']
[43476.0, 3188.0, 35584.0]
[786.0, 18.0, 601.0]
[247, 201, 200]
p02773
u765590009
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\nwords = {}\nfor i in range(n):\n word = input()\n if word in words:\n words[word] += 1\n else :\n words[word] = 1\n\nwords_sorted = sorted(words.items(), key=lambda x:x[1], reverse=True) \nscore = words_sorted[0][1]\nfor word in words_sorted:\n if score == word[1]:\n print(word[0])...
['Wrong Answer', 'Accepted']
['s844057072', 's484493930']
[47596.0, 50056.0]
[387.0, 500.0]
[323, 397]
p02773
u766393261
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\nN=int(input())\nS=['']*N\nfor i in range(N):\n S[i]=input()\ncounter = Counter(S)\nans=[0]*len(counter)\nnum=0\nfor word, cnt in counter.most_common():\n ans[num]=cnt\n num+=1\nanker=ans[0]\nankernum=0\nfor j in range(len(counter)):\n if ans[j]!=anker:\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s038190521', 's259698297', 's368901778', 's669526199']
[48348.0, 48348.0, 48356.0, 48348.0]
[934.0, 932.0, 612.0, 874.0]
[545, 545, 464, 529]
p02773
u768256617
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())\nlist_s=[]\nfor i in range(n):\n s=input()\n list_s.append(s)\nlist_cnt=[] \nlist_t=list(set(sorted(list_s))) \nfor i in list_t:\n cnt=list_s.count(i)\n list_cnt.append(cnt)\n \nfor i in range(len(list_cnt)):\n if list_cnt[i]==max(list_cnt):\n print(list_t[i])\n \n \n \n \n ', 'n=int(in...
['Wrong Answer', 'Accepted']
['s550780477', 's473170585']
[37668.0, 32096.0]
[2206.0, 695.0]
[288, 262]
p02773
u769870836
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 if s in d:\n d[s]+=1\n else:\n d[s]=0\nm=max(d.values())\nfor x in d.keys():\n if d[x]==m:\n print(x)', 'n=int(input())\nd={}\nfor i in range(n):\n s=input()\n if s in d:\n d[s]+=1\n else:\n d[s]=0\nm=max(d.values())\nans=[]\nfor x in d.keys...
['Wrong Answer', 'Accepted']
['s897002113', 's467648734']
[32096.0, 32096.0]
[469.0, 642.0]
[158, 206]
p02773
u771007149
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 = []\nfor _ in range(n):\n s.append(str(input()))\n\ns_c = Counter(s).most_common()\nm = s_c[0][1]\n\nprint(s_c)\nprint(m)\nans = []\n\nfor j in range(len(s_c)):\n if s_c[j][1] != m:\n break\n else:\n ans.append(s_c[j][0])\n \nans.sort...
['Wrong Answer', 'Accepted']
['s817326297', 's998597816']
[45040.0, 45032.0]
[872.0, 779.0]
[329, 309]