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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02628 | u926266624 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n,k = list(map(int,input().split()))\n\np = lilst(map(int, input().split()))\n\np.sort()\n\nprint(sum(p[:k]))\n', 'n,k = list(map(int,input().split()))\n\np = list(map(int, input().split()))\n\np.sort()\n\nprint(sum(p[:k]))'] | ['Runtime Error', 'Accepted'] | ['s740475920', 's724741936'] | [9108.0, 9108.0] | [26.0, 28.0] | [104, 102] |
p02628 | u929217794 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n, k = map(int, input().split())\np = list(map(int, input().split()))\n\np.sort()\n\nans = 0\nfor i in range(k):\n ans += p.pop(0)', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\n\np.sort()\n\nans = p[:k].sum()\n \nprint(ans)', 'n, k = map(int, input().split())\np = list(map(int, input().s... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s112031738', 's731813538', 's515290321'] | [9200.0, 9168.0, 9256.0] | [23.0, 26.0, 24.0] | [124, 111, 110] |
p02628 | u929996201 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['a,b = map(int,input().split())\nc = []\nfor _ in range(a):\n\tc.append(int(input()))\nsort(c)\nprint(sum(c[0:b]))', 'a,b = map(int,input().split())\nc = list(map(int,input().split()))\nc.sort()\nprint(sum(c[0:b]))'] | ['Runtime Error', 'Accepted'] | ['s725494357', 's833046664'] | [9160.0, 9260.0] | [26.0, 32.0] | [107, 93] |
p02628 | u930223782 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['N, K = map(int, input().split())\nA = list(map(int, input().split()))\nA.sort()\nsum = 0\nfor x in A[0:N]:\n sum = sum + x\nprint(sum)', 'N, K = map(int, input().split())\nA = list(map(int, input().split()))\nA.sort()\nsum = 0\nfor x in A[0:K]:\n sum = sum + x\nprint(sum)'] | ['Wrong Answer', 'Accepted'] | ['s825079272', 's099315058'] | [9236.0, 9244.0] | [30.0, 33.0] | [131, 131] |
p02628 | u932370518 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['\nif __name__ == "__main__":\n N, K = [int(a) for a in input().split()]\n P = list(map(int, input().split()))\n list.sort(P)\n print(P)\n ans = sum(P[:K])\n print(ans)\n', '\nif __name__ == "__main__":\n N, K = [int(a) for a in input().split()]\n P = list(map(int, input().split()))\n list.sort(P)\n ans = su... | ['Wrong Answer', 'Accepted'] | ['s847028508', 's138465000'] | [9196.0, 9248.0] | [31.0, 31.0] | [167, 156] |
p02628 | u932868243 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n,k=map(int,input().split())\np=list(map(int(input().split()))\np.sort()\nq=p[:k]\nprint(sum(q))\n ', 'n,k=map(int,input().split())\np=list(map(intinput().split()))\np.sort()\nq=p[:k]\nprint(sum(q))\n ', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\np.sort()\nq=p[:k]\nprint(sum(q))\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s027647350', 's900919827', 's488508266'] | [8908.0, 9056.0, 8964.0] | [24.0, 25.0, 31.0] | [100, 99, 93] |
p02628 | u933650305 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['a = list(map(int,input().split()))\nb = list(map(int,input().split()))\nb.sort()\nfor i in b[a[1]]:\n c=0\n c+=b[i]\n return c\nprint(c)', 'a = list(map(int,input().split()))\nb = list(map(int,input().split()))\nb.sort()\nc=0\nfor i in b[a[1]]:\n c+=b[i]\n return c\nprint(c)\n', 'N, K = map(int, input().split())... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s065100092', 's320739759', 's556834956'] | [8924.0, 9032.0, 9232.0] | [27.0, 24.0, 29.0] | [132, 131, 95] |
p02628 | u935254309 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['N,K = map(int,input().split())\n\np=list(map(int,input().split()))\n\np.sort()\nprint(p)\n\nsum = 0\n\nfor i in range(K):\n print(i)\n sum += p[i]\n \n \nprint(sum)', 'N,K = map(int,input().split())\n\np=list(map(int,input().split()))\np.sort()\n\nsum = 0\n\nfor i in range(K):\n sum += p[i]\n \n ... | ['Wrong Answer', 'Accepted'] | ['s478685085', 's156990309'] | [9128.0, 9248.0] | [34.0, 28.0] | [162, 139] |
p02628 | u935511247 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['nn=int(input())\nkk=int(input())\nnum_value = list(map(int, input().split())) \nnum_value.sort()\ngoukei=0\nfor i in range(kk):\n goukei=goukei+num_value[kk]\nprint(goukei)', 'nn=int(input())\nkk=int(input())\nnum_value = list(map(int, input().split())) \nnum_value.sort()\ngoukei=0\nfor i in range(kk):\n for k ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s037662405', 's215913005', 's217593196', 's445131637', 's513594443', 's935011945', 's787641319'] | [9084.0, 8988.0, 9084.0, 9112.0, 9068.0, 9032.0, 9180.0] | [25.0, 23.0, 25.0, 30.0, 27.0, 27.0, 27.0] | [168, 293, 163, 166, 169, 161, 163] |
p02628 | u940402366 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n,k=map(int,input().split())\np=list(map(int,input().split()))\npnew=sorted(p)\nsums=0\nfor i in range(k):\n sums=sums+pnew[i]\n \nprint(pnew)\nprint(sums)', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\npnew=sorted(p)\nsums=0\nfor i in range(k):\n sums=sums+pnew[i]\n \n\nprint(sums)'] | ['Wrong Answer', 'Accepted'] | ['s478027014', 's017163879'] | [9256.0, 9032.0] | [32.0, 27.0] | [153, 142] |
p02628 | u942280986 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n,k=map(int,input().split())\nL=map(int,input().split())\n\nL_2=sorted(L)\n\nL_3=L_2[0:k]\nprint(L_3)\nprint(sum(L_3))', 'n,k=map(int,input().split())\nL=map(int,input().split())\n\nL_2=sorted(L)\n\nL_3=L_2[0:k]\nprint(sum(L_3))'] | ['Wrong Answer', 'Accepted'] | ['s395631234', 's557406345'] | [9248.0, 9252.0] | [24.0, 29.0] | [111, 100] |
p02628 | u944302117 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n, k = map(int, input().split())\npList = map(int, input().split())\nlist.sort(pList)\nscore = 0\nfor i in range(k):\n score += pList[i]\nprint(score)', 'n, k = map(int, input().split())\npList = map(int, input().split())\n\n#pList = [50, 100, 80, 120, 80]\nlist.sort(pList)\nscore = 0\nfor i in range(k):\n scor... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s067979918', 's411780425', 's736660555', 's446840965'] | [9232.0, 9196.0, 9164.0, 9080.0] | [34.0, 26.0, 22.0, 28.0] | [147, 192, 192, 204] |
p02628 | u944886577 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['a,b=map(int,input().split())\nc=[]\nc=input().split()\nd=c.sort()\nprint(d)\nans=0\nfor i in range(0,b):\n ans+=d[i]\n\nprint(ans)', 'a,b=map(int,input())\nc=[]\nc=input().split()\nd=c.sorted()\nans=0\nfor i in range(b):\n ans+=c[i]\nprint(ans)\n \n', 'a,b=map(int,input().split())\nc=list(map(int,input().split()))\n... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s017530233', 's378734750', 's435893801', 's933154849', 's630434633'] | [9216.0, 9032.0, 9232.0, 9184.0, 9160.0] | [26.0, 27.0, 28.0, 29.0, 28.0] | [121, 107, 131, 131, 132] |
p02628 | u945200821 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ["import itertools\nimport sys\nfrom typing import Callable, List, NoReturn\n\n\ndef main() -> NoReturn:\n readline: Callable[[], str] = sys.stdin.readline\n n, k = map(int, readline().rstrip().split()) # type: int,...\n p: List[int] = [int(_) for _ in readline().rstrip().split()]\n\n print(sum(p.sort()[:k... | ['Runtime Error', 'Accepted'] | ['s545036220', 's309362359'] | [10304.0, 10100.0] | [33.0, 44.0] | [352, 357] |
p02628 | u948368898 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['if __name__ == "__main__":\n N, K = list(map(int, input().split()))\n p = list(map(int, input().split()))\n\n print(p)\n p.sort()\n print(p)\n\n sum = 0\n for i in range(K):\n sum += p[i]\n \n print(sum)', 'if __name__ == "__main__":\n N, K = list(map(int, input().split()))\n p... | ['Wrong Answer', 'Accepted'] | ['s492132893', 's157060682'] | [9192.0, 9184.0] | [38.0, 27.0] | [225, 197] |
p02628 | u949315872 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n,k = map(int , input().split(""))\np = list(map(int , input()).split(""))\n \np.sort()\n \ntemp = 0\nfor i in p[:k] :\n temp += i\nprint(temp)', 'n,k = map(int , input().split( ))\np = list(map(int , input().split( ))\n \np.sort()\n \ntemp = 0\nfor i in p[:k] :\n temp += i\nprint(temp)', 'n,k = int(input()).split(... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s043432552', 's071533583', 's114224193', 's140186918', 's216678038', 's416150732', 's605527460', 's832570326', 's999847042', 's924659950'] | [9044.0, 8968.0, 9168.0, 9044.0, 9104.0, 9008.0, 9120.0, 8952.0, 8900.0, 9156.0] | [24.0, 22.0, 26.0, 26.0, 22.0, 26.0, 28.0, 26.0, 27.0, 29.0] | [136, 133, 125, 137, 138, 134, 139, 137, 132, 134] |
p02628 | u949679249 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['a, b = [int(x) for x in input().split()]\ncs = [int(x) for x in input().split()]\nprint(a, b)\nprint(cs)\ncs.sort()\n\nprint(sum(cs[:b]))', 'a, b = [int(x) for x in input().split()]\ncs = [int(x) for x in input().split()]\ncs.sort()\n\nprint(sum(cs[:b]))'] | ['Wrong Answer', 'Accepted'] | ['s841410351', 's721059871'] | [9204.0, 9248.0] | [35.0, 30.0] | [131, 109] |
p02628 | u951997475 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['from sys import stdin\n\nN, K = map(int, input().split())\nprices = list(map(int, input().split()))\n\nprices = sorted(prices)\n\nsum = 0\nfor i in range(0, K):\n print(prices[i])\n sum += prices[i]\nprint(sum)', 'from sys import stdin\n\nN, K = map(int, input().split())\nprices = list(map(int, input().split())... | ['Wrong Answer', 'Accepted'] | ['s697923893', 's582419341'] | [9180.0, 9200.0] | [31.0, 30.0] | [205, 184] |
p02628 | u955125992 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n, k = map(int, input().split())\np = sorted(list(int, input().split()))\n\nans = 0\nfor i in range(k):\n ans += p[i]\n\nprint(ans)', 'n, k = map(int, input().split())\np = sorted(list(map(int, input().split())))\n\nans = 0\nfor i in range(k):\n ans += p[i]\n\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s529957342', 's220703999'] | [9056.0, 9108.0] | [23.0, 34.0] | [127, 132] |
p02628 | u960956996 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['N, K = int(input().split())\njuice = []\nfor i in range(N):\n juice.append(list(map(int,input().split())))\njuice.sort()\nfor i in range(K):\n print (juice[0] + juice[1] + juice[2])', 'N, K = int(input().split())\njuice = []\nfor i in range(N):\n juice.append(list(input().split()))\njuice.sort()\nfor i in rang... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s136347517', 's252191406', 's264453523', 's113299265'] | [9100.0, 9040.0, 8852.0, 9276.0] | [26.0, 23.0, 26.0, 28.0] | [179, 150, 134, 90] |
p02628 | u967484343 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['a = input().split()\n# a[0] is N個\n# a[1] is K個\nb = list(map(int, input().split()))\nb.sort()\n\nprint(b)\nsum = 0\n\nfor i in range(int(a[1])):\n sum += b[i]\n\nprint(sum)', 'a = input().split()\nb = input().split()\nb.sort()\nsum = 0\n\nfor i in range(int(a[1])):\n sum += int(b[i])\n\nprint(sum)', 'a = input... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s190707448', 's399191025', 's634184035', 's768602382', 's706634955'] | [9248.0, 9092.0, 8972.0, 8928.0, 9248.0] | [25.0, 27.0, 24.0, 25.0, 31.0] | [168, 117, 147, 538, 159] |
p02628 | u968580153 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n,k=map(int,input().split(" "))\nl=list(map(int,input().split(" "))\nl.sort()\ns=0\nfor i in range(k):\n s+=l[i]\nprint(s)', '#!/usr/bin/env python\n# ---------------------------------------------------------------------------------------!\nimport os\nimport sys\nfrom io import BytesIO, IOBase\n# from bisect impor... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s016027151', 's200601994', 's952142485', 's997017399', 's866011609'] | [8868.0, 9200.0, 9020.0, 8988.0, 9104.0] | [23.0, 28.0, 24.0, 19.0, 28.0] | [119, 2502, 126, 160, 320] |
p02628 | u969848070 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n, k = map(int, input().split())\np = list(map(int, input().split()))\np = p.sort()\nprint(sum(p[:k]))', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\nprint(sum(p[:k]))'] | ['Runtime Error', 'Accepted'] | ['s406712102', 's127129502'] | [8956.0, 9064.0] | [26.0, 27.0] | [99, 95] |
p02628 | u972036293 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['N, M = int(input().split())\nlist = str(input().split())\nlist.sort()\ntotal = 0\nfor i in [0:M]:\n total += list[i]\nprint(total)\n\n', 'N, M = map(int, input().splilt())\nL = list(map(int, input().splilt()))\nprint(sum(sorted(L)[:M]))', 'N, M = map(int, input().splilt())\np = list(map(int, input().splilt()))\nprin... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s083392193', 's923559273', 's950552740', 's849300391'] | [8904.0, 9004.0, 8908.0, 9084.0] | [20.0, 24.0, 25.0, 26.0] | [127, 96, 96, 94] |
p02628 | u972479304 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['N = int(input())\nK = int(input())\np = []\n\nfor i in range(N):\n x = int(input())\n p.append(x)\n\np.sort()\n\ny = 0\n\nfor i in range(K):\n y += p[i]\n\nprint(y)\n', 'K = list(map(int, input().split()))\np = list(map(int, input().split()))\np.sort()\ny = 0\nfor i in range(K[1]):\n y += p[i]\nprint(y)\n... | ['Runtime Error', 'Accepted'] | ['s560253209', 's018863495'] | [8980.0, 9168.0] | [27.0, 25.0] | [159, 132] |
p02628 | u974918235 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['N, K = map(int, input().split())\nprice = [input() for _ in range(N)]\nprice.sort()\nprint(sum(price[:3]))', 'N, K = map(int, input().split())\nprice = [int(input()) for _ in range(N)]\nprice.sort()\nprint(sum(price[:3]))', 'N, K = map(int, input().split())\nprice = list(map(int, input().split()))\nprice.sort()\nprin... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s153757856', 's958317203', 's282195338'] | [9108.0, 8956.0, 9168.0] | [26.0, 22.0, 28.0] | [103, 108, 107] |
p02628 | u978167553 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['inputs = [input() for i in range(2)]\n\nN = inputs[0].split()[0]\nK = inputs[0].split()[1]\np = [int(pn) for pn in inputs[1].split()]\n\nans = sum(p.sort()[0:K])\nprint(ans)', 'inputs = [input() for i in range(2)]\n\nN = int(inputs[0].split()[0])\nK = int(inputs[0].split()[1])\np = [int(pn) for pn in inputs[1].split(... | ['Runtime Error', 'Accepted'] | ['s529934173', 's368513986'] | [9136.0, 9148.0] | [27.0, 27.0] | [166, 177] |
p02628 | u981418135 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ["n,k = map(int,input().split)\n\ns = input().rstrip().split(' ')\na = int(s[0]) \nsorted = []\nsorted.append(a)\n\nfor i in range(1,n):\n a = int(s[i]) \n sorted.append(a)\n \n main = i\n sub = i-1\n while main = 0:\n if(sorted[sub] > sorted[main]):\n stock = sorted[sub]\n sorted[sub] = sorted[main]... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s237033076', 's891084452', 's152329132'] | [8972.0, 9056.0, 9224.0] | [26.0, 24.0, 30.0] | [452, 213, 211] |
p02628 | u981747421 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['N,K = map(int,input().split())\nlist[N] = input().split()\nMIN = int(list[0])\nSUM = 0\nfor j in range(0,K):\n for i in list:\n if MIN > int(i):\n MIN = int(i)\n list.remove(str(MIN))\n SUM += MIN\n MIN = int(list[0])\nprint(SUM)\n', 'N,K = map(int,input().split())\nlist = input().split()\nMIN = int(list[... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s423442035', 's448027587', 's548522553', 's803978546'] | [9180.0, 9120.0, 9228.0, 9212.0] | [27.0, 21.0, 26.0, 113.0] | [231, 332, 223, 266] |
p02628 | u998082063 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n, k = inpl()\np = inpl()\np = sorted(p)\nans = 0\nfor i in range(n):\n ans += p[i]\n if i+1 == k:\n break\nprint(ans)', "from collections import defaultdict, deque\nimport sys\nimport heapq\nimport bisect\nimport itertools\nimport queue\nimport copy\nimport time\nsys.setrecursionlimit(10**8)\nINF = floa... | ['Runtime Error', 'Accepted'] | ['s003324100', 's845747126'] | [9044.0, 10024.0] | [27.0, 36.0] | [123, 503] |
p02628 | u999503965 | 2,000 | 1,048,576 | A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits. | ['n.k=map(int,input().split())\nlis=list(map(int,input().split()))\n\nans=0\nfor i in range(k):\n mi=min(lis)\n ans+=mi\n lis.remove(mi)\n \nprint(ans)', 'n,k=map(int,input().split())\nlis=list(map(int,input().split()))\n\nans=0\nfor i in range(k):\n mi=min(lis)\n ans+=mi\n lis.remove(mi)\n \nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s927329987', 's320656713'] | [9004.0, 9240.0] | [27.0, 44.0] | [144, 145] |
p02629 | u000660752 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['n=int(input())\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\n\nprint(num2alpha(n))', 'n=int(input())\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n ... | ['Wrong Answer', 'Accepted'] | ['s150455233', 's560227454'] | [9180.0, 9172.0] | [28.0, 31.0] | [221, 229] |
p02629 | u003142309 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['import string\n\n\nN = int(input())\nn_digits = len(str(1000000000000001))\nletters = string.ascii_lowercase\n\nx = N - 1\nans = []\n# while True:\n# x -= 1\n# mod = x % 26\n\n# x = x // 26\n# if x <= 0:\n# break\n\n# print(ans)\n# print("".join([ letters[v] for v in ans ]))\n\nwhile True:\n ... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s159649073', 's248660086', 's410305173', 's579324562', 's796017938', 's821541476'] | [9884.0, 9964.0, 9968.0, 9856.0, 9984.0, 9892.0] | [40.0, 38.0, 34.0, 39.0, 41.0, 38.0] | [511, 509, 513, 297, 498, 556] |
p02629 | u012484950 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['# -*- coding: utf-8 -*-\n\nimport numpy as np\n\ns = input()\n\nx = np.base_repr(int(s), 26)\n\nstrings = {\n"1": "a",\n"2": "b",\n"3": "c",\n"4": "d",\n"5": "e",\n"6": "f",\n"7": "g",\n"8": "h",\n"9": "i",\n"A": "j",\n"B": "k",\n"C": "l",\n"D": "m",\n"E": "n",\n"F": "o",\n"G": "p",\n"H": "q",\n"I": "r",\n"J": "s",\n... | ['Runtime Error', 'Accepted'] | ['s155388414', 's803130053'] | [27120.0, 9112.0] | [129.0, 30.0] | [420, 487] |
p02629 | u014268998 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["n = 123456789\n\nm = {}\nfor i in range(0,26):\n m[i] = chr(97+i)\n\nans = ''\nwhile 1:\n\n n -= 1\n\n x = n // 26\n y = n % 26\n\n ans = m[y] + ans\n\n n = x\n if n == 0:\n break\n\nprint(ans)\n", "n = int(input())\n\nm = {}\nfor i in range(0,26):\n m[i] = chr(97+i)\n\nans = ''\nwhile 1:\n\n n -= 1\n\n ... | ['Wrong Answer', 'Accepted'] | ['s997764067', 's084137318'] | [9092.0, 9076.0] | [30.0, 30.0] | [184, 187] |
p02629 | u014333473 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N=int(input())\nalphabet='zabcdefghijklmnopqrstuvwxyz'\nresult = ''\nwhile N > 0:\n result = alphabet[N%26]+result\n if N%26==0:\n N-=1\n N//=26\nprint(result)", "N=int(input())\nalphabet=list('abcdefghijklmnopqrstuvwxyz')\nresult = []\nwhile N >= 0:\n num, N = N%26, N//26\n result.append(alphabet[num-1])\n... | ['Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted'] | ['s164816826', 's500218206', 's544679262', 's819802436'] | [9912.0, 98824.0, 9828.0, 9172.0] | [2206.0, 2209.0, 2205.0, 32.0] | [159, 169, 165, 163] |
p02629 | u014562811 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["def func(tmp):\n print(tmp)\n ans = ''\n sub_ans = tmp/26\n if sub_ans >0:\n ans += func(int(sub_ans))\n\n ans += chr(96 + int(tmp)%26)\n \n return ans\n\n \ntmp = int(input())\nprint(func(tmp)[1:])", "def func(tmp):\n ans = ''\n sub_ans = (tmp-1)/26\n if int(sub_ans) >0:\n ans += func(int(sub_an... | ['Wrong Answer', 'Accepted'] | ['s194099414', 's641895296'] | [9172.0, 9176.0] | [32.0, 33.0] | [198, 235] |
p02629 | u015593272 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["\ndef main():\n import collections\n\n N = int(input())\n A_s = list(map(int, input().split()))\n Q = int(input())\n\n summ = sum(A_s)\n CNT_A = collections.Counter(A_s)\n\n\n for i in range(Q):\n before, after = map(int, input().split())\n \n tmp_cnt = CNT_A[before]\n ... | ['Runtime Error', 'Accepted'] | ['s231176847', 's917717204'] | [9388.0, 9172.0] | [31.0, 34.0] | [754, 235] |
p02629 | u016336953 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['num=int(input())\n\n\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\n\nans=num2alpha(num)\n\nprint(ans)', 'num=int(input())\n\n\ndef num2alpha(num):\n if num<=26:\n ... | ['Wrong Answer', 'Accepted'] | ['s515335416', 's288459424'] | [9192.0, 9168.0] | [30.0, 33.0] | [236, 244] |
p02629 | u016843859 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['def my_index_multi(l, x):\n return [i for i, _x in enumerate(l) if _x == x]\nN=int(input())\nA=list(map(int,input().split()))\nQ=int(input())\nBC=[]\nfor i in range(Q):\n BC.append(list(map(int,input().split())))\nfor i in BC:\n if i[0] in A:\n indexlist=my_index_multi(A,i[0])\n for j in indexl... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s040421544', 's807902012', 's513463245'] | [9232.0, 9008.0, 9168.0] | [29.0, 26.0, 28.0] | [351, 351, 228] |
p02629 | u017415492 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['n=int(input())\nN=0\nN+=n\nk=n\nddd=[]\nfor i in range(1,15):\n ddd.append((26**i)//25-1)\nketa=0\nsyo=0\nkou=0\nfor i in range(1,15):\n if (26**i-1)//25 == n:\n keta=i\n break\n if (26**i-1)//25 < n < (26**(i+1)-1)//25:\n keta=i\n break\nans=[]\nfor i in range(keta):\n ans.append(n%27)\n n=n//26\nan... | ['Wrong Answer', 'Accepted'] | ['s897246893', 's756197309'] | [9092.0, 9092.0] | [34.0, 29.0] | [449, 177] |
p02629 | u018679195 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N = int(input())\nans = ''\nfor i in range(1, 99):\n if N <= 26 ** i:\n N -= 1\n for j in range(i):\n ans += chr(ord('a') + N % 26)\n N //= 26\n break\n else:\n N -= 26 ** i\n print(ans[::-1]) \n", "a = int(input())\ns = []\nret = ['a', 'b', 'c', 'd', '... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s120008601', 's811415447', 's585832089'] | [9148.0, 9160.0, 9200.0] | [29.0, 31.0, 29.0] | [248, 491, 399] |
p02629 | u019053283 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['def num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\n\nn = num2alpha(123456789)\nprint(n.lower())', 'def num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif nu... | ['Wrong Answer', 'Accepted'] | ['s325961697', 's416488583'] | [9100.0, 9180.0] | [26.0, 30.0] | [228, 235] |
p02629 | u020472025 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["n = 1\nN = int(input())\n\nwhile True:\n if 26*(26**n-1)/25 >= N:\n break\n else:\n n +=1\n\nalpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\nnum = []\n\nnum = [0 for _ in range(n)]\n\nfor i in reversed(range(n)):\n p... | ['Wrong Answer', 'Accepted'] | ['s331565635', 's695994604'] | [9172.0, 9192.0] | [34.0, 31.0] | [484, 466] |
p02629 | u021906447 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['N =int(input())\nans = ""\n\nwhile True:\n matsubi = N%26\n matsubi = chr(64+matsubi)\n ans += matsubi\n N = N/26\n N = int(N)\n if N<26:\n last = chr(64+N)\n ans += last\n break;\n\nans2 = ans[::-1]\nprint(ans2.lower())', 'N =int(input())\nans = ""\n\nwhile True:\n N-=1\n matsubi = N%26\n mat... | ['Wrong Answer', 'Accepted'] | ['s262794198', 's703490219'] | [9020.0, 9156.0] | [28.0, 35.0] | [226, 187] |
p02629 | u024340351 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N = int(input())\n\nS = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\n\nfor j in range (0, 1000000):\n\tfor i in range (0, 26):\n\t\tS.append(S[j]+chr(96+i))\n\nprint(S[N])", "\nN = int(input())\n\nS = str()\n\nimport math\n\nK = [2... | ['Time Limit Exceeded', 'Runtime Error', 'Accepted'] | ['s530676160', 's974982877', 's483866764'] | [668648.0, 9088.0, 9156.0] | [2233.0, 35.0, 30.0] | [247, 407, 712] |
p02629 | u024550857 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N = int(input()) \nS = ''\nK = (26 + 26**2 + 26**3 + 26**4 + 26**5 + 26**6 + 26**7 + 26**8 + 26**9 + 26**10)\n\nfor outer in range(10):\n K -= 26**(10 - outer)\n print(K)\n if N > K:\n \n for iter in range(27):\n if N <= K + (iter) * 26**(10 - outer -1 ):\n S += chr(9... | ['Wrong Answer', 'Accepted'] | ['s225873857', 's849072178'] | [9136.0, 9152.0] | [32.0, 31.0] | [690, 700] |
p02629 | u025463382 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["def Base_10_to_n(X, n):\n #print(X)\n if (int(X/n)):\n return Base_10_to_n(int(X/n), n)+' '+str(X%n)\n return str(X%n)\nn = int(input()) -1\nan = Base_10_to_n(n,26)\nans = [chr(int(i)+96) for i in an.split()]\nif len(ans)>1:\n ans[-1] = chr(ord(ans[0-1]) +1)\nprint(''.join(ans))", "from bisect import bis... | ['Wrong Answer', 'Accepted'] | ['s255278370', 's781375403'] | [9200.0, 9212.0] | [28.0, 33.0] | [282, 271] |
p02629 | u028014940 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["\nimport math\n\nn=int(input())\nal=[chr(ord('a') + i) for i in range(26)]\n# print(al)\n# print(int(math.log(n,26))+1)\n\nlst=[]\nfor i in range(1,10):\n amari=n%26\n print(amari)\n n=n//26\n lst.append(al[amari-1])\n if n==0:\n break\n\n\nprint(''.join(lst[::-1]))\n", "n=int(input())\nans=''\n... | ['Wrong Answer', 'Accepted'] | ['s037670357', 's456135621'] | [9188.0, 9124.0] | [29.0, 26.0] | [271, 281] |
p02629 | u030278108 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['n = int(input())\n\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\n\n\nx = num2alpha(n)\nprint(x)', 'n = int(input())\n\ndef num2alpha(num):\n if num<=26:\n retur... | ['Wrong Answer', 'Accepted'] | ['s048648488', 's744378412'] | [9164.0, 9184.0] | [36.0, 32.0] | [231, 242] |
p02629 | u035044350 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N = int(input())\nans = ''\n \nwhile N > 0:\n\tN -= 1\n\tans += chr(ord('a') + N % 26).lower()\n\tN = N // 26\n print(ans[::-1])", 'def main():\n N = int(input())\n ans = \'\'\n \n while N > 0:\n N -= 1\n ans += chr(ord(\'a\') + N % 26).lower()\n N = N // 26\n print(ans[::-1])\n \n... | ['Runtime Error', 'Accepted'] | ['s653916603', 's221383903'] | [8884.0, 8976.0] | [31.0, 32.0] | [121, 209] |
p02629 | u035210736 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['a = list(\'abcdefghijklmnopqrstuvwxyz\')\nn = int(input()) - 1\n\nans = ""\nwhile True:\n b = n // 26\n c = n % 26\n print(b)\n print(c)\n if b == 0:\n ans = a[c] + ans\n break\n elif b == 1:\n ans = a[b - 1] + a[c] + ans\n break\n else:\n ans = a[c] + ans\n n = b - 1\n \nprint(ans)', 'a =... | ['Wrong Answer', 'Accepted'] | ['s286732027', 's688198186'] | [8992.0, 9152.0] | [29.0, 26.0] | [290, 268] |
p02629 | u035885928 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["s=int(input())\nd=[]\nwhile s>0:\n d.append(chr(s%26+97))\n s//=26\nt=''\nfor i in reversed(d):\n t+=i\nprint(t) ", "s=int(input())-1\nd=[]\nwhile s>=0:\n d.append(chr(s%26+97))\n s//=26\n s-=1\nt=''\nfor i in reversed(d):\n t+=i\nprint(t) "] | ['Wrong Answer', 'Accepted'] | ['s269919242', 's403000407'] | [8956.0, 9180.0] | [31.0, 31.0] | [109, 119] |
p02629 | u037675241 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['n = int(input())\ntmp = n\nans = []\n\ni = 1\n\nwhile n > 0:\n n -= 1\n r = n % 26\n ans.append(r)\n\n n = n // 26\n\n\nans.reverse()\nprint(ans)\nfor a in ans:\n print(chr(ord("a") + a), end="")', 'n = int(input())\ntmp = n\nans = ""\n\ni = 1\n\nwhile n > 0:\n n -= 1\n r = n % 26\n ans += chr... | ['Wrong Answer', 'Accepted'] | ['s217717704', 's695627917'] | [9044.0, 9176.0] | [30.0, 30.0] | [193, 144] |
p02629 | u038408819 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["num = int(input())\nans = ''\nwhile num > 26:\n num, rest = divmod(num, 26)\n ans += s[rest - 1]\n #print(ans)\nans += s[num - 1]\nprint(ans[::-1])", "num = int(input())\ns = 'abcdefghijklmnopqrstuvwxyz'\nans = ''\n\nwhile num > 0:\n num, rest = divmod(num, 26)\n ans += s[rest - 1]\n if rest == 0:\n... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s016206461', 's576883962', 's335660027'] | [9168.0, 9124.0, 9100.0] | [28.0, 32.0, 33.0] | [149, 202, 194] |
p02629 | u039876942 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['n = int(input())\nl = []\nwhile n:\n N -= 1\n l.append(chr(97+(n % 26)))\n n //= 26\n\nprint("".join(l[::-1]))\n', 'N = int(input())\nl = []\nwhile N:\n N -= 1\n l.append(chr(97+(N % 26)))\n N //= 26\n\nprint("".join(l[::-1]))\n'] | ['Runtime Error', 'Accepted'] | ['s662874659', 's832431924'] | [9076.0, 9004.0] | [25.0, 30.0] | [113, 113] |
p02629 | u039934639 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['n = int(input())\n\ndef NumToAlpha(n):\n if n<=26:\n return chr(64+n)\n elif n%26==0:\n return NumToAlpha(n//26-1)+chr(90)\n else:\n return NumToAlpha(n//26)+chr(64+n%26)\n \nN = NumToAlpha(n)\nprint(N)', 'n = int(input())\n\ndef NumToAlpha(n):\n if n<=26:\n return chr(9... | ['Wrong Answer', 'Accepted'] | ['s176795871', 's712115437'] | [9000.0, 9012.0] | [27.0, 35.0] | [228, 229] |
p02629 | u050622763 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['\ndef C():\n import math\n n= int(input())\n\n counter = 0\n for i in range(1,13):\n if int(26*(pow(26,i-1))/(26-1)) <= n < int(26*(pow(26,i))/(26-1)):\n counter = i\n break\n kekka = n - int(26*(pow(26,counter-1))/(26-1))\n\n alplist=["a","b","c","d","e","f","g","h","i"... | ['Wrong Answer', 'Accepted'] | ['s672424241', 's739258031'] | [9256.0, 9240.0] | [33.0, 30.0] | [698, 679] |
p02629 | u052244548 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N = int(input())\n\nans = 0\ncnt = 0\nadd = []\nsum = []\nwhile ans < N:\n add.append(ans)\n sum.append(ans**(cnt+1))\n cnt += 1\n ans += (26**cnt)\n\n\nA = N - add[cnt-1]\nprint(A)\nname =[]\nfor i in reversed(range(cnt)):\n div = A // (26**i)\n if i == 0:\n name.append(div-1)\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s916725346', 's284433581'] | [9100.0, 9192.0] | [32.0, 31.0] | [421, 510] |
p02629 | u054556734 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['import numpy as np\nimport scipy.sparse as sps\nimport scipy.misc as spm\nimport collections as col\nimport functools as func\nimport itertools as ite\nimport fractions as frac\nimport math as ma\nfrom math import cos,sin,tan,sqrt\nimport cmath as cma\nimport copy as cp\nimport sys\nimport re\nimport bisect as bs\nsy... | ['Runtime Error', 'Accepted'] | ['s727968981', 's706904592'] | [37808.0, 37692.0] | [188.0, 210.0] | [1222, 1083] |
p02629 | u054825571 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['N=int(input())\nketa=1\na=26\nwhile N>a:\n a*=26\n keta+=1\nans=""\nfor i in range(keta-1,0,-1):\n a=N//(26**i)-1\n N=N%(26**i)\n ans+=chr(ord(\'a\')+a)\nans+=chr(ord(\'a\')+N//(26**i))\nprint(ans)', 'N=int(input())\nketa=1\na=26\nwhile N>a:\n a*=26\n keta+=1\nans=""\nfor i in range(keta-1,0,-1):\n a=N//(26**... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s489465493', 's496059638', 's193188859'] | [9164.0, 9088.0, 9160.0] | [31.0, 30.0, 31.0] | [186, 186, 104] |
p02629 | u057948305 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['import string\nalpha = string.ascii_lowercase\n\nn = int(input())\n\nans = []\nwhile (n):\n res = (n % 26)\n print("n % 26: ", n % 26)\n print("letra: ", alpha[res-1])\n print(" n // 26: ", n // 26)\n ans.append(alpha[res-1])\n if (n <= 26):\n break\n if n % 26:\n n = n // 26\n e... | ['Wrong Answer', 'Accepted'] | ['s219180386', 's189860058'] | [9856.0, 9964.0] | [39.0, 39.0] | [438, 453] |
p02629 | u058592821 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["from decimal import *\nn = Decimal(input())\nans = ''\nwhile True:\n q, mod = divmod(n, Decimal('26'))\n ans = (chr(ord('a') + mod-1)) + ans\n if q == 0:\n break\n else:\n n = Decimal(q)\nprint(ans)\n \n", "n = int(input())\nans = ''\nwhile True:\n q, mod = divmod(n, 26)\n if mod ==... | ['Wrong Answer', 'Accepted'] | ['s241443325', 's380403384'] | [10068.0, 9064.0] | [37.0, 32.0] | [220, 244] |
p02629 | u062510078 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N = int(input())\nans = ''\nfor i in range(1, 99):\nif N <= 26 ** i:\nN -= 1\nfor j in range(i):\nans += chr(ord('a') + N % 26)\nN //= 26\nbreak\nelse:\nN -= 26 ** i\nprint(ans[::-1]) # reversed", "N = int(input())\nans = ''\nwhile N > 0:\n N -= 1\n ans += chr(ord('a') + N % 26)\n N //= 26\nprint(ans[::-1])"] | ['Runtime Error', 'Accepted'] | ['s467296880', 's005412037'] | [8928.0, 9104.0] | [23.0, 29.0] | [183, 107] |
p02629 | u065079240 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['N=int(input())\nketa=0\nn=N\nketakari=0\nwhile(1):\n keta+=1\n ketakari+=26**keta\n if N<=ketakari:\n break\nfor j in range(1,keta):\n N-=26**j\nans=""\n#print(keta)\n#print(ans)\nprint(N)\nN-=1\nfor i in range(keta):\n kari=N%26\n ans=chr(ord("a")+kari)+ans\n N//=26\nprint(ans)', 'N=int(i... | ['Wrong Answer', 'Accepted'] | ['s737878770', 's093746471'] | [9192.0, 9176.0] | [31.0, 29.0] | [287, 288] |
p02629 | u065099501 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["n = input()\nA = list(map(int, input().split()))\n\nN = int(input())\nans = ''\nfor i in range(1, 99):\n if N <= 26 ** i:\n N -= 1\n for j in range(i):\n ans += chr(ord('a') + N % 26)\n N //= 26\n break\n else:\n N -= 26 ** i\nprint(ans[::-1]) ", "N = int(input(... | ['Runtime Error', 'Accepted'] | ['s768111514', 's699777923'] | [8976.0, 9140.0] | [23.0, 29.0] | [286, 237] |
p02629 | u066120361 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['n = int(input())\nA = list(map(int, input().split()))\nq = int(input())\n\ntable = [0] * 100010\n\n\nfor i in A:\n table[i] += 1\n\n sum = 0\n\n for i in A:\n sum += i\n\n for i in range(q):\n b, c = map(int, input().split())\n cnt = table[b]\n sum += (c - b) * cnt\n table[c] += table[b]... | ['Runtime Error', 'Accepted'] | ['s865630959', 's772052576'] | [9196.0, 9156.0] | [28.0, 28.0] | [335, 110] |
p02629 | u069699931 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N=int(input())\nlis=[chr(i) for i in range(97, 97+26)]\nans=''\nwhile N>0:\n N-=1\n ans+=lis[N%26]\n N=N//26\nprint(ans[::-1]", "N=int(input())\nlis=[chr(i) for i in range(97, 97+26)]\nans=''\nwhile N>0:\n N-=1\n ans+=lis[N%26]\n N=N//26\nprint(ans[::-1])"] | ['Runtime Error', 'Accepted'] | ['s285989540', 's343272140'] | [8856.0, 9108.0] | [31.0, 30.0] | [127, 128] |
p02629 | u069978048 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N = int(input())\ncount = 0\nans = list()\nr = 0\nalp = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']\n\nwhile N > 26**count:\n count+=1\n\ncount = count - 1\n\nwhile count > 0:\n A = N % 26\n B = N // 26\n ans.append(A)\n N = B\n count = c... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s106436647', 's141204747', 's922573210', 's127730411'] | [9248.0, 113084.0, 111632.0, 9252.0] | [28.0, 2209.0, 2209.0, 51.0] | [540, 586, 575, 790] |
p02629 | u074353394 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N = int(input())\nalph = {key + 1: val for key, val in enumerate('abcdefghijklmnopqrstuvwxyz')}\nalph[0] = 'z'\nanswer = ''\nwhile N >= 1:\n answer = alph[N % 26] + answer\n if N == 26:\n break\n N //= 26\n\n print(answer)", "N = int(input())\nalph = {key + 1: val for key, val in enumerate('abcdefghijklmno... | ['Time Limit Exceeded', 'Accepted'] | ['s177196068', 's094691928'] | [9840.0, 9124.0] | [2205.0, 26.0] | [223, 226] |
p02629 | u075304271 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['import math\nimport collections\nimport fractions\nimport itertools\n\ndef solve():\n n=int(input())\n ans=\'\'\n check=\'abcdefghijklmnopqrstuvwxyz\'\n while n!=0:\n n-=1\n ans+=check[n%26]\n print(ans[::-1])\n return 0\n\nif __name__ == "__main__":\n solve()\n', 'def solve():\... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s234005809', 's321560842', 's749607340'] | [139040.0, 42392.0, 9108.0] | [507.0, 2206.0, 26.0] | [280, 210, 227] |
p02629 | u077003677 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['import sys\nimport os\nimport itertools\nimport numpy as np\nfrom collections import deque\n\ndef main():\n if os.getenv("ENV")==\'LOCAL\':\n sys.stdin = open(os.path.dirname(__file__)+\'/input.txt\', \'r\')\n\n N=int(input())\n alphabet=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p"... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s737442523', 's790865021', 's055233442'] | [27084.0, 27040.0, 27184.0] | [123.0, 127.0, 123.0] | [816, 603, 476] |
p02629 | u079022116 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["import re\nn = int(input())\n\nANS = []\ndef Base_10_to_n(X, n):\n if (int(X/n)):\n ANS.append(X%n)\n return Base_10_to_n(int(X/n), n)+str(X%n)\n else:\n return ''\n############################\n\n\n\nans = Base_10_to_n(n, 26)\n\nans = [str(n) for n in ANS][::-1]\nkore = ''\nfor i in ans:\n... | ['Wrong Answer', 'Accepted'] | ['s337031324', 's477490418'] | [9940.0, 9128.0] | [38.0, 30.0] | [1454, 105] |
p02629 | u082945913 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["n = int(input())\nl = []\n\nwhile(n > 0):\n l.append((n - 1) % 26)\n n = int((n - 1) / 26)\n\nprint(l)\nl.reverse()\n\nans = []\nfor i in l:\n ans.append(chr(i + ord('a')))\n \nprint(''.join(ans))", "n = int(input())\nl = []\n\nwhile(n > 0):\n l.append((n - 1) % 26)\n n = int((n - 1) / 26)\n\nl.reve... | ['Wrong Answer', 'Accepted'] | ['s392679469', 's270743090'] | [9172.0, 9172.0] | [32.0, 33.0] | [194, 185] |
p02629 | u090406054 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['n=int(input())\n\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\nnum2alpha(n)', 'n=int(input())\n\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n eli... | ['Wrong Answer', 'Accepted'] | ['s985845417', 's206960527'] | [9036.0, 9068.0] | [29.0, 27.0] | [246, 262] |
p02629 | u094425865 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["n = int(input())\n \nan =[]\ni=0\nwhile i <11:\n i+=1\n if 26**(11-i)<=n:\n wk = n//26**(11-i)\n if wk==1 and n//27**(11-i)<1:\n an.append('z')\n i+=1\n continue\n print(wk,n,i)\n an.append(chr(wk%26+96))\n n -= wk*26**(11-i)\n\nprint(''.join(a... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s757609405', 's917087015', 's829720690'] | [9120.0, 9100.0, 9100.0] | [29.0, 31.0, 29.0] | [305, 229, 202] |
p02629 | u094999522 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['from collections import defaultdict\ninput()\na = [*map(int, input().split())]\ns = sum(a)\nb = [[*map(int,input().split())] for _ in range(int(input()))]\nc = defaultdict(int)\nfor i in a:\n c[i]+=1\nfor i,j in b:\n s += (j-i)*c[i]\n c[j]+=c[i]\n c[i] = 0\n print(s)\n', 'def base(n, b):\n d="abcdef... | ['Runtime Error', 'Accepted'] | ['s322903556', 's260738635'] | [9392.0, 9176.0] | [30.0, 29.0] | [271, 221] |
p02629 | u095384238 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['N = int(input())\nfrom decimal import Decimal\nname = ""\ntempN = Decimal(N)\nwhile tempN > 0:\n name += chr(Decimal(tempN % 26) + 96)\n tempN = Decimal(tempN // 26)\nprint(name[::-1])', 'N = int(input())\nname = ""\ntempN = N\nwhile tempN > 0:\n num = tempN % 26\n if num == 0:\n num = 26\n name... | ['Wrong Answer', 'Accepted'] | ['s085702645', 's200675400'] | [10064.0, 9080.0] | [85.0, 33.0] | [183, 183] |
p02629 | u095403885 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["n = int(input())\ndef a(n):\n print(n)\n word = ''\n while n:\n a ,b = divmod(n, 26)\n print(a, b)\n if b == 0:\n word += (chr(96 + 26))\n n = a - 1\n else:\n word += (chr(96 + b))\n n = a\n print(word[::-1])\n print('---------')\n... | ['Wrong Answer', 'Accepted'] | ['s586309094', 's932087641'] | [31952.0, 9172.0] | [2283.0, 34.0] | [333, 196] |
p02629 | u101113363 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['N=int(input())\ndef kore(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\ns=kore(N)\ns.lower()\nprint(s)', 'N=int(input())\ndef kore(num):\n if num<=26:\n return chr(64+num)\n ... | ['Runtime Error', 'Accepted'] | ['s667757853', 's456542196'] | [9168.0, 9104.0] | [30.0, 28.0] | [224, 217] |
p02629 | u101350975 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["import string\nimport itertools\nn = int(input())\nl = list(string.ascii_lowercase)\nl.insert(0, 0)\n\namari = []\nwhile n != 0:\n amari.append(n % 26)\n n = n // 26\namari.reverse()\nanswer_list = []\nfor i in amari:\n if isinstance(i, str):\n answer_list.append(l[i])\nans = ''.join(answer_list)\npri... | ['Wrong Answer', 'Accepted'] | ['s640721498', 's131778227'] | [9832.0, 9920.0] | [41.0, 37.0] | [310, 579] |
p02629 | u106181248 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['n = int(input())\nans = ""\n\nwhile n > 0:\n n -= 1\n ans += chr(ord(\'a\') + n % 26)\n n //= 26\n print(n)\n\nprint(ans[::-1])', 'n = int(input())\nans = ""\n\nwhile n > 0:\n n -= 1\n ans += chr(ord(\'a\') + n % 26)\n n //= 26\n\nprint(ans[::-1])'] | ['Wrong Answer', 'Accepted'] | ['s377846436', 's614796009'] | [9004.0, 9100.0] | [27.0, 30.0] | [128, 115] |
p02629 | u107494228 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['import math\nn=int(input())\na=[]\ny=int(math.log(n,26))\nfor i in range(y+1):\n a.append(n%(26**(i+1)))\nfor i in range(y+1):\n a[i]=a[i]//(26**i)\na.reverse()\nprint(a,y)\nq=[\'a\', \'b\', \'c\', \'d\', \'e\', \'f\', \'g\', \'h\', \'i\', \'j\', \'k\', \'l\', \'m\', \'n\', \'o\', \'p\', \'q\', \'r\', \'s\', \'... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s706352785', 's818191683', 's826804931', 's871032285', 's894325145', 's974630278', 's973401571'] | [9216.0, 9176.0, 9144.0, 9188.0, 9160.0, 9288.0, 9100.0] | [28.0, 30.0, 28.0, 29.0, 30.0, 27.0, 28.0] | [351, 449, 434, 352, 409, 451, 159] |
p02629 | u111473084 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['def main():\n import sys\n sys.setrecursionlimit(10**9)\n input = sys.stdin.readline\n\n a = "zabcdefghijklmnopqrstuvwxy"\n N = int(input())\n if N <= 26:\n print(a[N%26])\n\n ans = []\n d = 1\n m = 26\n while N != 0:\n tmp = (N % m)\n ans.append(a[tmp//d])\n ... | ['Wrong Answer', 'Accepted'] | ['s769341336', 's780423446'] | [9032.0, 9148.0] | [30.0, 33.0] | [454, 437] |
p02629 | u111652094 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N=int(input())\n\n\nlista=[chr(i) for i in range(97, 97+26)]\nalphlist=[1]\nanslist=[]\nfor i in range(1,12):\n if i==1:\n a=alphlist[i-1]+26**i-1\n else:\n a=alphlist[i-1]+26**i\n alphlist.append(a)\n\nfor i in range(12):\n if N<=alphlist[i]:\n keta=i\n break\na=keta\nNi=N\nfo... | ['Runtime Error', 'Accepted'] | ['s631775830', 's855523844'] | [9228.0, 9160.0] | [31.0, 29.0] | [483, 269] |
p02629 | u112247039 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["def conv(n):\n if (n>26):\n conv(n//26)\n print('z' if n%26==0 else chr(96+(n%26)), end='')\nconv(int(input()))", "def conv(n):\n if (n>25):\n conv(n//26)\n print(chr(96+(n%26)), end='')\nconv(int(input()))", 'n = int(input())\nstock = [chr(i) for i in range(97, 97 + 26)]\nfull, count, j = 2... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s114580096', 's893304790', 's746279131'] | [9060.0, 9044.0, 8976.0] | [29.0, 31.0, 29.0] | [120, 100, 263] |
p02629 | u113255362 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['a=int(input())\nK = 0\nb = 0\nList = [27]*13\nres = ""\nfor i in range(0,12):\n K = a % 26\n b = a-K\n a = b/26\n List[i] = int(K)\nfor i in range(13):\n if List[12-i] ==27:\n pass\n elif List[12-i] ==0:\n res += chr(26+96)\n else:\n res += chr(List[12-i]+96)\nprint(res)', 'a=int(input())\nK = 0\nb = ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s123344497', 's986664077', 's655141905'] | [9184.0, 9208.0, 9204.0] | [31.0, 30.0, 29.0] | [270, 305, 277] |
p02629 | u114954806 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["import string\n\ndef main():\n N=int(input())\n alphabet = string.ascii_lowercase\n a = [26**(12-i) for i in range(12)]\n ans = []\n print(a)\n for i in range(12):\n if N > a[i]:\n if N // a[i] == 0:\n continue\n tmp = N // a[i]\n N -= (a[i]*tmp... | ['Wrong Answer', 'Accepted'] | ['s588726516', 's406321925'] | [9980.0, 9948.0] | [38.0, 39.0] | [408, 215] |
p02629 | u116038906 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['\n#url http://iatlex.com/python/base_change\ndef Base_10_to_n(X, n):\n if (int(X/n)):\n return Base_10_to_n(int(X/n), n)+" "+str(X%n)\n return str(X%n)\n############################\n\n\nimport sys\ninput = sys.stdin.readline\nN = int(input())\n\n\nx26 = Base_10_to_n(N-1, 26) \nx26_list =x26.split()\nint... | ['Runtime Error', 'Accepted'] | ['s210883039', 's476426596'] | [9072.0, 9184.0] | [32.0, 28.0] | [702, 764] |
p02629 | u116107171 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N = input()\nN = int(N)\nname = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\n\nS = 1\ni = 0\nSum = 0\nwhile Sum<N:\n S *= 26\n Sum += S\n i = i+1\n\nans = []\nfor j in range(i):\n N -= 1\n r = N%26\n ans.insert(0, n... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s079564509', 's107816805', 's256308558', 's304126036', 's850266459', 's246961190'] | [9072.0, 8952.0, 8936.0, 9060.0, 8928.0, 9104.0] | [27.0, 25.0, 27.0, 27.0, 32.0, 30.0] | [357, 358, 358, 358, 359, 358] |
p02629 | u117054186 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["ii = lambda : int(input())\nmi = lambda : map(int,input().split())\nli = lambda : list(map(int,input().split()))\n\nn = ii()\n\nal = [1]\nnc = 0\n\ndef ntow(x):\n if x == 0:\n return 'z'\n v = chr(ord('a')+x-1)\n # print(x,v)\n return v\n\nfor i in range(1,15):\n nc += 26 ** i\n al.append(nc+... | ['Wrong Answer', 'Accepted'] | ['s699151340', 's435407057'] | [9168.0, 9040.0] | [36.0, 33.0] | [711, 713] |
p02629 | u119982001 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["from math import log\n\nN = int(input())\n\nprint(ord('a'), chr(97), chr(122))\n\nbase = 96\nroop = int(log(N, 26)) + 1\nans = ['']*roop\ntmp = N\n\n\nfor i in range(roop):\n rem = tmp % 26 \n ans[i] = chr(base+rem)\n tmp //= 26\n\nans.reverse()\nprint(''.join(ans))\n", "from math import log\nN = int(input()... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s053689383', 's875884867', 's923727663'] | [9176.0, 9212.0, 9152.0] | [33.0, 32.0, 33.0] | [258, 498, 120] |
p02629 | u127499732 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["def main():\n n = int(input())\n n -= 1\n res = ''\n while n:\n n, m = divmod(n, 26)\n res += chr(97 + m)\n n -= 1\n\n print(res[::-1])\n\n\nif __name__ == '__main__':\n main()\n", "def main():\n n = int(input())\n n -= 1\n res = ''\n while n >= 0:\n n, m = di... | ['Wrong Answer', 'Accepted'] | ['s549828583', 's956400240'] | [20716.0, 9172.0] | [2206.0, 29.0] | [203, 208] |
p02629 | u129611040 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["N = int(input())\nans = ''\nwhile N > 0:\nN -= 1\nans += chr(ord('a') + N % 26)\nN //= 26\nprint(ans[::-1])", "N = int(input())\nans = ''\nwhile N > 0:\n N -= 1\n ans += chr(ord('a') + N % 26)\n N //= 26\nprint(ans[::-1])"] | ['Runtime Error', 'Accepted'] | ['s934194124', 's540635298'] | [8888.0, 9072.0] | [24.0, 31.0] | [101, 113] |
p02629 | u135116520 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['N=int(input())\nchars="Xabcdefghijklmnopqrstuvwxyz")\nres=""\nn_rem=N\nwhile True:\n x=n_rem%26\n if x==0:\n x=26\n res+=chars[x]\n n_rem-=x\n if n_rem==0:\n break\n n_rem//=26\nprint(res[::-1])\n \n ', 'N=int(input())\nchars="Xabcdefghijklmnopqrstuvwxyz")\nN_rem=N\nres=""\nwhile True:\n x=N_rem%26\n... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s090218623', 's540786270', 's184951005'] | [8748.0, 9008.0, 9180.0] | [25.0, 25.0, 28.0] | [201, 196, 192] |
p02629 | u135454978 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["import sys\n\nN = int(input())\n\nalpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',\n 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\n\nans = []\nfor I in range(12):\n I = 10 - I\n k = sum([26 ** i for i in range(I + 1)])\n # print(f'k : {k}')\n if N >= k:... | ['Wrong Answer', 'Accepted'] | ['s230254188', 's693552517'] | [9208.0, 9164.0] | [31.0, 29.0] | [589, 318] |
p02629 | u136090046 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['def Base_10_to_n(X, n):\n X_dumy = X\n out = []\n while X_dumy > 0:\n out.append(X_dumy % n)\n X_dumy = int(X_dumy / n)\n return out\n\nn = int(input())\nd = {y: x for x, y in zip("abcdefghijklmnopqrstuvwxyz", range(1, 27))}\n\nres = []\nprint(Base_10_to_n(n, 26))\narray = Base_10_to_n(n, 26... | ['Wrong Answer', 'Accepted'] | ['s143342397', 's793691153'] | [9040.0, 9204.0] | [32.0, 31.0] | [540, 339] |
p02629 | u137061893 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['def find_j(h):\n p = []\n psum = 0\n for i in range(13):\n pi = 26**i\n psum += pi\n p.append(psum)\n \n n_p = len(p)\n for i in range(n_p):\n if p[i] > h:\n return i\n return 1\n\ndef find_k(h, j):\n n_block = 26**j\n \n for i in range(1,27):\n ... | ['Wrong Answer', 'Accepted'] | ['s071447125', 's995048053'] | [9096.0, 9060.0] | [27.0, 27.0] | [772, 811] |
p02629 | u143322814 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ['import sys\nsys.setrecursionlimit(10 ** 9)\n\nconvert = {\n 1:\'a\',\n 2:\'b\',\n 3:\'c\',\n 4:\'d\',\n 5:\'e\',\n 6:\'f\',\n 7:\'g\',\n 8:\'h\',\n 9:\'i\',\n 10:\'j\',\n 11:\'k\',\n 12:\'l\',\n 13:\'m\',\n 14:\'n\',\n 15:\'o\',\n 16:\'p\',\n 17:\'q\',\n 18:\'r\',... | ['Wrong Answer', 'Accepted'] | ['s428170002', 's451124157'] | [9180.0, 9200.0] | [29.0, 28.0] | [764, 726] |
p02629 | u145600939 | 2,000 | 1,048,576 | 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,... | ["import sys\nstdin = sys.stdin\nsys.setrecursionlimit(10**6)\nni = lambda: int(ns())\nna = lambda: list(map(int, stdin.readline().split()))\nnn = lambda: list(stdin.readline().split())\nns = lambda: stdin.readline().rstrip()\n\nn = ni()\n\ndef f(k):\n return chr(97+k)\n\nc = 0\ni = 1\nwhile True:\n d = c+pow(26,... | ['Runtime Error', 'Accepted'] | ['s236710074', 's755813982'] | [9072.0, 9196.0] | [28.0, 30.0] | [497, 171] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.