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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02772 | u921927295 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = int(input())\nnums = [int(e) for e in input().split()]\nfor i in range(N):\n if nums[i]%2 == 1:\n pass\n else:\n if nums[i]%3 == 0 or nums[i]%3 == 0:\n pass\n else:\n print("DENIED")\n break\n if i == N-1:\n print("APPROVED")\n else:\n pass\n ', 'N = int(input())\nnums = [int(e) for e in input().split()]\nfor i in range(N):\n if nums[i]%2 == 1:\n pass\n else:\n if nums[i]%3 == 0 or nums[i]%5 == 0:\n pass\n else:\n print("DENIED")\n break\n if i == N-1:\n print("APPROVED")\n else:\n pass\n '] | ['Wrong Answer', 'Accepted'] | ['s747218129', 's097530515'] | [2940.0, 2940.0] | [17.0, 17.0] | [315, 315] |
p02772 | u922487073 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = int(input())\nA_list = list(map(int, input().split()))\n\nf = True\nfor a in A_list:\n if a % 2 == 1:\n continue\n elif a % 3 == 0 or a % 5 == 0:\n continue\n \nif f:\n print("ACCEPTED")\nelse:\n print("DENIED")', 'N = int(input())\nA_list = list(map(int, input().split()))\n \nf = True\nfor a in A_list:\n if a % 2 == 1:\n continue\n elif a % 3 == 0 or a % 5 == 0:\n continue\n else:\n f = False\n \nif f:\n print("APPROVED")\nelse:\n print("DENIED")'] | ['Wrong Answer', 'Accepted'] | ['s790113577', 's928033741'] | [3060.0, 3060.0] | [17.0, 17.0] | [215, 238] |
p02772 | u923270446 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = int(input())\nA = list(map(int,input().split()))\nfor i in A:\n if i % 2 == 0:\n if i % 3 == 0 or i % 5 == 0:\n print("APPROVED")\n else:\n print("DENIED")\n break\n ', 'N = int(input())\nnumbers = list(map(int, input().split()))\nfor number in nunbers:\n if number % 2 == 0:\n if number % 3 != 0 or number % 5 != 0:\n print("DENIED")\n break\nprint("APPROVED")\n ', 'N = int(input())\nA = list(map(int,input().split()))\nfor i in A:\n if i % 2 == 0:\n if i % 3 == 0 or i % 5 == 0:\n continue\n else:\n print("DENIED")\n exit()\n else:\n continue\nprint("APPROVED")'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s461647585', 's513525433', 's953027313'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [188, 205, 212] |
p02772 | u925712873 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['n = int(input())\na = list(map(int, input().split()))\n\nfor i in a:\n if i%2 == 0:\n if i%3 and i%5:\n print("DENID")\n exit()\nprint("APPRIVED")', 'n = int(input())\na = list(map(int, input().split()))\n\nfor i in a:\n if i%2 == 0:\n if i%3 and i%5:\n print("DENIED")\n exit()\nprint("APPROVED")'] | ['Wrong Answer', 'Accepted'] | ['s101674586', 's920335841'] | [2940.0, 2940.0] | [20.0, 17.0] | [170, 171] |
p02772 | u927534107 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['n=int(input())\nl=list(map(int,input().split()))\nfor i in l:\n if i%2==0 and i%3!=0 and i%5==0:\n print("DENIED")\n exit()\nprint("APPROVED")', 'n=int(input())\nl=list(map(int,input().split()))\nfor i in l:\n if i%2==0 and i%3!=0 or i%5==0:\n print("DENIED")\n exit()\nprint("APPROVED")', 'n=int(input())\nl=list(map(int,input().split()))\nfor i in l:\n if i%2==0 and i%3!=0 and i%5!=0:\n print("DENIED")\n exit()\nprint("APPROVED")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s747275666', 's952346506', 's343573556'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [153, 152, 153] |
p02772 | u927807968 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['number = str(input())\nlist = list(map(int, input().split())\nfor i in list:\n\tif i%2==0:\n\t\tif i%3==0 or i%5==0:\n print("APPROVED")\n else:\n print("DENIED")', 'number = input()\nlist1 = list(map(int, input().split()))\nhan = 0\ncount = 0\nfor i in range(0, len(list1)):\n if list1[i]%2 == 0:\n count += 1\n if list1[i]%3 == 0 or list1[i]%5 == 0:\n han += 1\nif han == count:\n print("APPROVED")\nelse:\n print("DENIED")'] | ['Runtime Error', 'Accepted'] | ['s873870582', 's047070825'] | [2940.0, 3060.0] | [17.0, 17.0] | [181, 281] |
p02772 | u928480992 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['import sys\nn = int(input())\na = list(map(int, input().split()))\n\nfor i in range(n):\n if a[i] % 2 == 0:\n if a[i] % 3 or a[i] % 5 != 0:\n print("DENIED")\n sys.exit()\n\nprint("APPROVED")\n\n', 'import sys\nn = int(input())\na = list(map(int, input().split()))\n\nfor i in range(n):\n if a[i] % 2 == 0:\n if a[i] % 3 and a[i] % 5 != 0:\n print("DENIED")\n sys.exit()\n\nprint("APPROVED")\n\n'] | ['Wrong Answer', 'Accepted'] | ['s363995973', 's334922836'] | [2940.0, 2940.0] | [19.0, 18.0] | [215, 216] |
p02772 | u929217794 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['# Papers, Please\n\nN = int(input())\nA = list(map(int, input().split()))\n\nfor Ai in A:\n if Ai % 2 == 1:\n continue\n else:\n if Ai % 3 != 0 and Ai % 5 != 0:\n print("DENIED")\n exit()\n\nprint("AOOROVED")', '# Papers, Please\n\nN = int(input())\nA = list(map(int, input().split()))\n\nfor Ai in A:\n if Ai % 2 == 1:\n continue\n else:\n if Ai % 3 != 0 and Ai % 5 != 0:\n print("DENIED")\n exit()\n\nprint("APPROVED")'] | ['Wrong Answer', 'Accepted'] | ['s652654319', 's324346792'] | [8932.0, 8900.0] | [28.0, 30.0] | [213, 213] |
p02772 | u935642171 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ["n = int(input())\na = list(int(x) for x in input().split() if int(x)%2==0)\nok = True\nfor i in a:\n if i%3==0 or i%5==0:\n print('DENIED')\n ok = False\n break\nif ok:\n print('APPROVED')", "n = int(input())\na = list(int(x) for x in input().split() if int(x)%2==0)\nok = True\nfor i in a:\n if i%3!=0 and i%5!=0:\n print('DENIED')\n ok = False\n break\nif ok:\n print('APPROVED')"] | ['Wrong Answer', 'Accepted'] | ['s436916179', 's996221623'] | [9080.0, 9120.0] | [27.0, 24.0] | [190, 191] |
p02772 | u935840914 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['n = int(input())\na = list(map(int, input().split()))\nflg = True\nfor i in range(n):\n if a[i] % 2 == 0:\n if a[i] % 3 == 0 or a[i] % 5 == 0:\n pass\n else:\n flg = False\n break\n\nif flg:\n print("APPROVED")\nelse:\n print("DENIED")\n\n', 'n = int(input())\na = list(map(int, input().split()))\nfor i in range(n):\n if a % 2 == 0:\n if a % 3 == 0 or a % 5 == 0:\n print("APPROVED")\n else:\n print("DENIED")\n\n', 'n = int(input())\na = list(map(int, input().split()))\nflg = True\nfor i in range(n):\n if a[i] % 2 == 0:\n if a[i] % 3 == 0 or a[i] % 5 == 0:\n pass\n else:\n flg = False\n break\n\nif flg:\n print("APPROVED")\nelse:\n print("DENIED")\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s904757106', 's933092625', 's967001051'] | [2940.0, 2940.0, 3060.0] | [17.0, 18.0, 18.0] | [267, 193, 278] |
p02772 | u938892722 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = int(input())\n\nA = list(map(int, input().split()))\n\nn=0\n\nfor i in range(N):\n a=A[i]\n if a%2==0 and (a%3!=0 or a%5!=0):\n n+=1\n\nif n==0:\n print("APPROVED")\nelse:\n print("DENIED")', 'N = int(input())\n\nA = list(map(int, input().split()))\n\nfor i in range(N):\n a=A[i]\n if a%2==0 and (a%3!=0 or a%5!=0):\n print("DENIED")\n break\n\nprint("APPROVED")', 'N = int(input())\n\nA = list(map(int, input().split()))\n\nfor i in N:\n a=A[i]\n if a%2==0 and (a%3!=0 or a%5!=0):\n print("DENIED")\n break\n\nprint("APPROVED")', 'N = int(input())\n\nA = list(map(int, input().split()))\n\nfor i in range(N):\n a=A[i]\n if a%2==0 and (a%3!=0 or a%5!=0):\n print("DENIED")\n \n break\n\nprint("APPROVED")', 'N = int(input())\n\nA = list(map(int, input().split()))\n\nn=0\n\nfor i in range(N):\n a=A[i]\n if a%2==0 and a%3!=0:\n if a%5!=0:\n n+=1\n\nif n==0:\n print("APPROVED")\nelse:\n print("DENIED")'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s230757763', 's430697551', 's721724357', 's867062702', 's878570329'] | [3060.0, 2940.0, 3060.0, 2940.0, 3060.0] | [17.0, 17.0, 19.0, 17.0, 17.0] | [198, 179, 172, 180, 209] |
p02772 | u939585142 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = int(input())\nA = list(map(int,input().split()))\nli = []\nans = "APPROVED"\n\nfor i in range(N):\n if A[i] % 2 == 0:\n li.append(A[i])\n\nfor i in li:\n if i % 5 == 0 or i % 3 == 0:\n ans = "APPROVED"\n else:\n ans = "DENIED"\n break', 'N = int(input())\nA = list(map(int,input().split()))\nli = []\nans = "APPROVED"\n\nfor i in range(N):\n if A[i] % 2 == 0:\n li.append(A[i])\n\nfor i in li:\n if i % 5 == 0 or i % 3 == 0:\n ans = "APPROVED"\n else:\n ans = "DENIED"\n break\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s441350447', 's898089843'] | [3060.0, 3060.0] | [17.0, 17.0] | [239, 250] |
p02772 | u945359338 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['n = int(input())\nlist = [int(x) for x in input().split(" ")]\nresult = \'APPROVED\'\nfor i in range(len(list)):\n if list[i]%2 == 0:\n if list[i]%3!=0 AND list[i]%5!=0:\n result = \'DENIED\'\n break\nprint(result)', 'n = int(input())\nlist = [int(x) for x in input().split(" ")]\nresult = \'APPROVED\'\nfor i in range(len(list)):\n if list[i]%2 == 0:\n if list[i]%3 != 0 and list[i]%5 != 0:\n result = \'DENIED\'\n break\nprint(result)'] | ['Runtime Error', 'Accepted'] | ['s855679611', 's979466154'] | [3064.0, 3060.0] | [17.0, 17.0] | [234, 238] |
p02772 | u947797537 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ["N = int(input())\nlst = input().split(' ')\ngood = False\nfor v in lst:\n if int(v) % 2 != 0:\n continue\n elif int(v) % 3 != 0 and int(v) % 5 != 0:\n print('DENIED')\n break\n else:\n good = True\nif good:\n print('APPROVE')", "N = int(input())\nlst = input().split(' ')\nfor v in lst:\n good = False\n if int(v) % 2 != 0:\n good = True\n elif int(v) % 3 != 0 and int(v) % 5 != 0:\n print('DENIED')\n break\n else:\n good = True\nif good:\n print('APPROVED')"] | ['Wrong Answer', 'Accepted'] | ['s513765524', 's254600524'] | [3060.0, 3060.0] | [18.0, 23.0] | [229, 235] |
p02772 | u952708174 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ["N = int(input())\nA = [int(i) for i in input().split()]\nprint('APPROVED' if all([a % 6 == 0 or a % 10 == 0 for a in A]) else 'DENIED')", "N = int(input())\nA = [int(i) for i in input().split()]\nconditions = [(a % 3 == 0 or a % 5 == 0) for a in A if a % 2 == 0]\nprint('APPROVED' if all(conditions) else 'DENIED')"] | ['Wrong Answer', 'Accepted'] | ['s793451604', 's386044512'] | [2940.0, 3060.0] | [18.0, 17.0] | [133, 172] |
p02772 | u957222656 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['\nnum = input()\na = input().split()\nflag = 0\nfor item in a:\n if item%2==0:\n if item%3==0 or item%5==0:\n pass\n else:\n flag=1\n\nif flag==0:\n print("APPROVED")\nelse:\n print("DENIED")', '\nnum = input()\na = input().split()\nflag = 0\nfor item in a:\n item=int(item)\n if item%2==0:\n if item%3==0 or item%5==0:\n pass\n else:\n flag=1\n\nif flag==0:\n print("APPROVED")\nelse:\n print("DENIED")'] | ['Runtime Error', 'Accepted'] | ['s747271186', 's554489487'] | [2940.0, 2940.0] | [17.0, 17.0] | [222, 241] |
p02772 | u957872856 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = int(input())\nA = [int(i) for i in input().split()]\nans = True\nfor a in A:\n if a%2==0:\n if a%3!=0 or a%5!=0:\n ans = False\nif ans:\n print("APPROVED")\nelse:\n print("DENIED")\n ', 'N = int(input())\nA = [int(i) for i in input().split()]\nans = True\nfor a in A:\n if a%2==0:\n if a%3!=0 and a%5!=0:\n ans = False\nif ans:\n print("APPROVED")\nelse:\n print("DENIED")'] | ['Wrong Answer', 'Accepted'] | ['s713438859', 's042796942'] | [2940.0, 3064.0] | [17.0, 17.0] | [192, 186] |
p02772 | u957957759 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ["n=int(input())\na=list(map(int,input().split()))\nx=0\nfor i in range(n):\n if a[i]%2==0:\n if a[i]%3!=0 and a[i]%3!=0:\n x=1\n break\nif x==1:\n print('DENIED')\nelse:\n print('APPROVED')\n ", "n=int(input())\na=list(map(int,input().split()))\nx=0\nfor i in range(n):\n if a[i]%2==0:\n if a[i]%3!=0 and a[i]%5!=0:\n x=1\n break\nif x==1:\n print('DENIED')\nelse:\n print('APPROVED')\n "] | ['Wrong Answer', 'Accepted'] | ['s306330843', 's355879857'] | [2940.0, 2940.0] | [18.0, 17.0] | [224, 224] |
p02772 | u958207414 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = input()\n_list = input().split(" ")\n_list = [int(a) for a in _list]\naspect = [a for a in _list if a % 2==0]\nans = []\nfor a in even:\n if a % 3 == 0 or a % 5 == 0:\n ans.append(True)\nif len(aspect) ==len(ans):\n print("APPROVED")\nelse:\n print("DENIED")', 'N = input()\n_list = input().split(" ")\n_list = [int(a) for a in _list]\naspect = [a for a in _list if a % 2==0]\nans = []\nfor a in aspect:\n if a % 3 == 0 or a % 5 == 0:\n ans.append(True)\nif len(aspect) ==len(ans):\n print("APPROVED")\nelse:\n print("DENIED")'] | ['Runtime Error', 'Accepted'] | ['s578821479', 's414621993'] | [3064.0, 3188.0] | [18.0, 18.0] | [267, 269] |
p02772 | u960250266 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = input()\nA = [x for x in input().split()]\nfive = False\nthree = False\nfor x in range(A):\n if(x%5==0):\n five = True\n elif(x%3==0):\n three = True\n \nif(five.equals(True) and three.equals(True)):\n print("APPROVED)\nelse:\n print("DENIED")\n \n', 'N = input()\nA = [x for x in input().split()]\nfive = False\nthree = False\nfor x in range(A):\n if(x%5==0):\n five = True\n elif(x%3==0):\n three = True\n \nif(five.equals(True) and three.equals(True):\n print("APPROVED)\nelse:\n print("DENIED")\n \n', 'N = input()\n_list = input().split(" ")\n_list = [int(x) for x in _list]\neven = [x for x in _list if x % 2==0]\nanswer = []\nfor x in even:\n if x % 3 == 0 or x % 5 == 0:\n answer.append(True)\nif len(even) == len(answer):\n print("APPROVED")\nelse:\n print("DENIED")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s369034928', 's995410178', 's775685568'] | [2940.0, 2940.0, 3064.0] | [17.0, 17.0, 18.0] | [253, 252, 273] |
p02772 | u961945062 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = int(input())\nA = list(map(int, input().split()))\n\nj = True\nfor i in range(N):\n if A[i] % 2 == 0:\n if A[i] %3 == 0 or A[i] % 5 ==0:\n pass\n else:\n j = False\n exit()\n \nif j == Ture:\n print("APPROVED")\nelse:\n print("DENIED") ', 'N = int(input())\nA = list(map(int, input().split()))\n \nj = True\nfor i in range(N):\n if A[i] % 2 == 0:\n if A[i] %3 == 0 or A[i] % 5 ==0:\n pass\n else:\n print("DENIED") \n exit()\n \nprint("APPROVED")'] | ['Runtime Error', 'Accepted'] | ['s663862316', 's025563085'] | [3060.0, 3060.0] | [17.0, 17.0] | [292, 255] |
p02772 | u964521959 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['\nN = int(input())\n\n\ninput_list = input().split( )\n\nfor i in range(N):\n if(input_list[i]%2==0):\n if((input_list[i]%3==0)or(input_list[i]%5==0)):\n counter = counter + 1\nif(counter == N):\n print("APPROVED")\nelse:\n print("DENIED")', '\nN = int(input())\n\n\ninput_list = input().split( )\n\ncounter = 0\n\nfor i in range(N):\n if(int(input_list[i])%2==0):\n if((int(input_list[i])%3==0)or(int(input_list[i])%5==0)):\n counter = counter + 1\n else:\n counter = counter + 1\nif(counter == N):\n print("APPROVED")\nelse:\n print("DENIED")\n\n'] | ['Runtime Error', 'Accepted'] | ['s933821067', 's190015483'] | [3060.0, 3060.0] | [17.0, 17.0] | [269, 333] |
p02772 | u967843578 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['\n\n\n#include <array>\n#include <set>\n#include <cmath>\n#include <string>\n#include <sstream>\n\n#include <list>\n#include <stack>\n\n#include <algorithm> \n#include <numeric> \n#include <functional>\n\n#include <bitset>\n#include <cctype> \n#include <iomanip> \n#include <limits> \n\n// std::numeric_limits<int>::max(), min()\n// std::setprecision(X)\n// std::islower(), std::isupper(), std::tolower, std::toupper\n// std::accumulate(m.begin(), m.end(), 0LL);\n// std::sort(begin(),end()) // 0, 1, 2, 3 ,4 (default, less);\n// std::priority_queue<int, vector<int>, less<int>> que; // 4, 3, 2, 1 (defualt, less) : \n// if ( std::regex_match(S, std::regex("(dream|dreamer|erase|eraser)*")) ) std::cout << "YES" << std::endl;\n \n\n\n#define all(x) (x).begin(),(x).end()\n\ntemplate<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }\ntemplate<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }\ntypedef long long ll;\ntypedef std::vector<int> vi;\ntypedef std::vector<std::vector<int>> vvi;\n\nll gcd ( ll a, ll b ) { if ( b == 0 ) return a; else return gcd ( b, a%b ); }\nll lcm ( ll a, ll b ) { return a * b / gcd(a, b); }\n\n\nint main (void) {\n std::cin.tie(0); std::ios::sync_with_stdio(false);\n\n return 0;\n}\n', '\nimport numpy as np\n\nN = int(input())\nA = [int(x) for x in input().split()]\na = np.array(A)\n\n#mask = a%6==0 or a%10==0 or a%2==1 \nmask = np.logical_or.reduce( (a%6==0 , a%10==0, a%2==1) )\nif mask.all() : \n print("APPROVED")\nelse :\n print("DENIED")\n'] | ['Runtime Error', 'Accepted'] | ['s497691451', 's332890628'] | [2940.0, 12508.0] | [18.0, 148.0] | [1430, 254] |
p02772 | u970497613 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = int(input())\nlist = input().split()\nfor i in range(N):\n on = 0\n k = int(list[i])\n if k % 2 == 0:\n if k % 3 == 0 or k % 5 == 0:\n on = 1 \n else:\n print("DENIED")\n break\n if i == N-1:\n if on == 1:\n \t print("APPROVED")\n else:\n \t print("DENIED")', 'N = int(input())\nlist = input().split()\nfor i in range(N):\n on = 0\n k = int(list[i])\n if k % 2 == 0:\n if k % 3 == 0 or k % 5 == 0:\n on = 1 \n else:\n print("DENIED")\n break\n if i == N-1:\n if on == 1:\n \t print("APPROVED")\n else:\n \t print("DENNIED")', 'N = int(input())\nlist = input().split()\nfor i in range(N):\n k = int(list[i])\n if k % 2 == 0:\n if k % 3 == 0 or k % 5 == 0:\n if k == int(list[N]):\n print("APPROVED")\n else:\n print("DENIED")\n break', 'N = int(input())\nlist = input().split()\nfor i in range(N):\n on = 0\n k = int(list[i])\n print(i)\n if k % 2 == 0:\n if k % 3 == 0 or k % 5 == 0:\n on = 1 \n else:\n print("DENIED")\n break\n if i == N-1:\n if on == 1:\n \t print("APPROVED")\n else:\n \t print("DENNIED")', 'N = int(input())\nlist = input().split()\nfor i in range(N):\n k = int(list[i])\n if k % 2 == 0:\n if k % 3 == 0 or k % 5 == 0:\n if k == int(list[N-1]):\n print("APPROVED")\n else:\n print("DENIED")\n break', 'N = int(input())\nlist = input().split()\non = 0\nfor i in range(N):\n k = int(list[i])\n if k % 2 == 0:\n if k % 3 == 0 or k % 5 == 0:\n on = 1 \n else:\n print("DENIED")\n break\n if i == N-1:\n \tprint("APPROVED")'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s272728328', 's318450154', 's486036738', 's607180912', 's648785810', 's532607769'] | [3060.0, 3060.0, 3060.0, 3064.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [280, 281, 229, 292, 231, 228] |
p02772 | u970809473 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ["li = list(map(int,input().split()))\nerror = 0\nfor i in range(li[0]):\n if i == 1:\n else:\n if li[i]%2 == 0:\n if li[i]%3 == 0 or li[i]%5 ==0:\n else:\n error = 1:\n else:\nif error:\n print('DENIED')\nelse:\n print('APPROVED')", "n = int(input())\nli = list(map(int,input().split()))\nerror = 0\nfor i in range(n):\n if li[i]%2 == 0:\n if li[i]%3 == 0 or li[i]%5 == 0:\n pass\n else:\n error = 1\n else:\n pass\nif error:\n print('DENIED')\nelse:\n print('APPROVED')"] | ['Runtime Error', 'Accepted'] | ['s576188735', 's480542192'] | [2940.0, 3060.0] | [17.0, 17.0] | [243, 245] |
p02772 | u971096161 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ["N = int(input())\nA = input().split()\nA = [int(a) for a in A]\n\nans = 'APPROVED'\nfor a in A:\n if a % 2 ==0:\n if a % 3 != 0 or a % 5 != 0:\n ans = 'DENIED'\n break\n \nprint(ans)\n", "N = int(input())\nA = input().split()\nA = [int(a) for a in A]\n\nans = 'APPROVED'\nfor a in A:\n if a % 2 ==0:\n if a % 3 != 0 or a % 5 != 0:\n ans = 'DENIED'\n \nprint(ans)", "N = int(input())\nA = input().split()\nA = [int(a) for a in A if int(a) % 2 == 0]\n\ntmp = 0\n\nfor a in A:\n if a % 3 == 0 or a % 5 == 0:\n tmp += 1\n\nif tmp == len(A):\n print('APPROVED')\nelse:\n print('DENIED')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s632212907', 's657847529', 's185059301'] | [2940.0, 3060.0, 3060.0] | [18.0, 17.0, 17.0] | [191, 178, 208] |
p02772 | u977141657 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['import numpy as np\nn = int(input())\na = list(map(int, input().split()))\na = np.array(a)\na = a[a%2==0]\n\nfor i in range(n):\n if a[i]%3 != 0 and a[i]%5 != 0:\n return print("APPROVED")\n\nreturn print("DENIED")', 'import numpy as np\nimport sys\n\nn = int(input())\na = list(map(int, input().split()))\na = np.array(a)\na = a[a%2==0]\n\nfor i, j in enumerate(a):\n if j%3 != 0 and j%5 != 0:\n print("DENIED")\n sys.exit()\n\nprint("APPROVED")'] | ['Runtime Error', 'Accepted'] | ['s792935799', 's603231793'] | [3060.0, 12504.0] | [17.0, 149.0] | [214, 233] |
p02772 | u981864683 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['a = input()\nb = list(map(int,input().split()))\n\nfor i in b:\n if i % 2 == 0:\n if i % 3 == 0 or i % 5 == 0:\n print("APPROVED")\n else:\n print("DENIED")\n else:\n print("DENIED")\n \n\n\n', 'a = input()\nb = list(map(int,input().split()))\n \nlistdir = []\nfor i in b:\n if i % 2 == 0:\n if i % 3 != 0 and i % 5 != 0:\n listdir.append(i)\n \nif len(listdir) >= 1:\n print("DENIED")\nelse:\n print("APPROVED")'] | ['Wrong Answer', 'Accepted'] | ['s921031774', 's348621822'] | [2940.0, 3060.0] | [17.0, 19.0] | [201, 216] |
p02772 | u982749462 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ["n=int(input())\na = list(map(int, input().split()))\nfor i in a:\n if a % 2=0:\n if a%3=0 or a%5=0:\n print('APPROVED')\n exit()\nprint('DENIED')", "n=int(input())\na = list(map(int, input().split()))\nfor i in a:\n if i % 2==0:\n if i % 3 == 0 or i % 5 ==0:\n continue\n else:\n print('DENIED')\n exit()\n \nprint('APPROVED')"] | ['Runtime Error', 'Accepted'] | ['s194588738', 's642886022'] | [2940.0, 2940.0] | [18.0, 17.0] | [152, 194] |
p02772 | u985827933 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ["N = int(input())\nA = list(map(int, input().split()))\ncount = 0\nfor i in A:\n if i//3 == 0 or i//5 == 0:\n count += 1\n else:\n count += 0\n \nif count == N:\n print('APPROVED')\nelse:\n print('DENIED')", 'N = int(input())\nA = list(map(int, input().split()))\ncount = 0\nfor i in range(N):\n if A[i]%2 == 0:\n if A[i]%3 == 0 or A[i]%5 == 0:\n count += 1\n else:\n count += 0\n else:\n count += 1\nif int(count) == N:\n print("APPROVED")\nelse:\n print("DENIED")'] | ['Wrong Answer', 'Accepted'] | ['s794428348', 's982021301'] | [3060.0, 3064.0] | [20.0, 18.0] | [205, 297] |
p02772 | u992910889 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ["n=int(input())\na=list(map(int,input().split()))\ncnt=0\nwhile True:\n if cnt>=n:\n print('DENIED')\n break\n \n elif a[cnt]%2==0:\n if a[cnt]%3==0 or a[cnt]%5==0:\n cnt+=1\n continue\n else:\n print('DENIED')\n break\n elif cnt==n:\n print('APPROVED')\n break\n else:\n cnt+=1\n continue\n ", "n=int(input())\na=list(map(int,input().split()))\ncnt=0\nwhile True:\n if cnt>=n:\n print('APPROVED')\n break\n \n elif a[cnt]%2==0:\n if a[cnt]%3==0 or a[cnt]%5==0:\n cnt+=1\n continue\n else:\n print('DENIED')\n break\n elif cnt==n:\n print('APPROVED')\n break\n else:\n cnt+=1\n \n continue\n "] | ['Wrong Answer', 'Accepted'] | ['s863301526', 's357093721'] | [3060.0, 3064.0] | [17.0, 20.0] | [392, 403] |
p02772 | u993642190 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = int(input())\nli = [int(i) for i in input().split()]\n\nis_approved = True\nfor l in li :\n if (l % 2 != 0) :\n continue\n\n if (l % 2 == 0 and l % 3 == 0 and l % 5 == 0) :\n continue\n\n is_approved = False\n break\n\nif (is_approved) :\n print("APPROVED")\nelse :\n print("DENIED")\n\n', 'N = int(input())\nli = [int(i) for i in input().split()]\n\nis_approved = True\nfor l in li :\n if (l % 2 != 0) :\n continue\n\n if (l % 3 == 0 or l % 5 == 0) :\n continue\n\n is_approved = False\n break\n\nif (is_approved) :\n print("APPROVED")\nelse :\n print("DENIED")\n\n'] | ['Wrong Answer', 'Accepted'] | ['s201200996', 's790895621'] | [2940.0, 3060.0] | [19.0, 17.0] | [304, 288] |
p02772 | u995109095 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['\nn=int(input())\nl=list(map(int,input().split()))\nf=1\nfor i in range(n):\n if not l[i]%2:\n if l[i]%3 or l[i]%5 :\n f=0\n break\nif f:\n print("APPROVED")\nelse:\n print("DENIED")\n \n', '\nn=int(input())\nl=list(map(int,input().split()))\nf=1\nfor i in range(n):\n if l[i]%2==0:\n if l[i]%3 and l[i]%5 :\n f=0\n break\nif f:\n print("APPROVED")\nelse:\n print("DENIED")\n \n'] | ['Wrong Answer', 'Accepted'] | ['s205492482', 's752615456'] | [2940.0, 3060.0] | [17.0, 19.0] | [223, 223] |
p02772 | u995323427 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ['N = int(input())\noddNum = set()\n\nfor x in list(map(int, input().split())):\n if (x % 2 == 0):\n oddNum.add(x)\n\nif (len(oddNum) == 0):\n print("DENIED")\n\nfor o in range(len(oddNum)):\n if ((o % 3 != 0) | (o % 5 != 0)):\n print("DENIED")\n exit()\n\nprint("APPROVED")', 'N = int(input())\noddNum = set()\n\nfor x in list(map(int, input().split())):\n if (x % 2 == 0):\n oddNum.add(x)\n\nfor o in range(len(oddNum)):\n if ((o % 3 != 0) | (o % 5 != 0)):\n print("DENIED")\n exit()\n\nprint("APPROVED")', 'N = int(input())\noddNum = set()\n\nfor x in list(map(int, input().split())):\n if (x % 2 == 0):\n oddNum.add(x)\n\nfor o in oddNum:\n if ((o % 3 != 0) & (o % 5 != 0)):\n print("DENIED")\n exit()\n\nprint("APPROVED")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s021785957', 's911791445', 's262201992'] | [3064.0, 3060.0, 3064.0] | [18.0, 17.0, 18.0] | [287, 243, 231] |
p02772 | u998082063 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ["n = int(input())\ns = map(int, input().split())\nlis = [6, 10, 12, 18, 20, 24, 30, 36, 40, 42, 48, 50, 54, 60, 66, 70, 72, 78, 80, 84, 90, 96, 100, 102, 108, 110, 114, 120, 126, 130, 132, 138, 140, 144, 150, 156, 160, 162, 168, 170, 174, 180, 186, 190, 192, 198, 200, 204, 210, 216, 220, 222, 228, 230, 234, 240, 246, 250, 252, 258, 260, 264, 270, 276, 280, 282, 288, 290, 294, 300, 306, 310, 312, 318, 320, 324, 330, 336, 340, 342, 348, 350, 354, 360, 366, 370, 372, 378, 380, 384, 390, 396, 400, 402, 408, 410, 414, 420, 426, 430, 432, 438, 440, 444, 450, 456, 460, 462, 468, 470, 474, 480, 486, 490, 492, 498, 500, 504, 510, 516, 520, 522, 528, 530, 534, 540, 546, 550, 552, 558, 560, 564, 570, 576, 580, 582, 588, 590, 594, 600, 606, 610, 612, 618, 620, 624, 630, 636, 640, 642, 648, 650, 654, 660,666, 670, 672, 678, 680, 684, 690, 696, 700, 702, 708, 710, 714, 720, 726, 730, 732, 738, 740, 744, 750, 756, 760, 762, 768, 770, 774, 780, 786, 790, 792, 798, 800, 804, 810, 816, 820, 822, 828, 830, 834, 840, 846, 850, 852, 858, 860, 864, 870, 876, 880, 882, 888, 890, 894, 900, 906, 910, 912, 918, 920, 924, 930, 936, 940, 942, 948, 950, 954, 960, 966, 970, 972, 978, 980, 984, 990, 996]\ntmp = 0\nlis2 = []\nfor i in range(n):\n if i % 2 == 0:\n lis2.append(i)\nfor i in s:\n if i in lis:\n tmp += 1\nif len(lis2) == tmp:\n print('APPROVED')\nelse:\n print('DENIED')", "n =int(input())\ns = map(int, input().split())\nlis = [6, 10, 12, 18, 20, 24, 30, 36, 40, 42, 48, 50, 54, 60, 66, 70, 72, 78, 80, 84, 90, 96, 100, 102, 108, 110, 114, 120, 126, 130, 132, 138, 140, 144, 150, 156, 160, 162, 168, 170, 174, 180, 186, 190, 192, 198, 200, 204, 210, 216, 220, 222, 228, 230, 234, 240, 246, 250, 252, 258, 260, 264, 270, 276, 280, 282, 288, 290, 294, 300, 306, 310, 312, 318, 320, 324, 330, 336, 340, 342, 348, 350, 354, 360, 366, 370, 372, 378, 380, 384, 390, 396, 400, 402, 408, 410, 414, 420, 426, 430, 432, 438, 440, 444, 450, 456, 460, 462, 468, 470, 474, 480, 486, 490, 492, 498, 500, 504, 510, 516, 520, 522, 528, 530, 534, 540, 546, 550, 552, 558, 560, 564, 570, 576, 580, 582, 588, 590, 594, 600, 606, 610, 612, 618, 620, 624, 630, 636, 640, 642, 648, 650, 654, 660,666, 670, 672, 678, 680, 684, 690, 696, 700, 702, 708, 710, 714, 720, 726, 730, 732, 738, 740, 744, 750, 756, 760, 762, 768, 770, 774, 780, 786, 790, 792, 798, 800, 804, 810, 816, 820, 822, 828, 830, 834, 840, 846, 850, 852, 858, 860, 864, 870, 876, 880, 882, 888, 890, 894, 900, 906, 910, 912, 918, 920, 924, 930, 936, 940, 942, 948, 950, 954, 960, 966, 970, 972, 978, 980, 984, 990, 996]\nfor i in s:\n if i not in lis:\n print('DENIED')\n exit()\nprint('APPROVED')", "s = map(int, input().split())\nlis = [6, 10, 12, 18, 20, 24, 30, 36, 40, 42, 48, 50, 54, 60, 66, 70, 72, 78, 80, 84, 90, 96, 100, 102, 108, 110, 114, 120, 126, 130, 132, 138, 140, 144, 150, 156, 160, 162, 168, 170, 174, 180, 186, 190, 192, 198, 200, 204, 210, 216, 220, 222, 228, 230, 234, 240, 246, 250, 252, 258, 260, 264, 270, 276, 280, 282, 288, 290, 294, 300, 306, 310, 312, 318, 320, 324, 330, 336, 340, 342, 348, 350, 354, 360, 366, 370, 372, 378, 380, 384, 390, 396, 400, 402, 408, 410, 414, 420, 426, 430, 432, 438, 440, 444, 450, 456, 460, 462, 468, 470, 474, 480, 486, 490, 492, 498, 500, 504, 510, 516, 520, 522, 528, 530, 534, 540, 546, 550, 552, 558, 560, 564, 570, 576, 580, 582, 588, 590, 594, 600, 606, 610, 612, 618, 620, 624, 630, 636, 640, 642, 648, 650, 654, 660,666, 670, 672, 678, 680, 684, 690, 696, 700, 702, 708, 710, 714, 720, 726, 730, 732, 738, 740, 744, 750, 756, 760, 762, 768, 770, 774, 780, 786, 790, 792, 798, 800, 804, 810, 816, 820, 822, 828, 830, 834, 840, 846, 850, 852, 858, 860, 864, 870, 876, 880, 882, 888, 890, 894, 900, 906, 910, 912, 918, 920, 924, 930, 936, 940, 942, 948, 950, 954, 960, 966, 970, 972, 978, 980, 984, 990, 996]\nfor i in s:\n if i not in lis:\n print('DENIED')\n exit()\nprint('APPROVED')", "n = int(input())\ns = map(int, input().split())\nlis = [6, 10, 12, 18, 20, 24, 30, 36, 40, 42, 48, 50, 54, 60, 66, 70, 72, 78, 80, 84, 90, 96, 100, 102, 108, 110, 114, 120, 126, 130, 132, 138, 140, 144, 150, 156, 160, 162, 168, 170, 174, 180, 186, 190, 192, 198, 200, 204, 210, 216, 220, 222, 228, 230, 234, 240, 246, 250, 252, 258, 260, 264, 270, 276, 280, 282, 288, 290, 294, 300, 306, 310, 312, 318, 320, 324, 330, 336, 340, 342, 348, 350, 354, 360, 366, 370, 372, 378, 380, 384, 390, 396, 400, 402, 408, 410, 414, 420, 426, 430, 432, 438, 440, 444, 450, 456, 460, 462, 468, 470, 474, 480, 486, 490, 492, 498, 500, 504, 510, 516, 520, 522, 528, 530, 534, 540, 546, 550, 552, 558, 560, 564, 570, 576, 580, 582, 588, 590, 594, 600, 606, 610, 612, 618, 620, 624, 630, 636, 640, 642, 648, 650, 654, 660,666, 670, 672, 678, 680, 684, 690, 696, 700, 702, 708, 710, 714, 720, 726, 730, 732, 738, 740, 744, 750, 756, 760, 762, 768, 770, 774, 780, 786, 790, 792, 798, 800, 804, 810, 816, 820, 822, 828, 830, 834, 840, 846, 850, 852, 858, 860, 864, 870, 876, 880, 882, 888, 890, 894, 900, 906, 910, 912, 918, 920, 924, 930, 936, 940, 942, 948, 950, 954, 960, 966, 970, 972, 978, 980, 984, 990, 996]\ntmp = []\nfor i in s:\n if i % 2 == 0:\n if i not in lis:\n print('DENIED')\n exit()\nprint('APPROVED')"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s356421851', 's464145042', 's505903745', 's545147721'] | [3192.0, 3192.0, 3192.0, 3192.0] | [18.0, 17.0, 17.0, 19.0] | [1383, 1278, 1262, 1319] |
p02772 | u999983491 | 2,000 | 1,048,576 | You are an immigration officer in the Kingdom of AtCoder. The document carried by an immigrant has some number of integers written on it, and you need to check whether they meet certain criteria. According to the regulation, the immigrant should be allowed entry to the kingdom if and only if the following condition is satisfied: * All even numbers written on the document are divisible by 3 or 5. If the immigrant should be allowed entry according to the regulation, output `APPROVED`; otherwise, print `DENIED`. | ["N = int(input())\nX = [int(x) for x in input().split()]\nprint(X)\nresult = list(filter(lambda x: x % 2 == 0, X))\ncount = 0\nfor i in result:\n if i % 3 == 0 or i % 5 == 0:\n count += 1\nprint('APPROVED' if count == len(result) else 'DENIED')", 'N = int(input())\nA = list(map(int, input().split()))\nlst = []\ncount = 0\nfor ele in A:\n if ele % 2 == 0:\n lst.append(ele)\nfor ele in lst:\n if ele % 3 == 0 or ele % 5 == 0:\n count += 1\nprint("APPROVED" if count == len(lst) else "DENIED")'] | ['Wrong Answer', 'Accepted'] | ['s842261660', 's460930713'] | [3060.0, 3060.0] | [17.0, 18.0] | [245, 255] |
p02773 | u006883624 | 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 math import sqrt\n#from heapq import heappush, heappop\n#from collections import deque\n\nn = int(input())\n\nl = []\nfor _ in range(n):\n s = input()\n l.append(s)\n\nl.sort()\n\nmax_count = 0\ncount = 0\nresults = []\nps = None\nfor s in l:\n if s == ps or ps is None:\n count += 1\n else:\n if max_count < count:\n max_count = count\n results = [ps]\n elif count == max_count:\n results.append(ps)\n count = 1\n ps = s\n\nif max_count < count:\n max_count = count\n results = [ps]\nelif count == max_count:\n results.append(ps)\n\nresults.sort()\nprint("--")\nfor str in results:\n print(str)\n', '#from math import sqrt\n#from heapq import heappush, heappop\n#from collections import deque\n\nn = int(input())\n\nl = []\nfor _ in range(n):\n s = input()\n l.append(s)\n\nl.sort()\n\nmax_count = 0\ncount = 0\nresults = []\nps = None\nfor s in l:\n if s == ps or ps is None:\n count += 1\n else:\n if max_count < count:\n max_count = count\n results = [ps]\n elif count == max_count:\n results.append(ps)\n count = 1\n ps = s\n\nif max_count < count:\n max_count = count\n results = [ps]\nelif count == max_count:\n results.append(ps)\n\nresults.sort()\nfor str in results:\n print(str)\n'] | ['Wrong Answer', 'Accepted'] | ['s742709963', 's472362263'] | [20680.0, 20680.0] | [605.0, 629.0] | [652, 640] |
p02773 | u013202780 | 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\ninput_line=int(input())\ncount=0\ninput_list=[]\nwhile count < input_line:\n input_list.append(input())\n count+=1\nans_list=[]\nlist_set=set(input_list)\nmax_appeard=Counter(input_list).most_common(1)[0][1]\nprint (max_appeard)\nfor item in list_set:\n appeard=Counter(input_list)[item]\n if appeard >= max_appeard:\n max_appeard=appeard\n ans_list.append(item)\nans_list.sort()\nfor item in ans_list:\n print (item)', 'from collections import Counter\n\ninput_line=int(input())\ncount=0\ninput_list=[]\nwhile count < input_line:\n input_list.append(input())\n count+=1\nans={}\nans_list=[]\nlist_set=set(input_list)\nmax_appeard=Counter(input_list).most_common(1)[0][1]\nprint (max_appeard)\nfor item in list_set:\n appeard=Counter(input_list)[item]\n if appeard >= max_appeard:\n max_appeard=appeard\n ans[item]=appeard\nfor key,value in ans.items():\n if value==max_appeard:\n ans_list.append(key)\nans_list.sort()\nfor item in ans_list:\n print (item)', 'from collections import defaultdict\n\nH=int(input())\nd = defaultdict(int)\nfor _ in range(H):\n d[input()] += 1\nmax_appeard=max(d.items(), key=lambda x: x[1])[1]\nans=[k for k,v in d.items() if v == max_appeard]\nans.sort()\nfor item in ans:\n print (item)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s417091284', 's550362944', 's760122356'] | [49776.0, 49780.0, 32480.0] | [2108.0, 2105.0, 751.0] | [456, 545, 253] |
p02773 | u015418292 | 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 i in range(n)]\n\na = Counter(s)\nprint(type(a))\nb = a.most_common()[0][1]\n\ns = list(set(s)) \n\n\nfor i in s:\n if s[i] == b:\n print(i)\n', 'from collections import Counter\nn = int(input())\ns = [input() for i in range(n)]\n\na = Counter(s)\nb = a.most_common()[0][1]\n\ns = list(set(s)) \n\nprint(a[])\n\nfor i in s:\n if a[i] == b:\n print(i)', 'from collections import Counter\nn = int(input())\ns = [input() for i in range(n)]\n\na = Counter(s)\nb = a.most_common()[0][1]\n\ns = list(set(s)) \n\n\nfor i in s:\n if a[i] == b:\n print(i)', 'from collections import Counter\nn = int(input())\ns = [input() for i in range(n)]\n\na = Counter(s)\n\nb = a.most_common()[0][1]\n\ns = list(set(s)) \ns.sort()\n\nfor i in s:\n if a[i] == b:\n print(i)\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s185565825', 's240151960', 's724394908', 's042694832'] | [45084.0, 2940.0, 45040.0, 45036.0] | [416.0, 17.0, 632.0, 721.0] | [238, 233, 222, 232] |
p02773 | u015593272 | 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. | ['mport collections\n\nN = int(input())\nS = []\n\nfor i in range(N):\n S.append(input())\n\nS.sort()\ncounter = collections.Counter(S)\n\ntmp = counter.most_common()\n\nif (len(tmp) == 1):\n print(tmp[0][0])\nelse:\n for i in range(len(tmp)-1):\n print(tmp[i][0])\n if (tmp[i][1] != tmp[i + 1][1]):\n break', 'import collections\n\nN = int(input())\nS = list(input() for i in range(N))\nS.sort()\n\ncommon = collections.Counter(S).most_common()\nN_common = common[0][1]\n\ncandidates = [cand for cand in common if cand[1] == N_common]\n\nfor i in sorted(candidates):\n print(i[0])'] | ['Runtime Error', 'Accepted'] | ['s023401328', 's907173571'] | [2940.0, 45116.0] | [17.0, 972.0] | [320, 261] |
p02773 | u018679195 | 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=[]\nha={}\n\nfor i in range (n):\n s.append(input())\n if (s[i] not in ha.keys()):\n ha[s[i]]=1\n else:\n ha[s[i]]=ha[s[i]]+1\n\nans=sorted(ha.items(),key=lambda x:x[i], reverse=True)\n\nk=ans[0][1]\ni=0\nwhile (i< len(ans) and ans[i][1]==k):\n i+=1\n\nans=ans[:i]\nans.sort()\nfor ss in ans:\n print(ss[0])\n', 'N=input()\nn=int(N)\n\np=[]\nfor i in range(n):\n p.append(input())\n\nq=list(set(p))\n\nmaxi=0\nbig=[]\n\nfor i in range(len(q)):\n if maxi<p.count(q[i]):\n maxi=p.count(q[i])\n big.append(q[i])\n big.pop(0)\n if maxi==p.count(q[i]):\n big.append(q[i])\n else:\n continue\n\nfor i in range(len(big)):\n print(big[i])', 'k=int(input())\nd=dict()\nfor i in range(k):\n x=input()\n d[x]=d.get(x,0)+1\nq=list()\nfor k,v in d.items():\n q.append( (v,k) )\nbigV=0\nfor (v,k) in sorted(q,reverse=True):\n if(v>bigV):\n bigV=v\nfor (v,k) in sorted(q):\n if(v==bigV):\n print(k)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s204536887', 's339098274', 's873193430'] | [43208.0, 29076.0, 48284.0] | [434.0, 2108.0, 917.0] | [334, 344, 265] |
p02773 | u018771977 | 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 = []\nwhile True:\n try:\n s.append(input())\n except EOFError:\n break\n\nword_counter = {}\nfor word in s:\n if word in word_counter:\n word_counter[word] += 1\n else:\n word_counter[word] = 0\n\nresults = sorted(word_counter.items(), key=lambda x: x[1], reverse=True)\nmax_v = results[0][1]\n\nfor r in results:\n if r[1] == max_v:\n print(r[0].strip('\\n'))\n else:\n break\n ", "n = int(input())\ns = []\nwhile True:\n try:\n s.append(input())\n except EOFError:\n break\n\nword_counter = {}\nfor word in s:\n if word in word_counter:\n word_counter[word] += 1\n else:\n word_counter[word] = 0\n\nresults = sorted(word_counter.items(), key=lambda x: x[1], reverse=True)\nmax_v = results[0][1]\n\npick_ups = [result[0] for result in results if result[1] == max_v]\nsorted_pick_ups = sorted(pick_ups)\nprint(*sorted_pick_ups, sep='\\n')"] | ['Wrong Answer', 'Accepted'] | ['s417953458', 's600797974'] | [46528.0, 51340.0] | [531.0, 693.0] | [436, 474] |
p02773 | u021019433 | 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 groupby\nfrom iterator import itemgetter\n\na = groupby(sorted(input() for _ in range(int(input()))))\na = [(len(tuple(g)), s) for s, g in a]\nm = max(a, key=itemgetter(0))[0]\nfor k, s in a:\n if k == m:\n print(s)\n', 'from itertools import groupby\nfrom itertools import itemgetter\n\na = groupby(sorted(input() for _ in range(int(input()))))\na = [(len(tuple(g)), s) for s, g in a]\nm = max(a, key=itemgetter(0))[0]\nfor k, s in a:\n if k == m:\n print(s)\n', 'from collections import Counter\n\nc = Counter(input() for _ in range(int(input())))\nm = max(c.values())\nfor s in sorted(s for s, k in c.items() if k == m) \n print(s)\n', 'from collections import Counter\n \nc = Counter(input() for _ in range(int(input())))\nm = max(c.values())\nfor s in sorted(s for s, k in c.items() if k == m): \n print(s)\n '] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s207485902', 's611618305', 's905871454', 's828435530'] | [3060.0, 3060.0, 2940.0, 32476.0] | [17.0, 18.0, 17.0, 611.0] | [234, 235, 166, 169] |
p02773 | u021763820 | 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 -*-\nN = int(input())\ns = []\nc = []\nd = []\nfor i in range(N):\n S = input()\n s.append(S)\nfor i in range(N):\n c.append(s.count(s[i]))\nfor i in range(N):\n if max(c) == c[i]:\n d.append(s[i])\nd = set(d)\nfor i in range(len(d)):\n print(list(d)[i])', '# -*- coding: utf-8 -*-\nfrom collections import Counter\nN = int(input())\nS = []\nfor i in range(N):\n s = input()\n S.append(s)\nS = Counter(S).most_common()\na = []\nb = []\nfor i in S:\n a.append(i[0])\n b.append(i[1])\nc = []\nfor i in range(b.count(max(b))):\n c.append(a[i])\nc.sort()\nprint(*c, sep="\\n")'] | ['Wrong Answer', 'Accepted'] | ['s201734426', 's509258381'] | [18840.0, 45040.0] | [2104.0, 724.0] | [281, 311] |
p02773 | u023229441 | 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())\nfrom collections import Counter\nC=Counter(A)\nqq=max(C.values())\nans=[]\nfor word,times in C.items():\n if times==qq:\n ans.append(word)\nprint(sorted(ans))', 'n=int(input())\nA=[]\nfor i in range(n):\n A.append(input())\nfrom collections import Counter\nC=Counter(A)\nqq=max(C.values())\nans=[]\nfor word,times in C.items():\n if times==qq:\n ans.append(word)\nans.sort()\nfor i in range(len(ans)):\n print(ans[i])\n'] | ['Wrong Answer', 'Accepted'] | ['s881245582', 's590755224'] | [39312.0, 35472.0] | [617.0, 732.0] | [214, 249] |
p02773 | u024768467 | 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 _ in range(n)]\n\nimport collections\ns_counter = collections.Counter(s_list)\n\nimport sys\nmax_count = s_counter.most_common()[0][1]\n\ns_list_keys = list(s_counter.keys())\ns_list_values = list(s_counter.values())\n\nlist_ans = []\n\nfor i in range(len(s_list_keys)):\n if s_list_values[i] == max_count:\n list_ans.append(s_list_keys[i])\n else:\n sys.exit()\n\nlist_ans.sort()\n\nfor i in range(len(list_ans)):\n print(list_ans[i])', 'n=int(input())\ns_list=[input() for _ in range(n)]\n\nimport collections\ns_counter = collections.Counter(s_list)\n\nimport sys\nmax_count = s_counter.most_common()[0][1]\n\ns_list_keys = list(s_counter.keys())\ns_list_values = list(s_counter.values())\n\nfor i in range(len(s_list_keys)):\n if s_list_values[i] == max_count:\n print(s_list_keys[i])\n else:\n sys.exit()', 'n=int(input())\ns_list=[input() for _ in range(n)]\n\nimport collections\ns_counter = collections.Counter(s_list)\n\nimport sys\nmax_count = s_counter.most_common()[0][1]\n\ns_list_keys = list(s_counter.keys())\ns_list_values = list(s_counter.values())\n\nlist_ans = []\n\nfor i in range(len(s_list_keys)):\n if s_list_values[i] == max_count:\n list_ans.append(s_list_keys[i])\n\nlist_ans.sort()\n\nfor i in range(len(list_ans)):\n print(list_ans[i])'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s301751750', 's505451029', 's781337062'] | [45072.0, 45072.0, 45068.0] | [790.0, 569.0, 768.0] | [471, 374, 442] |
p02773 | u024782094 | 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())\ns1 = []\nfor i in range(n):\n s1.append(input())\ns2=list(set(sorted(s1)))\nN=[]\nfor i in range (len(s2)):\n ni=s1.count(s2[i])\n N.append(ni)\nnm=max(N)\nfor i in range (len(s2)):\n if N[i]==nm:\n print(s2[i])', 'import collections as c\n \nn = int(input())\nalist = [input() for i in range(n)]\n \nclist = c.Counter(alist)\nanlist = clist.most_common()\nanslist = []\nfor i in range(0,len(anlist)):\n if anlist[0][1] == anlist[i][1]:\n anslist.append(anlist[i][0])\nanslistt = sorted(anslist)\n \nfor i in (anslistt):\n print(i)'] | ['Wrong Answer', 'Accepted'] | ['s266909625', 's600995597'] | [31172.0, 49204.0] | [2105.0, 744.0] | [224, 315] |
p02773 | u025287757 | 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 i in range(N):\n s = str(input())\n if not s in dic:\n dic[s] = 1\n else:\n dic[s] += 1\nmax_k_list = [kv[0] for kv in dic.items() if kv[1] == max(dic.values())]\nfor i in max_k_list:\n print(i)', 'import collections\n\nN = int(input())\na = []\nfor i in range(N):\n a.append(str(input()))\na = collections.Counter(a)\nb = max(a.values())\nmax_k_list = [kv[0] for kv in a.items() if kv[1] == b]\nfor i in max_k_list:\n print(i)', 'import collections\n\nN = int(input())\na = []\nfor i in range(N):\n a.append(str(input()))\na = collections.Counter(a)\nb = max(a.values())\nmax_k_list = [kv[0] for kv in a.items() if kv[1] == b]\nmak_k_list = sorted(max_k_list)\nfor i in max_k_list:\n print(i)', 'import collections\n\nN = int(input())\na = []\nfor i in range(N):\n a.append(str(input()))\na = collections.Counter(a)\nb = max(a.values())\nmax_k_list = [kv[0] for kv in a.items() if kv[1] == b]\nmax_k_list = sorted(max_k_list)\nfor i in max_k_list:\n print(i)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s298492614', 's482451236', 's883728982', 's911859184'] | [32092.0, 35564.0, 35568.0, 35572.0] | [2105.0, 522.0, 787.0, 683.0] | [226, 221, 253, 253] |
p02773 | u025463382 | 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 as cl\nn = int(input())\ns = []\nfor i in range(n):\n s.append(input())\nh = cl.Counter(s)\nitm = h.items()\n\nm = max(list(h.values()))\n\nmfil = list(filter(lambda x:x[1]==m ,itm))\nsorted(mfil)\n\nfor j in mfil:\n print(j[0])', 'import collections as cl\nfrom operator import itemgetter, attrgetter\nn = int(input())\ns = []\nfor i in range(n):\n s.append(input())\nh = cl.Counter(s)\nitm = h.items()\n\nm = max(list(h.values()))\n\nmfil = list(filter(lambda x:x[1]==m ,itm))\nmfil = sorted(mfil,key=itemgetter(0))\nfor j in mfil:\n print(j[0])'] | ['Wrong Answer', 'Accepted'] | ['s890386979', 's298995099'] | [47724.0, 49944.0] | [968.0, 802.0] | [289, 357] |
p02773 | u025595730 | 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\n\n\ndef main():\n n = int(input())\n polls_dict = {}\n for _ in range(n):\n poll = input()\n if poll not in polls_dict:\n polls_dict[poll] = 1\n else:\n polls_dict[poll] += 1\n\n max_poll = max(polls_dict.values())\n \n polls_dict = sorted(polls_dict)\n\n for key, value in polls_dict.items():\n if value == max_poll:\n print(key)\n else:\n pass\n\n #for poll in polls_set:\n # print(poll)\n \n return 0\n\n\nif __name__ == '__main__':\n main()\n", "# coding: utf-8\nfrom collections import Counter\n\n\ndef main():\n n = int(input())\n polls_list = []\n for _ in range(n):\n polls_list.append(input())\n polls_dict = Counter(polls_list)\n max_poll = max(polls_dict.values())\n\n polls_set = set()\n for key, value in polls_dict.items():\n if value == max_poll:\n polls_set.add(key)\n\n polls_set = sorted(polls_set)\n for poll in polls_set:\n print(poll)\n\n return 0\n\n\nif __name__ == '__main__':\n main()\n"] | ['Runtime Error', 'Accepted'] | ['s304044858', 's602680667'] | [32096.0, 44272.0] | [516.0, 693.0] | [588, 500] |
p02773 | u028014940 | 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=list(input(i) for i in range(n))\n\n# print(s)\nimport collections\nc = collections.Counter(s)\n\nmax_num=max(list(c.values()))\nfor i in range(len(c)):\n if c.most_common()[i][1]==max_num:\n print(c.most_common()[i][0])\n\n else:\n continue', "from collections import Counter\n\nn=int(input())\ns=list(input(i) for i in range(n))\n\ncounter = Counter(s)\nmax_cnt = max(counter.values())\nnames = [name for name, cnt in counter.items() if cnt == max_cnt]\nnames.sort()\n\nprint(*names, sep='\\n')", '\nimport sys\nfrom collections import Counter\nreadline = sys.stdin.buffer.readline \n\nn=int(input())\ns=["".join(readline().rstrip()) for _ in range(n)]\nprint(s)\n\ncounter = Counter(s)\nmax_cnt = max(counter.values())\nnames = [name for name, cnt in counter.items() if cnt == max_cnt]\nnames.sort()\n\nprint(*names, sep=\'\\n\')', '\nimport sys\nfrom collections import Counter\nreadline = sys.stdin.buffer.readline \n\nn=int(input())\ns=["".join(readline().rstrip().decode()) for _ in range(n)]\nprint(s)\n\ncounter = Counter(s)\nmax_cnt = max(counter.values())\nnames = [name for name, cnt in counter.items() if cnt == max_cnt]\nnames.sort()\n\nprint(*names, sep=\'\\n\')', "n=int(input())\ns=list(input(i) for i in range(n))\n\ncounter = Counter(s)\nmax_cnt = max(counter.values())\nnames = [name for name, cnt in counter.items() if cnt == max_cnt]\nnames.sort()\n\nprint(*names, sep='\\n')", '\nn=int(input())\ns=list(input(i) for i in range(n))\n\n# print(s)\nimport collections\nc = collections.Counter(s)\nc_srt=c.most_common()\n# print(c_srt)\n\nmoji=[i[0] for i in c.items() if i[1]==c.most_common()[0][1]]\nmoji_srt=sorted(moji)\nL="\\n".join(moji_srt)\nprint(L)', "from collections import Counter\n\nn=int(input())\ns=list(input(i) for i in range(n))\n\ncounter = Counter(s)\nmax_cnt = max(counter.values())\nnames = [name for name, cnt in counter.items() if cnt == max_cnt]\nnames.sort()\n\nprint(*names, sep='\\n')", '#!/usr/bin/env python3\nimport sys\nfrom collections import Counter\nreadline = sys.stdin.buffer.readline \n\nn=int(input())\ns=["".join(readline().rstrip()) for _ in range(n)]\nprint(s)\n\ncounter = Counter(s)\nmax_cnt = max(counter.values())\nnames = [name for name, cnt in counter.items() if cnt == max_cnt]\nnames.sort()\n\nprint(*names, sep=\'\\n\')', "\nfrom collections import Counter\n\nn=int(input())\ns=list(input(i).split() for i in range(n))\n\ncounter = Counter(s)\nmax_cnt = max(counter.values())\nnames = [name for name, cnt in counter.items() if cnt == max_cnt]\nnames.sort()\n\nprint(*names, sep='\\n')", 'n=int(input())\narr=[input() for _ in range(n)]\ndic={}\n\nfor i in range(n): \n if arr[i] not in dic:\n dic[arr[i]]=1\n else:\n dic[arr[i]]+=1\n\nlargest=max(dic.values()) \nans=[]\n\nfor keys in dic.keys():\n if dic[keys]==largest: \n ans.append(keys)\n\nans=sorted(ans) \nfor words in ans:\n print(words)'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s013554790', 's250698473', 's267336358', 's286404142', 's328448986', 's415987310', 's536731165', 's599766048', 's878083307', 's055016314'] | [46180.0, 36932.0, 3444.0, 40740.0, 18076.0, 62832.0, 36916.0, 3316.0, 52880.0, 35216.0] | [2106.0, 1442.0, 21.0, 292.0, 1119.0, 2107.0, 1452.0, 23.0, 1365.0, 667.0] | [267, 240, 335, 344, 207, 261, 240, 357, 249, 490] |
p02773 | u033524082 | 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 s=input()\n if s in dict_keys:\n dict[s]=1\n else:\n dict[s]+=1\nitems_sorted = sorted(dict.items(), key = lambda x : x[1])\nvalue=items_sorted[0][0]\ni=0\nwhile(1):\n if items_sorted[i][0]==value:\n print(items_sorted[i][1])\n else:\n break', 'import collections\n\nN = int(input())\nl = []\n \nfor _ in range(N):\n s = str(input())\n l.append(s)\n\nc = collections.Counter(l)\nc = c.most_common()\n \nmost_count = c[0][1]\nc.sort()\n \nfor i in range(len(c)):\n if c[i][1] == most_count:\n print(c[i][0])'] | ['Runtime Error', 'Accepted'] | ['s935012828', 's177758582'] | [3064.0, 45116.0] | [18.0, 915.0] | [315, 260] |
p02773 | u036340997 | 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 = {}\nm = 0\nfor i in range(n):\n s = input()\n if s in dic:\n dic[s] += 1\n m = max(m, dic[s])\n else:\n dic[s] = 1\n m = max(m, dic[s])\nans = []\nfor s in dic:\n if dic[s] == m:\n ans.append(s)\nprint('\\n'.join(ans))", "n = int(input())\ndic = {}\nm = 0\nfor i in range(n):\n s = input()\n if s in dic:\n dic[s] += 1\n m = max(m, dic[s])\n else:\n dic[s] = 1\n m = max(m, dic[s])\nans = []\nfor s in dic:\n if dic[s] == m:\n ans.append(s)\nprint('\\n'.join(ans.sort()))", "n = int(input())\ndic = {}\nm = 0\nfor i in range(n):\n s = input()\n if s in dic:\n dic[s] += 1\n m = max(m, dic[s])\n else:\n dic[s] = 1\n m = max(m, dic[s])\nans = []\nfor s in dic:\n if dic[s] == m:\n ans.append(s)\nprint('\\n'.join(sorted(ans)))"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s487048708', 's855813004', 's215702902'] | [34132.0, 32148.0, 34132.0] | [499.0, 619.0, 630.0] | [245, 252, 253] |
p02773 | u036492525 | 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)]\np1=list(set(s))\nN=len(p1)\nc=[0]*N\nfor i in range(N):\n\tc[i]=s.count(p1[i])\nm =max(c)\nc1=c.count(m)\nans=[0]\nfor i in range(N):\n\tif c[i]==m:\n\t\tans.append(p1[i])\nans1=sorted(ans)\nfor i in range(c1):\n\tprint(ans1[i])', 'n= int(input())\ns= [input() for i in range(n)]\np=set(s)\np1=list(p)\nN=len(s)\nc=[0]*N\nfor i in range(N):\n\tc[i]=s.count(p1[i])\nm =max(c)\nc1=c.count(m)\nans =[]\nfor i in range(N):\n\tif c[i]==m:\n\t\tans.append(p1[i])\nans1 = sorted(ans)\nfor i in range(c1):\n\tprint(ans1[i])', 'n= int(input())\ns= sorted([input() for i in range(n)])\ns.append("END")\nans=[]\nmax=-1\npast=s[0]\nc=1\nfor i in range(1,n+1):\n\tif past==s[i]:\n\t\tc+=1\n\telse:\n\t\tif c>max:\n\t\t\tmax=c\n\t\t\tans=[]\n\t\t\tans.append(s[i-1])\n\t\telif c==max:\n\t\t\tans.append(s[i-1])\n\t\tc=1\n\tpast=s[i]\nfor i in range(len(ans)):\n\tprint(ans[i])'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s191102200', 's560238349', 's907855279'] | [29076.0, 29076.0, 22012.0] | [2105.0, 2105.0, 630.0] | [257, 262, 299] |
p02773 | u038024401 | 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\n\nN = int(input())\nS = [None]*N\ncounter = {}\nfor i in range(N):\n tmp = input()\n if tmp in counter:\n counter[tmp] += 1\n else:\n counter[tmp] = 1\n\n#sort by value\ncounter_sorted = sorted(counter.items(), key=lambda x:x[1], reverse = True)\n\nprint\nprint(counter_sorted)\nprint\n\ntmp = counter_sorted[0][1]\noutput = []\nL = len(counter)\nfor i in range(L):\n if tmp == counter_sorted[i][1]:\n output.append(counter_sorted[i][0])\n else:\n break\n\n#sort by key\noutput = sorted(output)\nfor i in output:\n print(i)', 'import sys\n\nN = int(sys.stdin.readline())\nS = [None]*N\ncounter = {}\nfor i in range(N):\n tmp = input()\n if not tmp in counter:\n counter[tmp] = 0\n else:\n counter[tmp] += 1\n\ncounter_sorted = sorted(counter.items(), reverse = True)\ntmp = counter_sorted[0][1]\n\noutput = []\nL = len(counter)\nfor i in range(L):\n if tmp == counter_sorted[i][1]:\n output.append(counter_sorted[i][0])\n else:\n break\n\noutput = sorted(output)\nfor i in output:\n print(i)', 'import sys\n\nN = int(input())\nS = [None]*N\ncounter = {}\nfor i in range(N):\n tmp = input()\n if tmp in counter:\n counter[tmp] += 1\n else:\n counter[tmp] = 1\n\n#sort by value\ncounter_sorted = sorted(counter.items(), key=lambda x:x[1], reverse = True)\n\ntmp = counter_sorted[0][1]\noutput = []\nL = len(counter)\nfor i in range(L):\n if tmp == counter_sorted[i][1]:\n output.append(counter_sorted[i][0])\n else:\n break\n\n#sort by key\noutput = sorted(output)\nfor i in output:\n print(i)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s135873037', 's626171220', 's632268221'] | [56988.0, 49948.0, 48860.0] | [877.0, 1027.0, 747.0] | [550, 485, 515] |
p02773 | u039189422 | 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 = [int(input()) for i in range(N)]\n\ncount = Counter(S)\nmaxnum = max(count.values())\nmaxlist= [i for i,j in count.items() if j==maxnum]\n\nmaxlist.sort()\nprint("/n".join(maxlist))', 'from collections import Counter\nN = int(input())\nS = [input() for i in range(N)]\n\ncount = Counter(S)\nmaxnum = max(count.values())\nmaxlist= [i for i,j in count.items() if j==maxnum]\n\nmaxlist.sort()\nprint("/n".join(maxlist))', 'from collections import Counter\nN = int(input())\nS = [input() for i in range(N)]\n\ncount = Counter(S)\nmaxnum = max(count.values())\nmaxlist= [i for i,j in count.items() if j==maxnum]\n\nmaxlist.sort()\n\nfor m in maxlist:\n\tprint(m)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s855475628', 's871676299', 's376744125'] | [3316.0, 36592.0, 35572.0] | [20.0, 502.0, 614.0] | [227, 222, 225] |
p02773 | u041046014 | 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())\nll=[input() for i in range(N)]\nll=Counter(ll)\nll=ll.most_common()\nll.sort(key=lambda x:(x[1],x[0]))\nfor i in ll:\n print(i[0])\n', 'from collections import Counter\nN=int(input())\nll=[input() for i in range(N)]\nll=Counter(ll)\nll=ll.most_common()\nfor i in ll:\n print(i[0])', 'from collections import Counter\nN=int(input())\nll=[input() for i in range(N)]\nll=Counter(ll)\nll=ll.most_common()\nll=sorted(ll,key=lambda x:(x[1]),reverse=True)\nans=[l for l in ll if l[1]==ll[0][1] ]\nans=sorted(ans,key=lambda x:(x[0]),reverse=False)\nfor i in ans:\n print(i[0])\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s030038062', 's140969789', 's216971037'] | [47312.0, 43476.0, 43468.0] | [986.0, 590.0, 801.0] | [176, 141, 279] |
p02773 | u044964932 | 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 ss = {}\n max_s = -1\n for _ in range(n):\n s = input()\n if s not in ss:\n ss[s] = 0\n else:\n ss[s] += 1\n max_s = max(max_s, ss[s])\n\n anss = [s for s in ss if ss[s] == max_s]\n for ans in anss:\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n n = int(input())\n ss = {}\n max_s = 0\n for _ in range(n):\n s = input()\n if s not in ss:\n ss[s] = 0\n else:\n ss[s] += 1\n max_s = max(max_s, ss[s])\n\n ss = sorted(ss.items(), key=lambda x: x[0])\n anss = [s for s, i in ss if i == max_s]\n for ans in anss:\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n'] | ['Wrong Answer', 'Accepted'] | ['s099637593', 's418513628'] | [32096.0, 45852.0] | [422.0, 784.0] | [350, 396] |
p02773 | u045235021 | 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\nfrom collections import Counter\n\nN=int(input())\na=[input() for i in range(N)]\n\na = sorted(a)\n#print(a)\n\n\ncounter = Counter(a)\n\nmode_v = counter.most_common()[0][-1]\n\n#print(mode_v)\nit = itertools.takewhile(\n lambda kv: kv[-1] == mode_v, sorted(counter.most_common())\n)\n\n\n\nfor k, v in it:\n\tprint(k)', 'import itertools\nfrom collections import Counter\n\nN=int(input())\na=[input() for i in range(N)]\n\na = sorted(a)\n#print(a)\n\n\ncounter = Counter(a)\n\nmode_v = counter.most_common()[0][-1]\ncmc= counter.most_common()\n#print(cmc)\nit = itertools.takewhile(\n lambda kv: kv[-1] == mode_v, cmc\n)\n\n\nf=list(it)\n#print(f)\nf = sorted(f)\n#print(f)\nfor k in range(len(f)):\n\tprint(f[k][0])'] | ['Wrong Answer', 'Accepted'] | ['s174573401', 's093369690'] | [49028.0, 49428.0] | [1171.0, 1099.0] | [328, 383] |
p02773 | u046961553 | 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\ndef resolve_c():\n n = input()\n s_l = [input() for i in range(int(n))]\n c = collections.Counter(s_l)\n for k, v in c.items():\n if v == c.most_common()[0][1]:\n results.append(v)\n else:\n break\n results = sorted(results)\n for r in results:\n print(r)\nresolve_c()', 'import collections\ndef resolve_c():\n n = input()\n s_l = [input() for i in range(int(n))]\n c = collections.Counter(s_l)\n values, counts = zip(*c.most_common())\n results = sorted(list(values[:collections.Counter(counts)[max(counts)]]))\n fin = [print(r) for r in results]\nresolve_c()'] | ['Runtime Error', 'Accepted'] | ['s567417859', 's248242430'] | [45036.0, 59500.0] | [379.0, 896.0] | [336, 298] |
p02773 | u047197186 | 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 i in range(n):\n elem = input()\n if not elem in dic:\n dic[elem] = 1\n else:\n dic[elem] += 1\nmax_ = max(dic.values())\n\nres = []\nfor k, v in dic.items():\n if v == max_:\n res.append(v)\n\nres = sorted(res)\nfor elem in res:\n print(res)', 'n = int(input())\ndic = {}\nfor i in range(n):\n elem = input()\n if not elem in dic:\n dic[elem] = 1\n else:\n dic[elem] += 1\nmax_ = max(dic.values())\n\nfor k, v in dic.items():\n if v == max_:\n print(k)\n \n', 'n = int(input())\ndic = {}\nfor i in range(n):\n elem = input()\n if not elem in dic:\n dic[elem] = 1\n else:\n dic[elem] += 1\nmax_ = max(dic.values())\n\nres = []\nfor k, v in dic.items():\n if v == max_:\n res.append(k)\n\nres = sorted(res)\nfor elem in res:\n print(elem)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s692850727', 's720482078', 's424674411'] | [113628.0, 32096.0, 32988.0] | [2105.0, 457.0, 665.0] | [271, 216, 272] |
p02773 | u047719604 | 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())\nlst = [(input()) for _ in range(n)]\nlst.sort()\nc = Counter(lst)\nd = c.most_common()\nfor i,j in d:\n print(i)\n ', 'from collections import Counter\nn = int(input())\nlst = [(input()) for _ in range(n)]\nc = Counter(lst)\nd = c.most_common()\ne = d[0][1]\nlst_new = []\nfor f in c.keys():\n if c[f] == e:\n lst_new.append(f)\nlst_new.sort()\nfor g in lst_new:\n print(g) \n \n\n \n '] | ['Wrong Answer', 'Accepted'] | ['s536947810', 's343898551'] | [46864.0, 47672.0] | [636.0, 726.0] | [164, 283] |
p02773 | u048176319 | 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 d[s] = d.get(s, 0) + 1\n\nm = max(d[i] for i in d)\nprint(m, d)\n\nfor j in sorted(d):\n if d[j] == m:\n print(j)', 'n = int(input())\n\nd = {}\n\nfor i in range(n):\n s = input()\n d[s] = d.get(s, 0) + 1\n\nm = max(d[i] for i in d)\n\nfor j in sorted(d):\n if d[j] == m:\n print(j)'] | ['Wrong Answer', 'Accepted'] | ['s069779667', 's279155546'] | [40668.0, 32096.0] | [774.0, 744.0] | [181, 169] |
p02773 | u049725710 | 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=[str(input()) for i in range(n)]\nb=set(a)\nb=[[i,0]for i in b]\nlenb=range(len(b))\nfor i in lenb:\n for j in a:\n if j==b[i][0]:\n b[i][1]+=1\nmaxb=max(b,key=lambda x:x[1])\nmaxb=maxb[1]\nb=sorted(b,key=lambda x:x[0])\nprint(b)\nfor i in lenb:\n if b[i][1]==maxb:\n print(b[i][0])', 'n=int(input())\na=[str(input()) for i in range(n)]\nb=set(a)\nb=[[i,0]for i in b]\nlenb=range(len(b))\nfor i in lenb:\n for j in a:\n if j==b[i][0]:\n b[i][1]+=1\nmaxb=max(b,key=lambda x:x[1])\nmaxb=maxb[1]\nb=sorted(b,key=lambda x:x[1],reverse=True)\nprint(maxb)\nfor i in lenb:\n if b[i][1]==maxb:\n print(b[i][0])', 'n=int(input())\na=[str(input()) for i in range(n)]\nb=list(set(a))\nc=[[b[i-1],0]for i in range(len(b))]\nfor i in range(len(c)):\n for j in a:\n if j==c[i-1][0]:\n c[i-1][1]+=1\nd=sorted(c,key=lambda x:x[1],reverse=True)\nfor i in range(len(c)):\n if c[i-1][1]==c[0][1]:\n print(c[i-1][0])', 'n=int(input())\na=[str(input()) for i in range(n)]\nb=list(set(a))\nc=[[b[i],0]for i in range(len(b))]\nfor i in range(len(c)):\n for j in a:\n if j==c[i][0]:\n c[i][1]+=1\nd=sorted(c,key=lambda x:x[1],reverse=True)\ne=[]\nfor i in range(len(d)):\n if d[i][1]==d[0][1]:\n e.append(c[i][0])\n else:\n break\nfor i in sorted(e):\n print(i)\n', 'n=int(input())\na=[str(input()) for i in range(n)]\nb=list(set(a))\nc=[[b[i-1],0]for i in range(len(b))]\nfor i in range(len(c)):\n for j in a:\n if j==c[i-1][0]:\n c[i-1][1]+=1\nd=sorted(c,key=lambda x:x[1],reverse=True)\ne=[]\nfor i in range(len(c)):\n if c[i-1][1]==c[0][1]:\n e.append(c[i-1][0])\nfor i in sorted(e):\n print(i)\n', 'n=int(input())\na=[str(input()) for i in range(n)]\nb=list(set(a))\nc=[[b[i],0]for i in range(len(b))]\nfor i in range(len(c)):\n for j in a:\n if j==c[i][0]:\n c[i][1]+=1\nd=sorted(c,key=lambda x:x[1],reverse=True)\ne=[]\nfor i in range(len(c)):\n if c[i][1]==c[0][1]:\n e.append(c[i][0])\n else:\n break\nfor i in sorted(e):\n print(i)', 'n=int(input())\na=[str(input()) for i in range(n)]\nb=set(a)\nb=[[i,0]for i in b]\nlenb=range(len(b))\nfor i in lenb:\n for j in a:\n if j==b[i][0]:\n b[i][1]+=1\nmaxb=max(b,key=lambda x:x[1])\nmaxb=maxb[1]\nb=sorted(b,key=lambda x:x[1],reverse=True)\nfor i in lenb:\n if b[i][1]==maxb:\n print(b[i][0])', 'n=int(input())\na=set([str(input()) for i in range(n)])\nprint(sorted(a))', 'n=int(input())\na=[str(input()) for i in range(n)]\nb=list(set(a))\nc=[[b[i-1],0]for i in range(len(b))]\nfor i in range(len(c)):\n for j in a:\n if j==c[i-1][0]:\n c[i-1][1]+=1\nd=sorted(c,key=lambda x:x[1],reverse=True)\nprint(d)\nfor i in range(len(c)):\n if c[i-1][1]==c[0][1]:\n print(c[i-1][0])', 'n=int(input())\na=[str(input()) for i in range(n)]\nb={}\nfor i in a:\n if i in b:\n b[i]+=1\n else:\n b[i]=0\nmaxb=max(b.values())\nb=sorted(b.items(),key=lambda x:x[0])\nfor i,j in b:\n if maxb==j:\n print(i)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s124097046', 's279489690', 's296536000', 's511950894', 's574184783', 's621792901', 's700617598', 's702446640', 's991839465', 's068948555'] | [46352.0, 46352.0, 39688.0, 41928.0, 39692.0, 41932.0, 46348.0, 31732.0, 39692.0, 46352.0] | [2106.0, 2106.0, 2106.0, 2106.0, 2106.0, 2106.0, 2106.0, 533.0, 2110.0, 787.0] | [298, 314, 292, 340, 332, 339, 302, 71, 301, 210] |
p02773 | u049979154 | 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())\nwords = {}\n\nfor i in range(n) :\n new_word = input()\n if new_word in words.keys() :\n words[new_word] += 1\n else :\n words[new_word] = 1\n\nmx_freq = max(words.values())\nmx_words = [k for k in words.items() if words[k] == mx_freq]\n\nmx_words.sort()\n\nfor mx_word in mx_words :\n print(mx_word)', 'n = int(input())\nwords = {}\n\nfor i in range(n) :\n new_word = input()\n if new_word in words.keys() :\n words[new_word] += 1\n else :\n words[new_word] = 1\n\nmx_freq = max(words.values())\nmx_words = [k for k in words.keys() if words[k] == mx_freq]\n\nmx_words.sort()\n\nfor mx_word in mx_words :\n print(mx_word)'] | ['Runtime Error', 'Accepted'] | ['s583604131', 's321287988'] | [32096.0, 32096.0] | [384.0, 703.0] | [328, 327] |
p02773 | u052221988 | 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())\nwordlist = [input() for i in range(n)]\nwordtuple = tuple(set(wordlist))\nans = []\na = len(wordtuple)\nfor j in range(a) :\n checklist.append(wordlist.count(wordtuple[j]))\nanslist = [i for i, v in enumerate(checklist) if v == max(checklist)]\nfor k in range(len(anslist)) :\n ans.append(wordtuple[k])\nans.sort()\nfor l in range(len(ans)) :\n print(ans[l])', 'n = int(input())\nwordlist = [input() for i in range(n)]\nwordtuple = tuple(set(wordlist))\nans = []\na = len(wordtuple)\nfor j in range(a) :\n checklist.append(wordlist.count(wordtuple[j]))\nanslist = [i for i, v in enumerate(checklist) if v == max(checklist)]\nfor k in anslist :\n ans.append(wordtuple[k])\nans.sort()\nfor l in range(len(ans)) :\n print(ans[l])', 'n = int(input())\nd = {}\nfor i in range(n) :\n s = input()\n if s not in d :\n d[s] = 1\n else :\n d[s] += 1\nm = max(d.values())\nans = []\nfor i in d :\n if d[i] == m :\n ans.append(i)\nans.sort()\nfor i in ans:\n print(i)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s175428686', 's889583317', 's009149218'] | [29076.0, 29076.0, 32096.0] | [319.0, 308.0, 612.0] | [373, 361, 246] |
p02773 | u054514819 | 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())\nL = [str(input()) for _ in range(N)]\nc = Counter(L)\nfor i, x in enumerate(c.most_common()):\n if i>0 and x[1]!=m:\n break\n print(x[0])\n m = x[1]', 'from collections import Counter\nN = int(input())\nL = [str(input()) for _ in range(N)]\nc = Counter(L)\nans = []\nfor i, x in enumerate(c.most_common()):\n if i>0 and x[1]!=m:\n break\n ans.append(x[0])\n m = x[1]\nfor x in sorted(ans):\n print(x)'] | ['Wrong Answer', 'Accepted'] | ['s523469401', 's744987493'] | [46888.0, 45036.0] | [624.0, 786.0] | [197, 244] |
p02773 | u054622560 | 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 collections\nN = int(input())\nstrs = []\nfor _ in range(N):\n s = input()\n strs.append(s)\n#print('strs', strs)\nc = collections.Counter(strs)\nmaxv = -1\nans = []\nfor k , v in c.most_common():\n if v != maxv and maxv != -1:\n break\n ans.append(k)\n maxv = v\nfor a in sorted(ans, reverse=True):\n print(a)", "import sys\nimport collections\nN = int(input())\nstrs = []\nfor _ in range(N):\n s = input()\n strs.append(s)\n#print('strs', strs)\nc = collections.Counter(strs)\nmaxv = -1\nfor k , v in c.most_common():\n if v != maxv and maxv != -1:\n break\n print(k)\n maxv = v", "import sys\nimport collections\nN = int(input())\nstrs = []\nfor _ in range(N):\n s = input()\n strs.append(s)\n#print('strs', strs)\nc = collections.Counter(strs)\nprint('\\n'.join([ k for k , v in c.most_common()]))", "import sys\nimport collections\nN = int(input())\nstrs = []\nfor _ in range(N):\n s = input()\n strs.append(s)\n#print('strs', strs)\nc = collections.Counter(strs)\nmaxv = -1\nans = []\nfor k , v in c.most_common():\n if v != maxv and maxv != -1:\n break\n ans.append(k)\n maxv = v\nfor a in sorted(ans):\n print(a)"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s687261192', 's725633357', 's755516152', 's886540171'] | [47076.0, 46836.0, 45036.0, 45040.0] | [740.0, 602.0, 431.0, 751.0] | [321, 260, 209, 307] |
p02773 | u057065089 | 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 d = {}\n N = int(input())\n for i in range(N):\n s = input()\n d.setdefault(s, 1)\n d[s] += 1\n \n d = sorted(d.items())\n d = sorted(d, key=lambda x:x[1], reverse=True)\n for i in range(N):\n print(d[i][0])\n\nif __name__ == '__main__':\n main()\n", "def main():\n d = {}\n N = int(input())\n for i in range(N):\n s = input()\n d.setdefault(s, 1)\n d[s] += 1\n \n d = sorted(d.items())\n d = sorted(d, key=lambda x:x[1], reverse=True)\n n = d[0][1]\n for i in range(len(d)):\n if d[i][1] != n:\n break\n print(d[i][0])\n\nif __name__ == '__main__':\n main()\n"] | ['Runtime Error', 'Accepted'] | ['s995748593', 's039097401'] | [46640.0, 46700.0] | [591.0, 605.0] | [299, 363] |
p02773 | u057415180 | 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)]\nimport collections\nc = collections.Counter(s)\nd = c.most_common()\ne = [d[0][0]]\nfor i in range(len(d)-1): \n if d[0][1] == d[i+1][1]:\n e.append(d[i+1][0]) \ne.sort()\nprint(repr(e)) ', 'n = int(input())\ns = [input() for _ in range(n)]\nimport collections\nc = collections.Counter(s)\nd = c.most_common()\nprint(d[0][0])\nfor i in range(len(d)-1): \n if d[0][1] == d[i+1][1]:\n print(d[i+1][0])', "n = int(input())\ns = [input() for _ in range(n)]\nimport collections\nc = collections.Counter(s)\nd = c.most_common()\ne = [d[0][0]]\nfor i in range(len(d)-1): \n if d[0][1] == d[i+1][1]:\n e.append(d[i+1][0]) \ne.sort()\nprint('\\n'.join(e)) "] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s620133986', 's789869384', 's832339327'] | [51980.0, 46892.0, 50312.0] | [645.0, 611.0, 664.0] | [322, 234, 327] |
p02773 | u057483262 | 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 math\n\nfrom collections import defaultdict\nfrom collections import deque\ndef load(vtype=int):\n return vtype(input().strip())\ndef load_list(seplator=" ", vtype=int):\n return [vtype(v) for v in input().strip().split(seplator)]\ndef exit():\n import sys\n sys.exit(0)\ndef perm_sub(li, used):\n if len(li) == len(used):\n return [deque()]\n k = []\n for i in range(len(li)):\n if i in used:\n continue\n used.add(i)\n sub_list = perm_sub(li, used)\n for sub in sub_list:\n sub.appendleft(li[i])\n k.extend(sub_list)\n used.discard(i)\n return k\ndef perm_li(li):\n return perm_sub(li, set())\ndef perm_n(n):\n return perm_sub(list(range(n)), set())\ndef join_i(li, sep=""):\n return sep.join([str(e) for e in li])\ndef li2n(li):\n n, base = 0, 1\n for i in range(len(li)-1, -1, -1):\n n += li[i] * base\n base *= 10\n return n\ndef sli2ili(li):\n return [int(s) for s in li] \ndef prime_list(n):\n li = [i for i in range(2, n+1)]\n for i in range(len(li)):\n if li[i] >= int(math.sqrt(n)):\n break\n if li[i] == -1:\n continue\n for j in range(i+1, len(li)):\n if li[j] % li[i] == 0:\n li[j] = -1\n return [n for n in li if n != -1]\ndef gcd(a, b):\n a, b = max(a, b), min(a, b)\n while True:\n r = a % b\n if r == 0: return b\n a, b = b, r\ndef lcm(a, b):\n return int(a * b / gcd(a,b))\ndef all_subset(li):\n s = []\n n = len(li)\n for bit in range(0, (1<<(n+1))):\n ss = set()\n for i in range(0, n):\n if (bit & (1 << i)):\n ss.add(li[i])\n s.append(ss)\n return s\ndef factorial(n):\n if n == 1:\n return 1\n return n * factorial(n-1)\ndef mCn(m, n):\n def factorial_ntimes(m, n):\n r = 1\n while n:\n r *= m\n m -= 1\n n -= 1\n return r\n return int(factorial_ntimes(m, n) / factorial(n))\n\nn = load()\nA = []\nfor _ in range(n):\n A.append(load(str))\n\ncnt = defaultdict(int)\nmx = 0\nmxl = []\n\nfor a in A:\n cnt[a] += 1\n\nfor key, value in cnt.items():\n if value == mx:\n mxl.append(key)\n continue\n if value > mx:\n mx = value\n mxl = [key]\n continue\n\nfor m in mxl:\n print(m)\n\n\n ', 'import sys\nimport math\n\nfrom collections import defaultdict\nfrom collections import deque\ndef load(vtype=int):\n return vtype(input().strip())\ndef load_list(seplator=" ", vtype=int):\n return [vtype(v) for v in input().strip().split(seplator)]\ndef exit():\n import sys\n sys.exit(0)\ndef perm_sub(li, used):\n if len(li) == len(used):\n return [deque()]\n k = []\n for i in range(len(li)):\n if i in used:\n continue\n used.add(i)\n sub_list = perm_sub(li, used)\n for sub in sub_list:\n sub.appendleft(li[i])\n k.extend(sub_list)\n used.discard(i)\n return k\ndef perm_li(li):\n return perm_sub(li, set())\ndef perm_n(n):\n return perm_sub(list(range(n)), set())\ndef join_i(li, sep=""):\n return sep.join([str(e) for e in li])\ndef li2n(li):\n n, base = 0, 1\n for i in range(len(li)-1, -1, -1):\n n += li[i] * base\n base *= 10\n return n\ndef sli2ili(li):\n return [int(s) for s in li] \ndef prime_list(n):\n li = [i for i in range(2, n+1)]\n for i in range(len(li)):\n if li[i] >= int(math.sqrt(n)):\n break\n if li[i] == -1:\n continue\n for j in range(i+1, len(li)):\n if li[j] % li[i] == 0:\n li[j] = -1\n return [n for n in li if n != -1]\ndef gcd(a, b):\n a, b = max(a, b), min(a, b)\n while True:\n r = a % b\n if r == 0: return b\n a, b = b, r\ndef lcm(a, b):\n return int(a * b / gcd(a,b))\ndef all_subset(li):\n s = []\n n = len(li)\n for bit in range(0, (1<<(n+1))):\n ss = set()\n for i in range(0, n):\n if (bit & (1 << i)):\n ss.add(li[i])\n s.append(ss)\n return s\ndef factorial(n):\n if n == 1:\n return 1\n return n * factorial(n-1)\ndef mCn(m, n):\n def factorial_ntimes(m, n):\n r = 1\n while n:\n r *= m\n m -= 1\n n -= 1\n return r\n return int(factorial_ntimes(m, n) / factorial(n))\n\nn = load()\nA = []\nfor _ in range(n):\n A.append(load(str))\n\ncnt = defaultdict(int)\nmx = 0\nmxl = []\n\nfor a in A:\n cnt[a] += 1\n\nfor key, value in cnt.items():\n if value == mx:\n mxl.append(key)\n continue\n if value > mx:\n mx = value\n mxl = [key]\n continue\n\nfor m in sorted(mxl):\n print(m)\n\n\n '] | ['Wrong Answer', 'Accepted'] | ['s513321280', 's335016426'] | [35572.0, 36972.0] | [627.0, 804.0] | [2339, 2347] |
p02773 | u059684599 | 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\nc = Counter(s)\nm = max(c.values())\nans = []\nfor k,v in c.items():\n if v == m:\n ans.append(k)\nfor i in ans:\n print(i)', 'n = int(input())\ns = [input() for _ in range(n)]\n\nfrom collections import Counter\n\nc = Counter(s)\nm = max(c.values())\nans = []\nfor k,v in c.items():\n if v == m:\n ans.append(k)\nans.sort()\nfor i in ans:\n print(i)'] | ['Wrong Answer', 'Accepted'] | ['s002957867', 's527038842'] | [35464.0, 35476.0] | [533.0, 611.0] | [212, 223] |
p02773 | u061539997 | 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 tmp = input()\n if not tmp in s.keys():\n s[tmp] = 1\n else:\n s[tmp] += 1\nm = 0\nl = []\nfor i in sorted(s.items(), key=lambda x:x[1], reverse=True):\n if m < i[1]:\n m = i[1]\n l.append(i[0])\n else:\n break\n\nfor i in sorted(l):\n print(i)', 'n = int(input())\ns = {}\nfor i in range(n):\n tmp = input()\n if not tmp in s.keys():\n s[tmp] = 1\n else:\n s[tmp] += 1\nm = 0\nl = []\nfor i in sorted(s.items(), key=lambda x:x[1], reverse=True):\n if m <= i[1]:\n m = i[1]\n l.append(i[0])\n else:\n break\n \nfor i in sorted(l):\n print(i)'] | ['Wrong Answer', 'Accepted'] | ['s567813729', 's235415685'] | [43228.0, 43228.0] | [441.0, 773.0] | [326, 328] |
p02773 | u061984624 | 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 = dict()\nfor _ in range(n):\n s = input()\n if s in a:\n a[s] += 1\n else:\n a[s] = 1\n\nM = max(a.values())\nfor s in a:\n if a[s] == M:\n print(s)\n', 'n = int(input())\na = dict()\nfor _ in range(n):\n s = input()\n if s in a:\n a[s] += 1\n else:\n a[s] = 1\n\nM = max(a.values())\nans = []\nfor s in a:\n if a[s] == M:\n ans.append(s)\nans.sort()\nfor s in ans:\n print(s)\n'] | ['Wrong Answer', 'Accepted'] | ['s737701775', 's263919040'] | [32096.0, 32096.0] | [465.0, 622.0] | [191, 243] |
p02773 | u062808720 | 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 = []*n\n\nfor x in range(0, n) :\n l.append(input())\n\nl_sorted = sorted(l)\nc = collections.Counter(l_sorted)\nmc = c.most_common()\n\npre_v = 0\nans = []\nfor m in mc :\n k = m[0]\n v = m[1]\n if v < pre_v :\n break\n pre_v = v\n ans.append(k)\n\nans_sorted = sorted(ans)\nprint(ans_sorted)\n\n', 'import collections\n\nn = int(input())\nl = []*n\n\nfor x in range(0, n) :\n l.append(input())\n\nl_sorted = sorted(l)\nc = collections.Counter(l_sorted)\nmc = c.most_common()\n\npre_v = 0\nans = []\nfor m in mc :\n k = m[0]\n v = m[1]\n if v < pre_v :\n break\n pre_v = v\n ans.append(k)\n\nans_sorted = sorted(ans)\nfor a in ans_sorted :\n print(a)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s015983002', 's549271363'] | [55152.0, 50788.0] | [873.0, 879.0] | [339, 356] |
p02773 | u064264248 | 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_count = {}\nfor i in range(N):\n S = str(input())\n d_count.setdefault(S, 0)\n d_count[S] = d_count[S] + 1\nprint(d_count)\n\nmax = 0\nmaxlist = []\nfor S in d_count:\n if(max < d_count[S] ):\n max = d_count[S]\n maxlist = [S]\n if(max == d_count[S]):\n maxlist.append(S)\n\nmaxlist_set = list(set(maxlist))\nmaxlist_set.sort()\nfor a in maxlist_set:\n print(a)', 'N = int(input())\n\nd_count = {}\nfor i in range(N):\n S = str(input())\n d_count.setdefault(S, 0)\n d_count[S] = d_count[S] + 1\n\nmax = 0\nmaxlist = []\nfor S in d_count:\n if(max < d_count[S] ):\n max = d_count[S]\n maxlist = [S]\n if(max == d_count[S]):\n maxlist.append(S)\n\nmaxlist_set = list(set(maxlist))\nmaxlist_set.sort()\nfor a in maxlist_set:\n print(a)'] | ['Wrong Answer', 'Accepted'] | ['s736739024', 's414139340'] | [46940.0, 43996.0] | [945.0, 891.0] | [401, 386] |
p02773 | u064445353 | 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\nm = max(c.values())\n\nans = [k for k, v in c.items() if m == v]\nans.sort()\n\nprint(i for i in ans)', 'n = int(input())\n\ns = {}\ni = 0\nwhile n > i:\n s_tmp = input()\n if s.get(s_tmp):\n s[s_tmp] += 1\n else:\n s.setdefault(s_tmp, 1)\n i += 1\n \nmax_k_list = [kv[0] for kv in s.items() if kv[1] == max(s.values())]\n\nfor i in max_k_list:\n print(i)', 'n = int(input())\n\ns = {}\ni = 0\nwhile n > i:\n s_tmp = input()\n if s.get(s_tmp):\n s[s_tmp] += 1\n else:\n s.setdefault(s_tmp, 1)\n i += 1\n \nmax_d = max(s.values())\n\nprint(max_d)', 'import collections\nn = int(input())\ns = [input() for i in range(n)]\nc = collections.Counter(s).most_common()\nans = [k for k, v in c if c[0][1] == v]\nans.sort()\nfor i in ans:\n print(i)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s361209526', 's641244022', 's857229064', 's015811873'] | [35568.0, 32096.0, 32096.0, 45040.0] | [558.0, 2104.0, 427.0, 711.0] | [193, 267, 201, 186] |
p02773 | u066455063 | 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)]\n\ncnt = Counter(S)\nval = list(cnt.values())\nmost = val[-1]\n\nans = []\nfor i in cnt:\n if cnt[i] == most:\n ans.append(i)\n\nans.sort()\nfor i in range(len(ans)):\n print(ans[i])\n', 'from collections import Counter\n\nN = int(input())\nS = [input() for i in range(N)]\n\ncnt = Counter(S)\n\nmost = 0\nfor i in cnt.values():\n most = max(most, i)\n\nans = []\nfor i in cnt:\n if cnt[i] == most:\n ans.append(i)\n\nans.sort()\nfor i in range(len(ans)):\n print(ans[i])\n'] | ['Wrong Answer', 'Accepted'] | ['s772760708', 's053566658'] | [35572.0, 35572.0] | [710.0, 759.0] | [265, 282] |
p02773 | u067447457 | 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\nl=[]\nn=int(input())\nfor i in range(n):\n l.append(input())\nc=collections.Counter(l)\nmax_list=[kv[0] for kv in c.items() if kv[1]==max(c.values())]\n\nfor j in max_list:\n print(j)', 'from collections import Counter\n\nn=int(split())\nl=[input() for i in range(n)]\nc=Counter(l)\nd=max(c.values())\nmax_list=[k for k,v in c.items() if v==d]\nmax_list.sort()\nfor j in max_list:\n print(j)', 'from collections import Counter\n\nn=int(open(0).readline())\nl=open(0).read().split()\nc=Counter(l)\nmax_list=[kv[0] for kv in c.items() if kv[1]==max(c.values())]\nmax_list.sort()\nfor j in max_list:\n print(j.strip())', 'from collections import Counter\na=open(0)\nn=int(a.readline())\nl=a.read().split()\nc=Counter(l)\nd=max(c.values())\nmax_list=[k for k,v in c.items() if v==d]\nmax_list.sort()\nprint(*max_list,sep="\\n")'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s228133291', 's378510379', 's435446612', 's061981502'] | [35568.0, 3316.0, 3316.0, 38476.0] | [2105.0, 20.0, 21.0, 414.0] | [196, 196, 213, 195] |
p02773 | u068142202 | 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)]\nans = []\nout = []\nword_list = list(set(s))\n\nfor i in word_list:\n ans.append([s.count(i), i])\n\nans.sort(reverse = True)\n\nfor j in ans:\n if j[0] == ans[0][0]:\n out.append(j[1])\n\nout.sort(reverse = True)\nfor k in out:\n print(k)\n', 'n = int(input())\ns = [input() for i in range(n)]\nans = []\nword_list = list(set(s))\n\nfor i in word_list:\n ans.append([s.count(i), i])\n\nans.sort(reverse = True)\n\nfor j in ans:\n if j[0] == ans[0][0]:\n print(j[1])\n', 'from collections import Counter\n\nn = int(input())\ns = [input() for i in range(n)]\nans = {}\nword_list = list(set(s))\n\nans = Counter(word_list)\nfor k, v in sorted(ans.items()):\n if v == max(ans.values()):\n print(k)', 'import sys\ninput = sys.stdin.readline\n\nn = int(input())\ns = [input() for i in range(n)]\nans = {}\nword_list = list(set(s))\n\nfor i in word_list:\n ans[i] = s.count(i)\n\nfor k, v in sorted(ans.items()):\n if v == max(ans.values()):\n print(k)', 'from collections import Counter\nn = int(input())\ns = [input() for _ in range(n)]\nans = []\ncharctor_count = Counter(s)\nmax_count = max(charctor_count.values())\nfor k, v in charctor_count.items():\n if v == max_count:\n ans.append( k)\nprint("\\n".join(sorted(ans)))'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Time Limit Exceeded', 'Accepted'] | ['s025212785', 's464635105', 's464694714', 's732391955', 's681927452'] | [29076.0, 29068.0, 55788.0, 29332.0, 38060.0] | [2105.0, 2105.0, 2106.0, 2105.0, 598.0] | [280, 215, 216, 240, 264] |
p02773 | u068944955 | 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 _ in range(N):\n cand = input()\n if cand not in D:\n D[cand] = 1\n else:\n D[cand] += 1\nmx = max(D.values())\nA = sorted(D.items(), key=lambda x: -x[1])\n\nfor k, m in A:\n if m == mx:\n print(k)\n else:\n exit()\n', 'N = int(input())\nD = dict()\nfor _ in range(N):\n cand = input()\n if cand not in D:\n D[cand] = 1\n else:\n D[cand] += 1\nmx = max(D.values())\nA = sorted(D.items(), key=lambda x:-x[1],)\n\nfor k, m in A:\n if m == mx:\n print(k)\n if m != mx:\n exit()', 'N = int(input())\nD = dict()\nfor _ in range(N):\n cand = input()\n if cand not in D:\n D[cand] = 1\n else:\n D[cand] += 1\nmx = max(D.values())\nA = sorted(D.items(), key=lambda x: -x[1])\nans = []\nfor k, m in A:\n if m == mx:\n ans.append(k)\n else:\n break\n\nB = sorted(ans)\nfor b in B:\n print(b)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s545049695', 's973056524', 's938602310'] | [44888.0, 44892.0, 47576.0] | [582.0, 571.0, 705.0] | [277, 282, 331] |
p02773 | u074687136 | 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())\nwords = {}\nfor i in range(N):\n name = input()\n if name not in words:\n words[name] = 1\n elif name in words:\n words[name] += 1\n \nres_name = []\nfor i in res_dict.keys():\n if res_dict[i] == max(res_dict.values()):\n res_name.append(i)\nres_name = sorted(res_name)\nfor i in res_name:\n print(i)', 'N = int(input())\nwords = {}\nfor i in range(N):\n name = input()\n if name not in words:\n words[name] = 1\n else:\n words[name] += 1\n \nres_name = []\nfor i in res_dict.keys():\n if res_dict[i] == max(res_dict.values()):\n res_name.append(i)\nres_name = sorted(res_name)\nfor i in res_name:\n print(i)', "N = int(input())\nnames = []\nwords = {}\nfor i in range(N):\n name = input()\n if name not in names:\n words[name] = 1\n names.append(name)\n elif name in names:\n words[name] += 1\n \nmax_name_list = []\nfor nm in words.items():\n if nm[1] == max(words.values()):\n max_name_list.append(nm[0])\nmax_name_list = sorted(max_name_list)\nprint('-')\nfor i in range(len(max_name_list)):\n print(max_name_list[i])", 'N = int(input())\nwords = {}\nfor i in range(N):\n name = input()\n if name not in words:\n words[name] = 1\n elif name in words:\n words[name] += 1\n \nres_name = []\nMax = max(words.values())\nfor i in words.keys():\n if words[i] == Max:\n res_name.append(i)\nres_name = sorted(res_name)\nfor i in res_name:\n print(i)'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s012302721', 's079360185', 's931917580', 's137048130'] | [32224.0, 32096.0, 5012.0, 32984.0] | [373.0, 374.0, 2104.0, 626.0] | [320, 306, 441, 321] |
p02773 | u075109824 | 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(0, n):\n s.append(input())\nmy_dict = {i:s.count(i) for i in s}\nanswer = []\nitemMaxValue = max(my_dict.items(), key=lambda x: x[1])\nfor key, value in my_dict.items():\n if value == itemMaxValue[1]:\n answer.append(key)\n\nfor x in answer:\n print(x)', '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)'] | ['Wrong Answer', 'Accepted'] | ['s877298465', 's632267818'] | [19104.0, 45268.0] | [2105.0, 1003.0] | [297, 389] |
p02773 | u075303794 | 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 = {}\n\nfor i in range(n):\n temp = input()\n try:\n dic[temp] += 1\n except:\n dic[temp] = 0\n\ndic = dict(sorted(dic.items(), key=lambda x: x[0]))\n\nfor i in dic.keys():\n print(i)', "from collections import Counter\n\nn = int(input())\ns = [input() for _ in range(n)]\n\ncounter = Counter(s)\nmax_cnt = max(counter.values())\n\nnames = [name for name,val in counter.items() if val==max_cnt]\nnames.sort()\n\nprint(*names, sep='\\n')"] | ['Wrong Answer', 'Accepted'] | ['s245337394', 's567154848'] | [66140.0, 35824.0] | [898.0, 569.0] | [202, 237] |
p02773 | u077291787 | 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\nfrom collections import Counter\n\n\ndef main():\n _, *S = open(0).read().split()\n cnt = Counter(S)\n max_votes = max(cnt)\n ans = [k for k, v in cnt.items() if v == max_votes]\n ans.sort()\n print("\\n".join(ans))\n\n\nif __name__ == "__main__":\n main()\n', '# C - Poll\nfrom collections import Counter\n\n\ndef main():\n _, *S = open(0).read().split()\n cnt = Counter(S)\n max_votes = max(cnt.values())\n ans = [k for k, v in cnt.items() if v == max_votes]\n ans.sort()\n print("\\n".join(ans))\n\n\nif __name__ == "__main__":\n main()\n'] | ['Wrong Answer', 'Accepted'] | ['s105467839', 's550787307'] | [38520.0, 38392.0] | [111.0, 278.0] | [275, 284] |
p02773 | u078816252 | 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())\nname = [input() for i in range(N)]\nimport collections\n\nc = collections.Counter(name)\nvalues, counts = zip(*c.most_common(N))\nmaxim = counts[0]\nanswer = []\nfor val, cnt in zip(values,counts):\n if ( cnt == maxim):\n answer.append(val)\n else:\n break\nsorted(answer)\nfor i in answer:\n print(i)', 'N = int(input())\nname = [input() for i in range(N)]\nimport collections\n\nc = collections.Counter(name)\nvalues, counts = zip(*c.most_common(N))\nmaxim = counts[0]\nanswer = []\nfor val, cnt in zip(values,counts):\n if ( cnt == maxim):\n answer.append(val)\n else:\n break\nanswer = sorted(answer)\nfor i in answer:\n print(i)'] | ['Wrong Answer', 'Accepted'] | ['s218122401', 's399540796'] | [59536.0, 59536.0] | [874.0, 861.0] | [403, 412] |
p02773 | u079022693 | 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\ndef main():\n N=int(input())\n S=[""]*N\n result={}\n for i in range(N):\n S[i]=input().strip()\n if S[i] not in result:\n result[S[i]]=1\n else:\n result[S[i]]+=1\n\n result=sorted(result.items())\n print(result)\n result=sorted(result,key=lambda x:-x[1])\n\n max_num=result[0][1]\n for i in range(len(result)):\n if result[i][1]==max_num:\n print(result[i][0])\n else:\n break\n \nif __name__=="__main__":\n main()', 'import collections\nimport sys\nN = int(input())\nS = [input() for _ in range(N)]\n\nc = collections.Counter(S)\nans = []\nli=c.most_common()\nfor i in range(len(li)):\n if i == 0:\n ans.append(((li[0][0])))\n \n if i != 0:\n if (li[i-1][1]) == (li[i][1]):\n \n ans.append(((li[i][0])))\n else:\n break\n\nans.sort()\n\nfor i in ans:\n print(i)'] | ['Wrong Answer', 'Accepted'] | ['s883101176', 's481227908'] | [43992.0, 47636.0] | [824.0, 737.0] | [541, 388] |
p02773 | u080364835 | 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. | ["sl_s = sorted(list(set(sl)))\n\nif len(sl_s) == 1:\n print(sl[0])\nelse:\n ans = []\n count = 1\n for s in sl_s:\n if sl.count(s) == count and ans.count(s) == 0:\n ans.append(s)\n elif sl.count(s) > count and ans.count(s) == 0:\n ans.clear()\n ans.append(s)\n count = sl.count(s)\n print('\\n'.join(ans))", "from collections import Counter\n\nn = int(input())\nsl = list(input() for _ in range(n))\n\ncnt = Counter(sl)\n# print('cnt:', cnt)\nmaxNum = max(cnt.values())\n# print('maxNum:', maxNum)\n\nans = []\nfor k, v in cnt.items():\n if v == maxNum:\n ans.append(k)\n\nans.sort()\nprint('\\n'.join(ans))"] | ['Runtime Error', 'Accepted'] | ['s484711388', 's348281597'] | [3060.0, 35960.0] | [17.0, 552.0] | [362, 291] |
p02773 | u082978753 | 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_lis = []\nfor i in range(N):\n S_lis.append(input())\n\nunique_S_lis = list(set(S_lis))\nhaha = collections.Counter(S_lis)\nmaxind = [i for i, x in enumerate(list(haha.values())) if x == max(list(haha.values()))]\nlis_ans = sorted([unique_S_lis[i] for i in maxind])\n\nfor ans in lis_ans:\n print(ans)\n\n', 'N = int(input())\nS_lis = []\nfor _ in range(N):\n S_lis.append(input())\n\n\nS_set = set(S_lis)\nS_dict = dict()\n\nfor s in S_set:\n S_dict[s] = 0\n\nfor val in S_lis:\n S_dict[val] += 1\nmax_num = max(S_dict.values())\nans = list()\nfor k, v in S_dict.items():\n if v == max_num:\n ans.append(k)\nans = sorted(ans)\nfor res in ans:\n print(res)'] | ['Wrong Answer', 'Accepted'] | ['s319797286', 's717262695'] | [45356.0, 49424.0] | [2105.0, 699.0] | [337, 435] |
p02773 | u085717502 | 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. | ['#!/usr/bin/env python\n# coding: utf-8\n\n# In[12]:\n\n\nimport collections\n\n\n# In[13]:\n\n\nN = int(input())\nS = []\nfor _ in range(N):\n S.append(input())\n\n\n# In[14]:\n\n\nmylist = collections.Counter(S).most_common()\ncnt_tmp = mylist[0][1]\nfor word, cnt in mylist:\n if cnt != cnt_tmp:\n break\n print(word)\n cnt_tmp = cnt\n\n\n# In[ ]:\n\n\n\n\n', '#!/usr/bin/env python\n# coding: utf-8\n\n# In[12]:\n\n\nimport collections\n\n\n# In[22]:\n\n\nN = int(input())\nS = []\nfor _ in range(N):\n S.append(input())\n\n\n# In[26]:\n\n\nmylist = collections.Counter(sorted(S)).most_common()\ncnt_tmp = mylist[0][1]\nfor word, cnt in mylist:\n if cnt != cnt_tmp:\n break\n print(word)\n cnt_tmp = cnt\n\n\n# In[ ]:\n\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s748571210', 's596575661'] | [49448.0, 49256.0] | [398.0, 508.0] | [343, 351] |
p02773 | u086503932 | 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 = [input() for x in range(N)]\nmax=-1\nfor a in set(A):\n if A.count(a)>max:\n max=A.count(a)\n\nfor b in set(A):\n if A.count(b)==max:\n print(b)', 'N=int(input())\nd={}\nfor i in range(N):\n tmp = input()\n if tmp in d:\n d[tmp] += 1\n else:\n d[tmp] = 1\n\nmax_v=max(d.values())\nans=list(filter(lambda x: x[1] == max_v, d.items()))\n[print(i[0]) for i in sorted(ans)]'] | ['Wrong Answer', 'Accepted'] | ['s314124967', 's218135085'] | [29100.0, 46932.0] | [2105.0, 853.0] | [163, 219] |
p02773 | u088115428 | 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 = [input() for _ in range(N)]\nl.sort()\nl2 = []\nfor i in range(0,N-1):\n if (l[i]==l[i+1]):\n l2.append(l[i])\nans=list(set(l2))\nif len(l2)==0:\n for k in range(0,N):\n print(l[k])\nfor j in range(0,len(l2)):\n print(ans[j])', 'from collections import Counter\nN = int(input())\nS = Counter(input() for _ in range(N))\nm = max(S.values())\nfor v in sorted(k for k, v in S.items() if v == m):\n\tprint(v)'] | ['Runtime Error', 'Accepted'] | ['s843687366', 's251628701'] | [20796.0, 32480.0] | [595.0, 684.0] | [258, 169] |
p02773 | u088863512 | 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 -*-\nimport sys\nfrom collections import deque, defaultdict\nfrom math import sqrt, factorial\n# def input(): return sys.stdin.readline()[:-1] # warning not \\n\n\n\n\n\ndef solve():\n n = int(input())\n d = defaultdict(int)\n mx = 0\n for _ in range(n):\n s = input()\n d[s] += 1\n mx = max(mx, d[s])\n \n for k in d:\n if d[k] == mx:\n print(k)\n \n\n\n\nt = 1\n# t = int(input())\nfor case in range(1,t+1):\n ans = solve()\n\n\n\n\n"""\n\n4\n1 2\n2 4\n1 3\n3\n2 2 4\n4 5 6\n\n6\n1 2\n2 3\n3 4\n4 5\n4 6\n3\n3 5 6\n2 17 31 5 11\n\n"""\n\n\n\n', '# -*- coding: utf-8 -*-\nimport sys\nfrom collections import deque, defaultdict\nfrom math import sqrt, factorial\n# def input(): return sys.stdin.readline()[:-1] # warning not \\n\n\n\n\n\ndef solve():\n n = int(input())\n d = defaultdict(int)\n mx = 0\n for _ in range(n):\n s = input()\n d[s] += 1\n mx = max(mx, d[s])\n a = []\n for k in d:\n if d[k] == mx:\n a.append(k)\n a.sort()\n for e in a:\n print(e)\n \n\n\n\nt = 1\n# t = int(input())\nfor case in range(1,t+1):\n ans = solve()\n\n\n\n\n"""\n\n"""\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s735929128', 's323814114'] | [35376.0, 35636.0] | [384.0, 481.0] | [707, 689] |
p02773 | u089376182 | 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())\n\nd = defaultdict(int)\n\nfor _ in range(n):\n d[input()] += 1\n\nn = max(d.values())\n \nfor k, v in d.items():\n if v==n:\n print(k)', 'from collections import defaultdict\n\nn = int(input())\nd = defaultdict(int)\n\nfor _ in range(n):\n d[input()] += 1\n\nn = max(d.values())\nans = sorted(d.items()) \n \nfor ans_i in ans:\n if ans_i[1]==n:\n print(ans_i[0])'] | ['Wrong Answer', 'Accepted'] | ['s524059162', 's328775806'] | [32480.0, 44664.0] | [589.0, 927.0] | [190, 224] |
p02773 | u093861603 | 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=input()\ns=[]\nfor i in range(n):\n s.append(input())\nc=collections.Counter(s).most_common()\n\n\nprint(c[0][0])\nmx=c[0][1]\nfor i in range(1,len(c)):\n if c[i][1]==mx:\n print(c[i][0])\n else:\n exit()\n ', 'import collections\nn=int(input())\ns=[]\nfor i in range(n):\n s.append(input())\nc=collections.Counter(s).most_common()\n\nans=[c[0][0]]\nmx=c[0][1]\nfor i in range(1,len(c)):\n if c[i][1]==mx:\n ans.append(c[i][0])\n else:\n break\n\nans.sort()\nfor res in ans:\n print(res)\n '] | ['Runtime Error', 'Accepted'] | ['s769465675', 's956357981'] | [3316.0, 45040.0] | [21.0, 710.0] | [240, 290] |
p02773 | u094425865 | 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())\nsi = []\nfor i in range(n):\n si.append(input())\n\nwkmax = wk = 0\nb = c = []\nb = list(set(si))\nfor i in range(len(b)):\n c.append([b[i],[0]])\n\nfor j in range(len(c)):\n wk = si.count(c[j][0])\n c[j][1] = wk\n wkmax = max(wkmax,wk)\n\nfor i in range(len(c)):\n if c[i][1] == wkmax:\n print(c[i][0])', 'n = int(input())\nwk = wkmax = 0\nsi = {}\nfor i in range(n):\n st = input()\n if st in si:\n si[st] = si[st] + 1\n else:\n si[st] = 1\n wk = si[st]\n wkmax = max(wk,wkmax)\n\nfor i,j in si.items():\n if wkmax == j:\n print(i)', 'n = int(input())\nwk = wkmax = 0\nsi = {}\nfor i in range(n):\n st = input()\n if st in si:\n si[st] = si[st] + 1\n else:\n si[st] = 1\n wk = si[st]\n wkmax = max(wk,wkmax)\nsl = sorted(si.items())\nfor i in range(len(sl)):\n if wkmax == sl[i][1]:\n print(sl[i][0])'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s212642988', 's751827709', 's987082056'] | [58252.0, 32144.0, 44196.0] | [2108.0, 571.0, 958.0] | [328, 251, 290] |
p02773 | u101350975 | 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)]\nc = collections.Counter(S)\nl = c.most_common()\nn, m = l[0]\nfor i, j in l:\n if j == m:\n print(i)\n \n', 'import collections\nN = int(input())\nS = [input() for i in range(N)]\nc = collections.Counter(S)\nl = c.most_common()\nn, m = l[0]\nans = []\nfor i, j in l:\n if j == m:\n ans.append(i)\nprint(ans.sort())\n', 'import collections\nN = int(input())\nS = [input() for i in range(N)]\nc = collections.Counter(S)\nl = c.most_common()\nn, m = l[0]\nans = []\nfor i, j in l:\n if j == m:\n ans.append(i)\nfor a in sorted(ans):\n print(a)\n \n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s454291501', 's850528442', 's584485583'] | [46860.0, 45808.0, 49172.0] | [528.0, 638.0, 729.0] | [186, 206, 228] |
p02773 | u104005543 | 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 = list(str(input()) for i in range(n))\nSortedS = sorted(S) \ns = [] \nS2 = [] \ncount = 1\nfor i in range(n - 1):\n if i == n - 2 and SortedS[i] != SortedS[i + 1]:\n s.append(count)\n s.append(1)\n S2.append(SortedS[i])\n S2.append(SortedS[i + 1])\n \n else:\n if SortedS[i] == SortedS[i + 1]:\n count += 1\n if i == n - 2:\n s.append(count)\n S2.append(SortedS[i])\n else:\n s.append(count)\n S2.append(SortedS[i])\n count = 1\nans = []\nM = max(s)\nfor i in range(len(s)):\n if s[i] == M:\n print(ans[i])', 'n = int(input())\n\nS = list(str(input()) for i in range(n))\nSortedS = sorted(S) \ns = [] \nS2 = [] \ncount = 1\nfor i in range(n - 1):\n if i == n - 2:\n if SortedS[i] != SortedS[i + 1]:\n s.append(count)\n s.append(1)\n S2.append(SortedS[i])\n S2.append(SortedS[i + 1])\n else:\n s.append(count)\n S2.append(SortedS[i])\n \n else:\n if SortedS[i] == SortedS[i + 1]:\n count += 1\n else:\n s.append(count)\n S2.append(SortedS[i])\n count = 1\n\nM = max(s)\nfor i in range(len(s)):\n if s[i] == M:\n print(S2[i])', 'n = int(input())\n\nS = list(str(input()) for i in range(n))\nSortedS = sorted(S) \ns = [] \nS2 = [] \ncount = 1\nfor i in range(n - 1):\n if i == n - 2 and SortedS[i] != SortedS[i + 1]:\n s.append(count)\n s.append(1)\n S2.append(SortedS[i])\n S2.append(SortedS[i + 1])\n \n else:\n if SortedS[i] == SortedS[i + 1]:\n count += 1\n if i == n - 2:\n s.append(count)\n S2.append(SortedS[i])\n else:\n s.append(count)\n S2.append(SortedS[i])\n count = 1\n\nM = max(s)\nfor i in range(len(s)):\n if s[i] == M:\n print(s[i])', 'n = int(input())\n\nS = list(str(input()) for i in range(n))\nSortedS = sorted(S) \ns = [] \nS2 = [] \ncount = 1\nfor i in range(n - 1):\n if i == n - 2 and SortedS[i] != SortedS[i + 1]:\n s.append(count)\n s.append(1)\n S2.append(SortedS[i])\n S2.append(SortedS[i + 1])\n \n else:\n if SortedS[i] == SortedS[i + 1]:\n count += 1\n if i == n - 2:\n s.append(count)\n S2.append(SortedS[i])\n else:\n s.append(count)\n S2.append(SortedS[i])\n count = 1\nans = []\nM = max(s)\nfor i in range(len(s)):\n if s[i] == M:\n ans.append(S2[i])\nprint(ans)', 'n = int(input())\n\nS = list(str(input()) for i in range(n))\nSortedS = sorted(S) \ns = [] \nS2 = [] \ncount = 1\nfor i in range(n - 1):\n if i == n - 2 and SortedS[i] != SortedS[i + 1]:\n s.append(count)\n s.append(1)\n S2.append(SortedS[i])\n S2.append(SortedS[i + 1])\n \n else:\n if SortedS[i] == SortedS[i + 1]:\n count += 1\n if i == n - 2:\n s.append(count)\n S2.append(SortedS[i])\n else:\n s.append(count)\n S2.append(SortedS[i])\n count = 1\n\nM = max(s)\nfor i in range(len(s)):\n if s[i] == M:\n print(S2[i])'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s179276218', 's198479215', 's466417744', 's741903357', 's118381581'] | [22548.0, 24376.0, 22932.0, 31120.0, 24340.0] | [607.0, 819.0, 736.0, 775.0, 788.0] | [704, 698, 694, 719, 695] |
p02773 | u105302073 | 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)]\nd = {}\nm = 0\nfor s in S:\n if s in d:\n d[s] += 1\n m = max(m, d[s])\n else:\n d[s] = 1\n m = 1\nsd = sorted(d.items(), key=lambda x: x[1], reverse=True)\nfor k, v in sd:\n if v != m:\n break\n print(k)\n', 'n = int(input())\nS = [input() for _ in range(n)]\nd = {}\nm = 0\nfor s in S:\n if s in d:\n d[s] += 1\n else:\n d[s] = 1\n m = max(m, d[s])\n\nsd = sorted(d.items(), key=lambda x: x[1], reverse=True)\nans = []\nfor k, v in sd:\n if v != m:\n break\n ans.append(k)\n\nfor a in sorted(ans):\n print(a)\n'] | ['Wrong Answer', 'Accepted'] | ['s049118674', 's048648410'] | [46480.0, 48908.0] | [524.0, 792.0] | [288, 321] |
p02773 | u106311097 | 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. | ["#!python3.4\n# -*- coding: utf-8 -*-\n# abc155/abc155_c\nimport sys\nimport collections\n\ns2nn = lambda s: [int(c) for c in s.split(' ')]\nss2nn = lambda ss: [int(s) for s in list(ss)]\nss2nnn = lambda ss: [s2nn(s) for s in list(ss)]\ni2s = lambda: sys.stdin.readline().rstrip()\ni2n = lambda: int(i2s())\ni2nn = lambda: s2nn(i2s())\nii2ss = lambda n: [i2s() for _ in range(n)]\nii2nn = lambda n: ss2nn(ii2ss(n))\nii2nnn = lambda n: ss2nnn(ii2ss(n))\n\ndef main():\n N = i2n()\n c = collections.Counter()\n for _ in range(N):\n c[i2s()] += 1\n most_commons = c.most_common()\n most = most_commons[0][1]\n for mc in most_commons:\n if mc[1] != most:\n break\n print(mc[0])\n return\n\nmain()\n", "#!python3.4\n# -*- coding: utf-8 -*-\n# abc155/abc155_c\nimport sys\nimport collections\n\ns2nn = lambda s: [int(c) for c in s.split(' ')]\nss2nn = lambda ss: [int(s) for s in list(ss)]\nss2nnn = lambda ss: [s2nn(s) for s in list(ss)]\ni2s = lambda: sys.stdin.readline().rstrip()\ni2n = lambda: int(i2s())\ni2nn = lambda: s2nn(i2s())\nii2ss = lambda n: [i2s() for _ in range(n)]\nii2nn = lambda n: ss2nn(ii2ss(n))\nii2nnn = lambda n: ss2nnn(ii2ss(n))\n\ndef main():\n N = i2n()\n c = collections.Counter()\n most_n = 0\n most_s = []\n for _ in range(N):\n s = i2s()\n c[s] += 1\n if c[s] == most_n:\n most_s.append(s)\n elif c[s] > most_n:\n most_s = [s]\n most_n = c[s]\n # print(most_s)\n for ms in sorted(most_s):\n print(ms)\n return\n\nmain()\n"] | ['Wrong Answer', 'Accepted'] | ['s164386048', 's658778637'] | [45420.0, 33768.0] | [524.0, 572.0] | [716, 810] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.