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
|
---|---|---|---|---|---|---|---|---|---|---|
p02598 | u802977614 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ["\nimport sys, bisect, math, itertools, heapq, collections\nfrom operator import itemgetter\n\nfrom functools import lru_cache\nimport copy\n# @lru_cache(maxsize=None)\n\ninput = sys.stdin.readline\nINF = float('inf')\nmod = 10**9 + 7\neps = 10**-7\n\n# region input function\n\n\ndef inp():\n \n return int(input())\n\n\ndef inpl():\n \n return list(map(int, input().split()))\n\n\ndef str_inp():\n \n return list(input()[:-1])\n\n\n\n\nn, k = inpl()\na = inpl()\n\nl = 1\nr = 10**9\nwhile l < r:\n x = (l + r) // 2\n cnt = 0\n for i in range(n):\n cnt += a[i] // x\n if a[i] % x == 0:\n cnt -= 1\n if cnt > k:\n break\n if cnt <= k:\n r = x\n else:\n l = x\n print(l, r)\n if l + 1 == r:\n break\nprint(math.ceil((l + r) / 2))\n", "\nimport sys, bisect, math, itertools, heapq, collections\nfrom operator import itemgetter\n\nfrom functools import lru_cache\nimport copy\n# @lru_cache(maxsize=None)\n\ninput = sys.stdin.readline\nINF = float('inf')\nmod = 10**9 + 7\neps = 10**-7\n\n# region input function\n\n\ndef inp():\n \n return int(input())\n\n\ndef inpl():\n \n return list(map(int, input().split()))\n\n\ndef str_inp():\n \n return list(input()[:-1])\n\n\n\n\nn, k = inpl()\na = inpl()\n\nl = 0\nr = 10**9\nwhile l + 1 < r:\n x = (l + r) // 2\n cnt = 0\n for i in range(n):\n cnt += math.ceil(a[i] / x) - 1\n if cnt > k:\n break\n if cnt <= k:\n r = x\n else:\n l = x\nprint(r)\n"] | ['Wrong Answer', 'Accepted'] | ['s336570292', 's829324131'] | [32416.0, 32344.0] | [1673.0, 1598.0] | [1023, 924] |
p02598 | u810787773 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ["\ndef can_or_cannot(A,K,x):\n kaisuu_sum = 0\n for i in range(len(A)):\n if A[i]%x == 0:\n temp = (A[i]%x) - 1\n kaisuu_sum += temp\n else:\n temp = A[i]//x\n kaisuu_sum += temp\n\n if kaisuu_sum > K:\n return 'No'\n\n return 'Yes'\n\ndef main():\n N,K = map(int,input().split())\n A = list(map(int,input().split()))\n A.sort()\n \n left = 0\n right = A[N-1]\n mid = 0\n while True:\n mid = int( (left + right)/2 )\n judge = can_or_cannot(A,K,mid)\n if judge == 'No':\n left = mid+1\n elif judge == 'Yes':\n right = mid\n\n if left == right:\n return right\n\nprint(main())\n", "\ndef can_or_cannot(A,K,x):\n kaisuu_sum = 0\n for i in range(len(A)):\n if A[i]%x == 0:\n temp = (A[i]//x) - 1\n kaisuu_sum += temp\n else:\n temp = A[i]//x\n kaisuu_sum += temp\n\n if kaisuu_sum > K:\n return 'No'\n\n return 'Yes'\n\ndef main():\n N,K = map(int,input().split())\n A = list(map(int,input().split()))\n A.sort()\n \n left = 0\n right = A[N-1]\n mid = 0\n while True:\n mid = int( (left + right)/2 )\n print(left,mid,right)\n judge = can_or_cannot(A,K,mid)\n print(left,mid,right,judge)\n if judge == 'No':\n left = mid+1\n elif judge == 'Yes':\n right = mid\n\n if left == right:\n print(left,mid,right)\n return right\n\nprint(main())\n", "\ndef can_or_cannot(A,K,x):\n kaisuu_sum = 0\n for i in range(len(A)):\n if A[i]%x == 0:\n temp = (A[i]//x) - 1\n kaisuu_sum += temp\n else:\n temp = A[i]//x\n kaisuu_sum += temp\n\n if kaisuu_sum > K:\n return 'No'\n\n return 'Yes'\n\ndef main():\n N,K = map(int,input().split())\n A = list(map(int,input().split()))\n A.sort()\n \n left = 0\n right = A[N-1]\n\n if right == 1:\n return 1\n\n mid = 0\n while True:\n if right == 1:\n return 1\n \n mid = int( (left + right)/2 )\n #print(left,mid,right)\n judge = can_or_cannot(A,K,mid)\n #print(left,mid,right,judge)\n if judge == 'No':\n left = mid+1\n elif judge == 'Yes':\n right = mid\n\n if left == right:\n #print(left,mid,right)\n return right\n\nprint(main())\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s460861366', 's769414260', 's490810778'] | [30784.0, 30636.0, 30920.0] | [1253.0, 1423.0, 1279.0] | [859, 960, 1058] |
p02598 | u821393459 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['import math\nN, K = map(int, input().split())\nAs = list(map(int, input().split()))\n\n\ndef cut_num(a, cut_length):\n return math.ceil(a/cut_length) - 1\n\n\n"""cut length N binary search\nif cut num > K, search more longer cut length,\n"""\nl = 1\nr = max(As)\n\nans = r\nwhile True:\n m = (l+r)//2\n current_cut_num = sum([cut_num(a, m) for a in As])\n if current_cut_num <= K:\n r = m\n else:\n l = m\n\n if r - l < 1:\n break\n\nif sum([cut_num(a, l) for a in As]) <= K:\n print(l)\nelse:\n print(r)', 'import math\nN, K = map(int, input().split())\nAs = list(map(int, input().split()))\n\n\ndef cut_num(a, cut_length):\n return math.ceil(a/cut_length) - 1\n\n\n"""cut length N binary search\nif cut num > K, search more longer cut length,\n"""\nl = 1\nr = max(As)\n\nwhile r > l + 1:\n m = (l+r)//2\n current_cut_num = sum([cut_num(a, m) for a in As])\n if current_cut_num <= K:\n r = m\n else:\n l = m\n \n\nif sum([cut_num(a, l) for a in As]) <= K:\n print(l)\nelse:\n print(r)'] | ['Time Limit Exceeded', 'Accepted'] | ['s916132288', 's524924376'] | [30708.0, 31144.0] | [2206.0, 1438.0] | [519, 488] |
p02598 | u822294317 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['import math\n\nn, k = map(int, input().split())\na = list(map(int, input().split()))\n\ndef is_ok(x,a,k):\n b = 0\n for ai in a:\n b += math.ceil(ai/x)\n b -= 1\n print(x,b)\n if b <= k:\n return True\n\ndef meguru_bisect(ng, ok):\n while (abs(ok - ng) > 1):\n mid = (ok + ng) // 2\n if is_ok(mid,a,k):\n ok = mid\n else:\n ng = mid\n return ok\n\n\nprint(meguru_bisect(0,max(a)))', 'import math\n\nn, k = map(int, input().split())\na = list(map(int, input().split()))\n\ndef is_ok(x,a,k):\n b = 0\n for ai in a:\n b += math.ceil(ai/x)\n b -= 1\n if b <= k:\n return True\n\ndef meguru_bisect(ng, ok):\n while (abs(ok - ng) > 1):\n mid = (ok + ng) // 2\n if is_ok(mid,a,k):\n ok = mid\n else:\n ng = mid\n return ok\n\n\nprint(meguru_bisect(0,max(a)))'] | ['Wrong Answer', 'Accepted'] | ['s008694560', 's528716736'] | [31036.0, 31072.0] | [990.0, 1127.0] | [438, 423] |
p02598 | u825541307 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['N,K = map(int,input().split())\nA = list(map(int,input().split()))\n\nl = 1\nr = 10**9 + 1\n\nimport math\nwhile l < r:\n mid = (l + r) // 2\n counter = 0\n for i in range(N):\n if A[i] > mid:\n counter += math.ceil(A[i]/mid) - 1\n if counter <= K:\n r = mid - 1\n else:\n l = mid\n\nprint(l)', 'N,K = map(int,input().split())\nA = list(map(int,input().split()))\n\nl = 1\nr = 10**9 + 1\n\nimport math\nwhile l < r:\n mid = (l + r) // 2\n counter = 0\n for i in range(N):\n if A[i] > mid:\n counter += math.ceil(A[i]/mid) - 1\n if counter <= K:\n r = mid\n else:\n l = mid + 1\n\nprint(l)'] | ['Wrong Answer', 'Accepted'] | ['s864170792', 's709248877'] | [31064.0, 31224.0] | [2206.0, 1941.0] | [321, 321] |
p02598 | u854294899 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['import sys\nimport math\n\ninput = sys.stdin.readline\n\ndef can(arr, m, K):\n need = 0\n for x in arr:\n need += int(x // m)\n return need <= K\n\n\nN, K = map(int, input().split())\narr = list(map(int, input().split()))\narr = sorted(arr)\n\nlo = 0.0\nhi = 1e9\n\nfor i in range(25):\n m = (lo + hi) / 2.0\n if (can(arr, m, K)):\n hi = m\n else:\n lo = m\nans = lo\n\nprint(int(math.ceil(lo)))\n \n \n\n', 'import sys\nimport math\n\ninput = sys.stdin.readline\n\ndef can(arr, m, K):\n need = 0\n for x in arr:\n if x > m:\n need += int(x // m)\n return need <= K\n\nN, K = map(int, input().split())\narr = list(map(int, input().split()))\n\nlo = 1\nhi = int(1e9) + 1\n\nwhile (lo < hi):\n m = int((lo + hi) // 2)\n if (can(arr, m, K)):\n hi = m\n else:\n lo = m + 1\nprint(lo)\n'] | ['Wrong Answer', 'Accepted'] | ['s229390297', 's907949826'] | [30912.0, 31060.0] | [1377.0, 760.0] | [391, 367] |
p02598 | u860002137 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['n, k = map(int, input().split())\narr = np.array(list(map(int, input().split())))\n\nl = 1\nr = max(arr)\n\nwhile l + 1 < r:\n m = (l + r) // 2\n\n cut = 0\n for x in arr:\n cut += (x - 1) // m\n\n if cut > k:\n l = m\n else:\n r = m\n\nprint(r)', 'n, k = map(int, input().split())\narr = list(map(int, input().split()))\n\nl = 0\nr = max(arr)\n\nwhile l + 1 < r:\n m = (l + r) // 2\n\n cut = 0\n for x in arr:\n cut += (x - 1) // m\n\n if cut > k:\n l = m\n else:\n r = m\n\nprint(r)'] | ['Runtime Error', 'Accepted'] | ['s951261383', 's301065352'] | [9056.0, 30772.0] | [25.0, 854.0] | [263, 253] |
p02598 | u864090097 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['N, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nA.sort(reverse=True)\n\nleft = 0\nright = A[0]\n\nwhile right - left > 1:\n mid = (left + right) // 2\n jk = 0\n for i in range(N):\n jk += math.ceil( A[i] / mid)\n if jk < K:\n right = mid\n else:\n left = mid\n\nprint(right)', 'import math\n\nN, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nleft = 0\nright = max(A)\n\nwhile right - left > 1:\n mid = (left + right) // 2\n jk = 0\n for i in range(N):\n jk += A[i] // mid - 1\n if A[i] % mid != 0: jk += 1\n if jk <= K:\n right = mid\n else:\n left = mid\n\nprint(right)'] | ['Runtime Error', 'Accepted'] | ['s531538392', 's079420231'] | [30732.0, 31148.0] | [104.0, 1796.0] | [317, 340] |
p02598 | u888337853 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ["import sys\nimport re\nimport math\nimport collections\nimport bisect\nimport itertools\nimport fractions\nimport functools\nimport copy\nimport heapq\nimport decimal\nimport statistics\nimport queue\n\n# import numpy as np\n\nsys.setrecursionlimit(10 ** 9)\nINF = 10 ** 16\nMOD = 10 ** 9 + 7\n# MOD = 998244353\n\nni = lambda: int(sys.stdin.readline())\nns = lambda: map(int, sys.stdin.readline().split())\nna = lambda: list(map(int, sys.stdin.readline().split()))\nna1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().split()))\n\n\n# ===CODE===\n\n\ndef main():\n n, k = ns()\n a = na()\n a.sort(reverse=True)\n upper = 10 ** 9 + 1\n under = 0\n\n while upper - under > 0.01:\n middle = (upper + under) // 2\n\n tk = k\n flg = True\n for ai in a:\n if ai <= middle:\n break\n\n ta = ai\n tk -= int((ta - middle) / middle)\n if tk < 0:\n flg = False\n break\n\n if flg:\n upper = middle\n else:\n under = middle\n\n print(math.ceil(under))\n\n\nif __name__ == '__main__':\n main()\n", "import sys\nimport re\nimport math\nimport collections\nimport bisect\nimport itertools\nimport fractions\nimport functools\nimport copy\nimport heapq\nimport decimal\nimport statistics\nimport queue\n\n# import numpy as np\n\nsys.setrecursionlimit(10 ** 9)\nINF = 10 ** 16\nMOD = 10 ** 9 + 7\n# MOD = 998244353\n\nni = lambda: int(sys.stdin.readline())\nns = lambda: map(int, sys.stdin.readline().split())\nna = lambda: list(map(int, sys.stdin.readline().split()))\nna1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().split()))\n\n\n# ===CODE===\n\n\ndef main():\n n, k = ns()\n a = na()\n a.sort(reverse=True)\n upper = 10 ** 9 + 1\n under = 0\n\n while upper - under > 1:\n middle = (upper + under) // 2\n\n tk = k\n flg = True\n for ai in a:\n if ai <= middle:\n break\n\n ta = ai\n tk -= int((ta - middle) / middle)\n if tk < 0:\n flg = False\n break\n\n if flg:\n upper = middle\n else:\n under = middle\n\n print(math.ceil(under))\n\n\nif __name__ == '__main__':\n main()\n", "import sys\nimport re\nimport math\nimport collections\nimport bisect\nimport itertools\nimport fractions\nimport functools\nimport copy\nimport heapq\nimport decimal\nimport statistics\nimport queue\n\n# import numpy as np\n\nsys.setrecursionlimit(10 ** 9)\nINF = 10 ** 16\nMOD = 10 ** 9 + 7\n# MOD = 998244353\n\nni = lambda: int(sys.stdin.readline())\nns = lambda: map(int, sys.stdin.readline().split())\nna = lambda: list(map(int, sys.stdin.readline().split()))\nna1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().split()))\n\n\n# ===CODE===\n\n\ndef main():\n n, k = ns()\n a = na()\n a.sort(reverse=True)\n upper = 10**9 + 1\n under = 0\n\n while upper - under > 1:\n middle = (upper + under) // 2\n\n tk = k\n flg = True\n for ai in a:\n if ai <= middle:\n break\n\n ta = ai\n tk -= int(ta // middle)\n if tk < 0:\n flg = False\n break\n\n if flg:\n upper = middle\n else:\n under = middle\n\n if k == 0:\n print(max(a))\n else:\n print(math.ceil((upper + under) / 2))\n\nif __name__ == '__main__':\n main()\n"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s472449788', 's935312522', 's588199950'] | [32936.0, 33064.0, 33128.0] | [2206.0, 138.0, 1005.0] | [1108, 1105, 1161] |
p02598 | u917444023 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['import math\nn,k=map(int, input().split())\na=list(map(int, input().split()))\nright=10**9\nleft=0\ndef cutable(a,x):\n count=0\n for i in a:\n count+=math.ceil(i/x)-1\n return count<=k \nwhile right>left+1:\n mid=(right+left)//2\n if cutable(a,mid):\n left=mid\n else:\n right=mid+1\nprint(math.ceil(max(a)/left))', 'import math\nn,k=map(int, input().split())\na=list(map(int, input().split()))\nright=max(a)\nleft=0\ndef cutable(a,x):\n count=0\n for i in a:\n count+=math.ceil(i/x)-1\n return count<=k\nwhile right>left+1:\n mid=(right+left)//2\n if cutable(a,mid):\n right=mid\n else:\n left=mid\nprint(right)'] | ['Wrong Answer', 'Accepted'] | ['s987739216', 's767012054'] | [31040.0, 31048.0] | [2206.0, 959.0] | [340, 318] |
p02598 | u923464546 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['from heapq import heappush, heappop, heapify\nimport math\ndef solve():\n\tn , k= map(int, input().strip().split())\n\ta= [(-int(x),1,int(x)) for x in input().strip().split()]\n\theapify(a)\n\tslices = 0\n\twhile slices < k:\n\t\tx,cnt,orig = heappop(a)\n\t\tif x == -1:\n\t\t\treturn 1\n\t\tx = -x-1\n\t\tprint(x)\n\t\tif (orig+cnt)//(cnt+1) > x:\n\t\t\tif slices +(orig+x-1)//x >= k:\n\t\t\t\treturn x+1\n\t\t\telse:\n\t\t\t\tcnt_t = (orig+x-1)//x\n\t\t\t\tslices += cnt_t - cnt\n\t\t\t\theappush(a,(-x,cnt,orig))\n\t\telse:\n\t\t\theappush(a,(-((orig+cnt)//(cnt+1)),cnt+1,orig))\n\t\t\tslices+=1\n\treturn -(heappop(a)[0])\n\n\nprint(solve())', 'from heapq import heappush, heappop, heapify\nimport math\ndef solve():\n\tn , k= map(int, input().strip().split())\n\ta= [(-int(x),1,int(x)) for x in input().strip().split()]\n\theapify(a)\n\tfor i in range(k):\n\t\tx,cnt,orig = heappop(a)\n\t\tif x < 1:\n\t\t\treturn 1\n\t\theappush(a,(-((orig+cnt)//(cnt+1)),cnt+1,orig))\n\treturn -(heappop(a)[0])\n\n\nprint(solve())', 'from heapq import heappush, heappop, heapify\nimport math\ndef check(a,mid,k):\n\tcnt = 0\n\tfor x in a:\n\t\tcur_cnt = (x+mid-1)//mid - 1\n\t\tcnt+=cur_cnt\n\t\tif cnt > k:\n\t\t\treturn False\n\treturn True\n\ndef solve():\n\tn , k= map(int, input().strip().split())\n\ta= [int(x) for x in input().strip().split()]\n\tl = 0\n\tr = 10**9+20\n\twhile r-l > 1:\n\t\tmid = (r+l)//2\n\t\tif check(a,mid,k):\n\t\t\tr = mid\n\t\telse:\n\t\t\tl = mid\n\treturn l+1\n \nprint(solve())'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s293467952', 's434706297', 's361922684'] | [51380.0, 51448.0, 31196.0] | [2218.0, 155.0, 856.0] | [570, 343, 423] |
p02598 | u932465688 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['n,k = map(int,input().split())\nL = list(map(int,input().split()))\nok = 0\nng = 10**9\nwhile abs(ok-ng) > 1:\n mid = (ok+ng)//2\n cur = 0\n for i in range(n):\n cur += L[i]//mid\n if cur > k:\n ok = mid\n elif cur <= k:\n ng = mid\n print(mid,cur)\nK = [mid-1, mid, mid+1]\nP = []\nfor i in range(3):\n res = 0\n for j in range(n):\n res += (L[j]-1)//K[i]\n if res <= k:\n P.append(K[i])\nprint(min(P))', 'n,k = map(int,input().split())\nL = list(map(int,input().split()))\nok = 0\nng = 10**9\nwhile abs(ok-ng) > 1:\n mid = (ok+ng)//2\n cur = 0\n for i in range(n):\n cur += L[i]//mid\n if cur > k:\n ok = mid\n elif cur <= k:\n ng = mid\nK = [mid-1, mid, mid+1]\nP = []\nfor i in range(3):\n res = 0\n if K[i] > 0:\n for j in range(n):\n res += (L[j]-1)//K[i]\n if res <= k:\n P.append(K[i])\nprint(min(P))\n'] | ['Runtime Error', 'Accepted'] | ['s357069124', 's022853606'] | [30904.0, 30772.0] | [1004.0, 958.0] | [443, 458] |
p02598 | u944325914 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['h,w,m=map(int,input().split())\nbomb=[]\nx=[0]*(h+1)\ny=[0]*(w+1)\nfor i in range(m):\n h1,w1=map(int,input().split())\n x[h1]+=1\n y[w1]+=1\n bomb.append((h1,w1))\nmaxx=max(x)\nmaxy=max(y)\nr=[]\nc=[]\nfor i in range(1,h+1):\n if x[i]==maxx:\n r.append(i)\nfor j in range(1,w+1):\n if y[i]==maxy:\n c.append(i)\nfor j in r:\n for k in c:\n if (j,k) not in bomb:\n print(maxx+maxy)\n exit()\nprint(maxx+maxy-1)', 'n,k=map(int,input().split())\na=list(map(int,input().split()))\nng=0\nok=max(a)+1\nwhile ok-ng>1:\n mid=(ng+ok)//2\n count=0\n for i in range(n):\n if a[i]%mid==0:\n count+=((a[i]//mid)-1)\n else:\n count+=(a[i]//mid)\n if count>k:\n ng=mid\n else:\n ok=mid\nprint(ok)'] | ['Runtime Error', 'Accepted'] | ['s630664519', 's130143723'] | [9236.0, 30952.0] | [24.0, 1308.0] | [450, 317] |
p02598 | u945228737 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ["\n\n# import sys\n\n\n# from collections import deque\nimport math\n# from decorator import stop_watch\n#\n#\n# @stop_watch\ndef solve(N, K, As):\n ans = max(As)\n l, r = 1, ans\n for _ in range(30):\n m = (l + r) // 2\n cnt = 0\n for A in As:\n cnt += math.ceil(A / m) - 1\n if cnt <= K:\n ans = min(ans, m)\n r = m - 1\n else:\n l = m + 1\n if l == r:\n break\n print(ans)\n\n\nif __name__ == '__main__':\n # S = input()\n # N = int(input())\n N, K = map(int, input().split())\n As = [int(i) for i in input().split()]\n \n solve(N, K, As)\n", "\n\n# import sys\n\n\nfrom collections import deque\nfrom decorator import stop_watch\nimport math\n\n\n@stop_watch\ndef solve(N, K, As):\n ans = max(As)\n l, r = 1, ans\n for _ in range(30):\n m = (l + r) // 2\n cnt = 0\n for A in As:\n cnt += math.ceil(A / m) - 1\n if cnt <= K:\n ans = min(ans, m)\n r = m - 1\n else:\n l = m + 1\n print(ans)\n\n\nif __name__ == '__main__':\n # S = input()\n # N = int(input())\n N, K = map(int, input().split())\n As = [int(i) for i in input().split()]\n \n solve(N, K, As)\n", "\n\n# import sys\n\n\n# from collections import deque\nimport math\n# from decorator import stop_watch\n#\n#\n# @stop_watch\ndef solve(N, K, As):\n ans = max(As)\n l, r = 1, ans\n for _ in range(30):\n if l == r:\n break\n m = (l + r) // 2\n cnt = 0\n for A in As:\n cnt += math.ceil(A / m) - 1\n if cnt <= K:\n ans = min(ans, m)\n r = m - 1\n else:\n l = m + 1\n print(ans)\n\n\nif __name__ == '__main__':\n # S = input()\n # N = int(input())\n N, K = map(int, input().split())\n As = [int(i) for i in input().split()]\n \n solve(N, K, As)\n", "\n\n# import sys\n\n\n# from collections import deque\nimport math\n# from decorator import stop_watch\n#\n#\n# @stop_watch\ndef solve(N, K, As):\n ans = max(As)\n l, r = 1, ans\n for _ in range(30):\n m = (l + r) // 2\n cnt = 0\n for A in As:\n cnt += math.ceil(A / m) - 1\n if cnt <= K:\n ans = min(ans, m)\n r = m - 1\n else:\n l = m + 1\n if l > r:\n break\n print(ans)\n\n\nif __name__ == '__main__':\n # S = input()\n # N = int(input())\n N, K = map(int, input().split())\n As = [int(i) for i in input().split()]\n \n solve(N, K, As)\n"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s614072540', 's694252718', 's750322277', 's329270800'] | [31776.0, 10740.0, 31824.0, 31884.0] | [1021.0, 41.0, 948.0, 1003.0] | [746, 701, 746, 745] |
p02598 | u945375934 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['def f(x):\n now = 0\n for i in range(n):\n now += (a[i]-1)//x\n\n return now <= k\n\nn, k = map(int, input().split())\na = list(map(int, input().split()))\nng = 0\nok= 1e9\nwhile ok - ng > 1:\n x = (ok + ng) // 2\n if f(x):\n ok = x\n else:\n ng = x\n\nprint(ok)', 'def f(x):\n now = 0\n for i in range(n):\n now += (a[i]-1)//x\n\n return now <= k\n\nn, k = map(int, input().split())\na = list(map(int, input().split()))\nng = 0\nok= int(1e9)\nwhile ok - ng > 1:\n x = (ok + ng) // 2\n if f(x):\n ok = x\n else:\n ng = x\n\nprint(ok)'] | ['Wrong Answer', 'Accepted'] | ['s134150885', 's079732399'] | [30700.0, 30848.0] | [1259.0, 669.0] | [283, 288] |
p02598 | u980783809 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['import math\nn, k = map(int, input().split())\naas = list(map(int, input().split()))\ndiff = pow(10,-6)\nleft = 1\nright = 10**9\ndef judge(mid):\n cut = 0\n for i in aas:\n cut += math.ceil(i / mid) - 1\n if cut <= k:\n return True\n else:\n return False\nwhile left < right:\n mid = (left + right) / 2\n if (left <= right <= left + diff) or (right <= left <= right + diff):\n break\n elif judge(mid):\n right = mid\n else:\n left = mid\nprint(int(right))', 'import math\nn, k = map(int, input().split())\naas = list(map(int, input().split()))\ndiff = pow(10,-6)\nleft = 1\nright = 10**9\ndef judge(mid):\n cut = 0\n for i in aas:\n cut += math.ceil(i / mid) - 1\n if cut <= k:\n return True\n else:\n return False\nwhile left < right:\n mid = (left + right) / 2\n if (left <= right <= left + diff) or (right <= left <= right + diff):\n break\n elif judge(mid):\n right = mid\n else:\n left = mid\nprint(math.ceil(left))'] | ['Wrong Answer', 'Accepted'] | ['s014961217', 's478086519'] | [31020.0, 31076.0] | [1645.0, 1623.0] | [500, 505] |
p02598 | u990726146 | 2,000 | 1,048,576 | We have N logs of lengths A_1,A_2,\cdots A_N. We can cut these logs at most K times in total. When a log of length L is cut at a point whose distance from an end of the log is t (0<t<L), it becomes two logs of lengths t and L-t. Find the shortest possible length of the longest log after at most K cuts, and print it after rounding up to an integer. | ['N ,K = map(int, input().split())\n\nA = list(map(int, input().split()))\nd = [0] * N\n\n\nmin1 = 0\nmax1 = max(A)\n\nwhile True:\n X = (min1 + max1)//2\n for i in range(N):\n if A[i] % X == 0:\n d[i] = A[i]//X - 1\n else:\n d[i] = A[i]//X\n if sum(d) <= K:\n max1 = X \n else:\n min1 = X\n print(min1, max1)\n\n if max1 - min1 <= 1:\n print(int(max1))\n break\n', 'N ,K = map(int, input().split())\n\nimport math\n\nA = list(map(int, input().split()))\nd = [0] * N\n\n\nmin = 1\nmax = max(A)\n\nwhile True:\n X = (min + max)//2\n for i in range(N):\n if a[i] % X == 0:\n d[i] = A[i]//X - 1\n else:\n d[i] = A[i]//X\n if sum(d) <= K:\n max = X \n else:\n min = X\n #print(min, max)\n \n if max - min <= 1:\n print(int(max))\n break\n', 'N ,K = map(int, input().split())\n\nA = list(map(int, input().split()))\nd = [0] * N\n\n\nmin = 0\nmax = max(A)\n\nwhile True:\n X = (min + max)//2\n for i in range(N):\n d[i] = A[i]//X\n if sum(d) <= K:\n max = X\n else:\n min = X\n print(min, max)\n \n if min + 1 == max:\n print(int(max))\n break\n', 'N ,K = map(int, input().split())\n\nA = list(map(int, input().split()))\nd = [0] * N\n\n\nmin = 1\nmax = max(A)\n\nwhile True:\n X = (min + max)//2\n for i in range(N):\n if d[i] % X == 0:\n d[i] = A[i]//X - 1\n else:\n d[i] = A[i]//X\n if sum(d) <= K:\n max = X \n else:\n min = X\n #print(min, max)\n\n if max - min <= 1:\n print(int(max))\n break\n', 'N ,K = map(int, input().split())\n\nA = list(map(int, input().split()))\nd = [0] * N\n\n\nmin1 = 0\nmax1 = max(A) + 1\n\nwhile True:\n X = (min1 + max1)//2\n for i in range(N):\n if A[i] % X == 0:\n d[i] = A[i]//X - 1\n else:\n d[i] = A[i]//X\n if sum(d) <= K:\n max1 = X \n else:\n min1 = X\n print(min1, max1)\n\n if max1 - min1 <= 1:\n print(int(max1))\n break\n', 'N ,K = map(int, input().split())\n\nimport math\n\nA = list(map(int, input().split()))\nd = [0] * N\n\n\nmin = 1\nmax = max(A)\n\nwhile True:\n X = (min + max)//2\n for i in range(N):\n if a[i] % X == 0:\n d[i] = A[i]//X - 1\n else:\n d[i] = A[i]//X\n if sum(d) <= K:\n max = X \n else:\n min = X\n #print(min, max)\n \n if max - min <= 1:\n print(int(max))\n break', 'N ,K = map(int, input().split())\n\nA = list(map(int, input().split()))\nd = [0] * N\n\n\nmin = 1\nmax = max(A)\n\nwhile True:\n X = (min + max)//2\n for i in range(N):\n if a[i] % X == 0:\n d[i] = A[i]//X - 1\n else:\n d[i] = A[i]//X\n if sum(d) <= K:\n max = X \n else:\n min = X\n #print(min, max)\n\n if max - min <= 1:\n print(int(max))\n break\n', 'N ,K = map(int, input().split())\n\nA = list(map(int, input().split()))\nd = [0] * N\n\n\nmin1 = 0\nmax1 = max(A) + 1\n\nwhile True:\n X = (min1 + max1)//2\n for i in range(N):\n if A[i] % X == 0:\n d[i] = A[i]//X - 1\n else:\n d[i] = A[i]//X\n if sum(d) <= K:\n max1 = X \n else:\n min1 = X\n #print(min1, max1)\n\n if max1 - min1 <= 1:\n print(int(max1))\n break\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s030178536', 's382201360', 's533472072', 's813333794', 's816050451', 's870066928', 's947981577', 's193388800'] | [30976.0, 31236.0, 30796.0, 30692.0, 30872.0, 31044.0, 30944.0, 30980.0] | [1304.0, 77.0, 863.0, 1448.0, 1453.0, 76.0, 77.0, 1301.0] | [431, 438, 348, 421, 435, 437, 421, 436] |
p02599 | u509368316 | 2,000 | 1,048,576 | We have N colored balls arranged in a row from left to right; the color of the i-th ball from the left is c_i. You are given Q queries. The i-th query is as follows: how many different colors do the l_i-th through r_i-th balls from the left have? | ["N,Q=map(int,input().split())\nC=list(map(int,input().split()))\nLR=sorted([[i]+list(map(int,input().split())) for i in range(Q)],key=lambda x:x[2])\nfrom numba import*\nimport numpy as np\n@jitclass((('N',i8),('data',i8[:])))\nclass BIT:\n def __init__(self,N):\n self.N=N\n self.data=np.zeros(N+1,dtype=np.int64)\n def add(self,i,x):\n i+=1\n while i<=self.N:\n self.data[i]+=x\n i+=i&-i\n def sum(self,a,b):\n r=0\n i=b\n while i>0:\n r+=self.data[i]\n i-=i&-i\n i=a\n while i>0:\n r-=self.data[i]\n i-=i&-i\n return r\nb=BIT(N)\np=[-1]*N\nq=0\na=[0]*Q\nfor i in range(N):\n if p[C[i]-1]>=0:\n b.add(p[C[i]-1],-1)\n p[C[i]-1]=i\n b.add(i,1)\n while q<Q and LR[q][2]==i+1:\n a[LR[q][0]]=b.sum(LR[q][1]-1,LR[q][2])\n q+=1\nprint(*a,sep='\\n')", "def main(N,Q,C,LR):\n data=[0]*(N+1)\n def add(i,x):\n i+=1\n while i<=N:\n data[i]+=x\n i+=i&-i\n def sum(a,b):\n r=0\n i=b\n while i>0:\n r+=data[i]\n i-=i&-i\n i=a\n while i>0:\n r-=data[i]\n i-=i&-i\n return r\n p=[-1]*N\n q=0\n a=[0]*Q\n for i in range(N):\n if p[C[i]-1]>=0:\n add(p[C[i]-1],-1)\n p[C[i]-1]=i\n add(i,1)\n while q<Q and LR[q][2]==i+1:\n a[LR[q][0]]=sum(LR[q][1]-1,LR[q][2])\n q+=1\n return a\n\nimport sys\nif sys.argv[-1]=='ONLINE_JUDGE':\n from numba import*\n from numba.pycc import CC\n cc=CC('my_module')\n\n def cc_export(f,signature):\n cc.export(f.__name__,signature)(f)\n return njit(f)\n\n main=cc_export(main,(i8,i8,i8[:],i8[:,:]))\n cc.compile()\n exit()\n\nN,Q=map(int,input().split())\nimport numpy as np\nC=np.array(input().split(),dtype=np.int64)\nLR=sorted([[i]+list(map(int,input().split())) for i in range(Q)],key=lambda x:x[2])\nLR=np.array(LR)\n\nfrom my_module import main\nprint(*main(N,Q,C,LR),sep='\\n')", "from numba import*\n@njit(cache=1)\ndef main(N,Q,C,LR,A):\n data=[0]*(N+1)\n def add(i,x):\n i+=1\n while i<=N:\n data[i]+=x\n i+=i&-i\n def sum(a,b):\n r=0\n i=b\n while i>0:\n r+=data[i]\n i-=i&-i\n i=a\n while i>0:\n r-=data[i]\n i-=i&-i\n return r\n p=[-1]*N\n q=0\n a=[0]*Q\n for i in range(N):\n if p[C[i]-1]>=0:\n add(p[C[i]-1],-1)\n p[C[i]-1]=i\n add(i,1)\n while q<Q and LR[A[q]][1]==i+1:\n a[A[q]]=sum(LR[A[q]][0]-1,LR[A[q]][1])\n q+=1\n return a\n\nimport sys\ndef input(): return sys.stdin.buffer.readline()\nN,Q=map(int,input().split())\nimport numpy as np\nC=np.array(input().split(),dtype=np.int64)\nLR=np.array(sys.stdin.buffer.read().split(),dtype=np.int64).reshape(Q,2)\nA=np.argsort(LR[:,1])\nprint(*main(N,Q,C,LR,A),sep='\\n')\n"] | ['Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted'] | ['s210192031', 's215497151', 's020836021'] | [235888.0, 147920.0, 165316.0] | [2212.0, 2210.0, 1524.0] | [881, 1139, 913] |
p02621 | u000660752 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['int = int(input())\nprint(a*a*a+a*a+a)', 'i = int(input())\nprint(i*i*i+i*i+i)'] | ['Runtime Error', 'Accepted'] | ['s647600405', 's630415694'] | [9144.0, 9140.0] | [25.0, 28.0] | [37, 35] |
p02621 | u000842852 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\n\nx = a + a**2 + a**3\nprint(a)', 'a = int(input())\n\nx = a + a**2 + a**3\nprint(x)'] | ['Wrong Answer', 'Accepted'] | ['s616875801', 's754255618'] | [9072.0, 9140.0] | [30.0, 31.0] | [46, 46] |
p02621 | u007074599 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['n=int(input())\n \nans=0\nfor i in range(n):\n i=i+1\n a=i\n y=n//i\n \n ans+=(i*y*(y+1)/2)\n \n \n \nprint(ans)', 'a=int(input())\nprint(a+a**2+a**3)'] | ['Wrong Answer', 'Accepted'] | ['s479185370', 's650262579'] | [9108.0, 9080.0] | [31.0, 26.0] | [104, 33] |
p02621 | u011202375 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a=input()\nprint(a+a**2+a**3)', 'a=input()\nprint(int(a+a**2+a**3))\n', 'a=input()\na=int(a)\nprint(int(a+a**2+a**3))\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s447130370', 's768961340', 's955258546'] | [9080.0, 8944.0, 9040.0] | [22.0, 23.0, 30.0] | [28, 34, 43] |
p02621 | u015593272 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nans = a + a * a + a * a * a\nprint(ans)a = int(input())\n', 'a = int(input())\nans = a + a * a + a * a * a\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s858947965', 's959862370'] | [8952.0, 9092.0] | [23.0, 29.0] | [72, 55] |
p02621 | u015647294 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['def make_divisors(n):\n lower_divisors , upper_divisors = [], []\n i = 1\n while i*i <= n:\n if n % i == 0:\n lower_divisors.append(i)\n if i != n // i:\n upper_divisors.append(n//i)\n i += 1\n return lower_divisors + upper_divisors[::-1]\n\n\nans = 0\nk = make_divisors(int(input()))\nl = len(k)\nfor i in range(1,l):\n ans = ans + k[i] * i \nprint(ans)', 'N = int(input())\nA = N + N**2 + N**3\nprint(A)'] | ['Wrong Answer', 'Accepted'] | ['s450407592', 's374828149'] | [9164.0, 9028.0] | [32.0, 26.0] | [403, 45] |
p02621 | u021915951 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['n = int(input())\nprint(a+a**2+a**3)', 'a = int(input())\nprint(a+a**2+a**3)'] | ['Runtime Error', 'Accepted'] | ['s791136602', 's256788671'] | [9136.0, 9140.0] | [28.0, 34.0] | [35, 35] |
p02621 | u023229441 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['n=int(input())\nprint(a+a**2+a**3)', 'a=int(input())\nprint(a+a**2+a**3)\n'] | ['Runtime Error', 'Accepted'] | ['s178911422', 's741045583'] | [9136.0, 9132.0] | [25.0, 28.0] | [33, 34] |
p02621 | u024609780 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a=input()\nb=a**3+a**2+a\nprint(b)', 'a = int(input())\nb = a ** 3 + a ** 2 + a\nprint(b)\n'] | ['Runtime Error', 'Accepted'] | ['s867212604', 's346570070'] | [9008.0, 9136.0] | [28.0, 25.0] | [32, 50] |
p02621 | u029568245 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nprint(a + a**2 + a***3)', 'a = int(input())\nprint(a + a**2 + a**3)'] | ['Runtime Error', 'Accepted'] | ['s474004286', 's848618335'] | [8884.0, 9152.0] | [24.0, 28.0] | [40, 39] |
p02621 | u033893324 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a=input()\nprint(a+a**2+a**3)', 'a=int(input())\nprint(a+a ** 2+a ** 3)'] | ['Runtime Error', 'Accepted'] | ['s014588280', 's915787542'] | [9020.0, 9144.0] | [22.0, 30.0] | [28, 37] |
p02621 | u038819082 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a=int(input())\nprint(a+a^2+a^3)', 'a=int(input())\nprint(a+a**2+a**3)'] | ['Wrong Answer', 'Accepted'] | ['s768174278', 's683748807'] | [9176.0, 9084.0] | [31.0, 30.0] | [31, 33] |
p02621 | u042209706 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = input()\nans = a + (a ** 2) + (a ** 3)\nprint(ans)', 'a = int(input())\nans = a + (a ** 2) + (a ** 3)\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s879960286', 's804807264'] | [9012.0, 9144.0] | [29.0, 31.0] | [52, 57] |
p02621 | u043105935 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a=int(input())\nvalue=a+(a*a)+(a*a*a*)\nprint(value)', 'a=int(input())\nif(a>=1 and a<=10):\n val=a+(a*a)+(a*a*a)\n print(val)'] | ['Runtime Error', 'Accepted'] | ['s956212579', 's509457470'] | [8952.0, 9148.0] | [32.0, 30.0] | [50, 73] |
p02621 | u044378346 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nans = (a + (a**2) + (a**3))', 'a = int(input());print(a + a**2 + a**3)'] | ['Wrong Answer', 'Accepted'] | ['s812889524', 's895657798'] | [8996.0, 9100.0] | [26.0, 26.0] | [44, 39] |
p02621 | u046187684 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ["def solve(string):\n a = int(string)\n return str(a + a**2 + a**3) \n\nif __name__ == '__main__':\n import sys\n print(solve(sys.stdin.read().strip()))\n~ ~ ~ ~ ~ ", "def solve(string):\n a = int(string)\n return str(a + a**2 + a**3) \n\nif __name__ == '__main__':\n import sys\n print(solve(sys.stdin.read().strip()))\n~ ~ ~ ~ ~ ", "def solve(string):\n a = int(string)\n return str(a + a**2 + a**3) \n\nif __name__ == '__main__':\n import sys\n print(solve(sys.stdin.read().strip()))\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s552763701', 's883546059', 's201064537'] | [9020.0, 9028.0, 9088.0] | [22.0, 26.0, 27.0] | [779, 779, 246] |
p02621 | u046247133 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nprint(a+a^2+a^3)', 'a = int(input())\nprint(a+a**2+a**3)'] | ['Wrong Answer', 'Accepted'] | ['s007878396', 's122044503'] | [9176.0, 9124.0] | [27.0, 26.0] | [33, 35] |
p02621 | u048844044 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['print(int(a+a**2+a**3))', 'print(a + a ** 2 + a ** 3)', 'a = input()\nprint(a + a ** 2 + a ** 3)', 'a=int(input())\nprint(a+a**2+a**3)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s064859994', 's166629245', 's577438148', 's587252527'] | [8900.0, 9072.0, 8848.0, 9128.0] | [27.0, 27.0, 27.0, 24.0] | [23, 26, 38, 33] |
p02621 | u050584166 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input()\nprint(a + a**2 + a**3)', 'a = int(input())\nprint(a + a**2 + a**3)'] | ['Runtime Error', 'Accepted'] | ['s430991322', 's005686341'] | [8948.0, 9144.0] | [21.0, 33.0] | [38, 39] |
p02621 | u051496905 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nprint("a+a*a+a*a*a")', 'a = int(input())\nprint(a + a * a + a * a * a)'] | ['Wrong Answer', 'Accepted'] | ['s792743834', 's682869623'] | [9012.0, 9064.0] | [24.0, 26.0] | [37, 45] |
p02621 | u057993957 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['n, m, k = list(map(int, input().split()))\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n \nl = []\nfor i in range(min(n, m)):\n l.append(min(a[i], b[i]))\n l.append(max(a[i], b[i]))\n\nfor i in range(min(n, m), max(n, m)):\n if n > m:\n l.append(a[i])\n else:\n l.append(b[i])\n\ntotal = 0\ncnt = 0\nfor i in range(n+m):\n if total+l[i] > k:\n break\n total += l[i]\n cnt += 1\nprint(cnt)', 's = int(input())\nprint(s + s**2 + s**3)'] | ['Runtime Error', 'Accepted'] | ['s175599395', 's154486972'] | [9236.0, 9016.0] | [23.0, 28.0] | [411, 39] |
p02621 | u059631536 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a=int((input())\nprint(a+a**2+a**3)', 'a=int((input())\nprint(a+a^2+a^3)', 'a=int((input())\nprint(a+a^2+a^3)', 'a=int(input())\nprint(a+a**2+a**3)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s355112370', 's388532484', 's575978481', 's525084498'] | [9008.0, 8948.0, 8804.0, 9140.0] | [25.0, 23.0, 29.0, 31.0] | [34, 32, 32, 33] |
p02621 | u060012100 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['s = int(input())\nval = 0\nfor i in range(1,4):\n a = s**i\n val +=a\n print(val)\n ', 's = int(input())\nprint(s**1+s**2+s**3)'] | ['Wrong Answer', 'Accepted'] | ['s445258825', 's941267907'] | [9148.0, 9152.0] | [29.0, 24.0] | [82, 38] |
p02621 | u063232468 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nout = a + a^2 + a^3\nprint(out)', 'a = int(input())\nout = a + a**2 + a**3\nprint(out)'] | ['Wrong Answer', 'Accepted'] | ['s431505211', 's140172497'] | [9076.0, 9088.0] | [27.0, 27.0] | [47, 49] |
p02621 | u063346608 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['S = input()\nT = input()\n\ncount = 0\nfor i in range(len(S)):\n\tif S[i] != T[i]:\n\t\tcount = count + 1\n\nprint(count)', 'a = int(input())\n\nprint(a + a ** 2 + a ** 3)'] | ['Runtime Error', 'Accepted'] | ['s179118405', 's310608910'] | [9016.0, 9112.0] | [20.0, 27.0] | [110, 44] |
p02621 | u068538925 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['def main():\n n,m,k = input().split()\n n=int(n)\n m=int(m)\n k=int(k)\n\n n_list = list(map(int,input().split()))\n m_list = list(map(int,input().split()))\n a, b =[0],[0]\n for i in range(n):\n a.append(a[i]+n_list[i])\n for j in range(m):\n b.append(b[j]+m_list[j])\n \n j=m\n ans = 0\n for i in range(n+1):\n if a[i]>k:\n break\n while b[j]+a[i]>k:\n j -= 1\n ans = max(ans,i+j)\n print(ans)\nmain()', 'def main():\n a = int(input())\n print(a+a**2+a**3)\n\nmain()'] | ['Runtime Error', 'Accepted'] | ['s449680379', 's137367590'] | [8992.0, 9008.0] | [23.0, 27.0] | [479, 63] |
p02621 | u069493428 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a=int(input())\nif 1<=a<=10:\nprint(a+a**2+a**3)', 'a=int(input())\nif 1<=a<=10:\n print(a+a**2+a**3)'] | ['Runtime Error', 'Accepted'] | ['s992190589', 's976434376'] | [8944.0, 9008.0] | [28.0, 28.0] | [46, 50] |
p02621 | u069699931 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['N,M,K=map(int,input().split())\nAi=list(map(int,input().split()))\nBi=list(map(int,input().split()))\nlist=[]\nfor i in range(N+M):\n if A[i]>B[i]:\n list.append(B[i])\n else:\n list.append(A[i])\n if sum(list)>=K:\n break\nprint(len(list))', 'a=int(input())\nprint(a+a**2+a**3)'] | ['Runtime Error', 'Accepted'] | ['s768818457', 's633500623'] | [9084.0, 8920.0] | [25.0, 24.0] | [267, 33] |
p02621 | u072507091 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ["import re\nimport sys\nS = input()\nT = input()\nw = 0\nif not re.match(r'^[a-z]+$', S) or not re.match(r'^[a-z]+$', T) or len(S) != len(T) or (10 ** 5 * 2) < len(S):\n sys.exit()\nif S != T:\n i = 0\n for l in S:\n if l != T[i]:\n w = w + 1\n i = i + 1\nprint(w)", 'N = int(input())\nans = 0\nfor j in range(1, N+1):\n for i in range(1, N+1):\n if i % j == 0:\n ans += i\nprint(ans)', 'import re\nimport sys\ntry:\n a = int(input())\n if not 1 <= a <= 10:\n sys.exit()\n print(a+(a**2)+(a**3))\nexcept:\n sys.exit()'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s457702804', 's747921651', 's363397480'] | [9792.0, 9104.0, 9668.0] | [34.0, 24.0, 35.0] | [264, 131, 128] |
p02621 | u072606168 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nprint(a*(a**2)*(a**3))', 'a = int(input())\nprint(a+(a**2)+(a**3))'] | ['Wrong Answer', 'Accepted'] | ['s413152885', 's171405145'] | [9140.0, 9088.0] | [29.0, 31.0] | [39, 39] |
p02621 | u077220473 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = input()\nprint(a + a*a + a*a*a)', 'print(a + a*a + a*a*a)', 'def main():\n a = int(input())\n print(a + a*a + a*a*a)\n \nif __name__ == "__main__":\n main()'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s224407638', 's430116137', 's377387383'] | [9044.0, 8920.0, 9140.0] | [21.0, 22.0, 28.0] | [34, 22, 102] |
p02621 | u079748877 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['n,m,k = map(int,input().split())\nbook_list = list(map(int,input().split()))\nbook_list.extend(list(map(int,input().split())))\nbook_list.sort()\ncount=0\nreadTime=0\nfor i in range(n+m):\n if readTime+book_list[i]<=k:\n count+=1\n readTime+=book_list[i]\n else:\n break\nprint(count)', 'x=int(input())\nprint(x+x**2+x**3)'] | ['Runtime Error', 'Accepted'] | ['s622055673', 's957009686'] | [9132.0, 9048.0] | [30.0, 28.0] | [299, 33] |
p02621 | u081948001 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a=input()\n\nprint(int(a+a**2+a**3))', 'a=int(input())\n \nb=a+(a**2)+(a**3)\nprint(b)'] | ['Runtime Error', 'Accepted'] | ['s044780461', 's865832971'] | [9088.0, 9080.0] | [27.0, 33.0] | [34, 43] |
p02621 | u087118202 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a=input()\nx=a+a*a+a*a*a\nprint(a)', 'a=input()\nprint(a+a*a+a*a*a)', 'num = int(input())\nnum2 = num + num*num+num*num*num\nprint(num2)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s003197478', 's606595911', 's193794994'] | [9072.0, 9076.0, 9156.0] | [26.0, 24.0, 31.0] | [32, 28, 63] |
p02621 | u087470052 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['x = int(import())\nprint(x+x*x+x*x*x)', 'x = int(input())\nprint(x+x*x+x*x*x)'] | ['Runtime Error', 'Accepted'] | ['s846716089', 's492640408'] | [8864.0, 9168.0] | [34.0, 27.0] | [36, 35] |
p02621 | u096025032 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = input()\nprint(a+(a*a)+(a*a*a))\n', 'a = int(input())\nprint(a+(a*a)+(a*a*a))\n'] | ['Runtime Error', 'Accepted'] | ['s792736870', 's839836461'] | [8952.0, 9144.0] | [20.0, 26.0] | [35, 40] |
p02621 | u096147269 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\n\nans = a+a*2+a*3\n\nprint ans\n', 'a = int(input())\n\nans = a+a*2+a*3\n\nreturn ans\n', 'a = int(input())\n\nans = a+a*2+a*3\n\nprint(ans)', 'a = int(input())\n\nint ans = a+a*2+a*3\n\nprint(ans)', 'a = int(input())\n\nans = a+a*a+a*a*a\n\nreturn ans\n', 'a = int(input())\n\nans = a+a*a+a*a*a\n\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s324048989', 's421267839', 's832773278', 's918478288', 's923821345', 's883392104'] | [8948.0, 8700.0, 8856.0, 8700.0, 9008.0, 8852.0] | [23.0, 25.0, 25.0, 29.0, 28.0, 27.0] | [45, 46, 45, 49, 48, 47] |
p02621 | u097069712 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = input()\nn = 2\nm = 3\nprint(a + a**n + a**m)', 'a = input()\nn = 2\nm = 3\nprint(a+a**n+a**3)', 'a = input()\nprint(a+a^2+a^3)', 'a = input()\nn = 2\nm = 3\nprint(a + a ** n + a ** m)', 'a = int(input())\nn = 2\nm = 3\nprint(a + a ** n + a ** m)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s199829966', 's594526332', 's661675450', 's694162792', 's913964326'] | [9028.0, 8836.0, 8948.0, 8948.0, 9088.0] | [24.0, 31.0, 30.0, 30.0, 32.0] | [46, 42, 28, 50, 55] |
p02621 | u102461423 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ["import sys\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\ndef main(N):\n x = 0\n for a in range(1, N+1):\n for b in range(a, N+1, a):\n x += b\n return x\n\nif sys.argv[-1] == 'ONLINE_JUDGE':\n import numba\n from numba.pycc import CC\n i8 = numba.int64\n cc = CC('my_module')\n\n def cc_export(f, signature):\n cc.export(f.__name__, signature)(f)\n return numba.njit(f)\n\n main = cc_export(main, (i8, ))\n cc.compile()\n\nfrom my_module import main\n\nN = int(read())\nprint(main(N))\n", 'import sys\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nx = int(read())\nprint(x + x * x + x * x * x)'] | ['Wrong Answer', 'Accepted'] | ['s448141569', 's161797742'] | [27428.0, 9016.0] | [117.0, 30.0] | [585, 162] |
p02621 | u103831818 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = input()\nreturn a + a ** a + a ** a ** a', 'a = int(input())\na + a ** 2 + a ** 3', 'return a + a ** a + a ** a ** a', 'a = int(input())\nreturn a + a ** 2 + a ** 3', 'a = input()\nreturn a + a ** 2+ a ** 3', 'a = int(input())\nb = a + a ** 2 + a ** 3\nprint(b)'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s062760796', 's140973671', 's331853460', 's354880075', 's841840499', 's518305626'] | [9072.0, 9076.0, 9020.0, 9076.0, 9072.0, 9160.0] | [23.0, 31.0, 28.0, 23.0, 30.0, 29.0] | [43, 36, 31, 43, 37, 49] |
p02621 | u104545083 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['print(a + (a*a) + (a*a*a))', 'a = int(input())\nprint(a + (a * a) + (a * a * a))'] | ['Runtime Error', 'Accepted'] | ['s179846127', 's481083572'] | [9020.0, 9160.0] | [22.0, 29.0] | [26, 49] |
p02621 | u108976315 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['num = input()\nprint(num + (num*num) + (num*num*num))', 'num = int(input())\nprint(num + (num*num) + (num*num*num))'] | ['Runtime Error', 'Accepted'] | ['s019760764', 's625725731'] | [8932.0, 9076.0] | [22.0, 28.0] | [52, 57] |
p02621 | u113028239 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ["def main():\n n, m, k = map(int, input().split())\n a = [int(x) for x in input().split()]\n b = [int(x) for x in input().split()]\n\n a_sum = [0 for x in range(n)]\n b_sum = [0 for x in range(m)]\n\n a_sum[0] = a[0]\n b_sum[0] = b[0]\n\n max_counter = 0\n\n for i in range(1, n):\n a_sum[i] = a[i] + a_sum[i - 1]\n\n for i in range(1, m):\n b_sum[i] = b[i] + b_sum[i - 1]\n\n for i in range(n):\n for j in range(m):\n if k >= a_sum[i] + b_sum[j] and max_counter < i + j + 2:\n max_counter = i + j + 2\n \n print(max_counter)\n\nif __name__ == '__main__':\n main()", "def main():\n a = int(input())\n\n print(a + (a ** 2) + (a ** 3))\n \nif __name__ == '__main__':\n main()"] | ['Runtime Error', 'Accepted'] | ['s432831248', 's282764509'] | [9228.0, 9096.0] | [26.0, 30.0] | [629, 108] |
p02621 | u124040548 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a, b = [input() for i in range(2)]\n\ncount = 0\nout = 0\nif a == b:\n print("0")\nelse:\n c = list(a)\n d = list(b)\n for i in c:\n if i == d[count]:\n pass\n else:\n out = out + 1\n count = count + 1\n print(str(out))', 'a = int(input())\n \nprint(str(a + (a ** 2) + (a ** 3)))'] | ['Runtime Error', 'Accepted'] | ['s231757610', 's230100397'] | [9056.0, 9032.0] | [25.0, 28.0] | [228, 54] |
p02621 | u126977215 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['int a\nint x\nx = a+(a*a)+(a*a*a)\nptint(x)', 'a = int(input())\nx = a+(a*a)+(a*a*a)\nprint(x)'] | ['Runtime Error', 'Accepted'] | ['s746429055', 's208267247'] | [9004.0, 9136.0] | [22.0, 31.0] | [40, 45] |
p02621 | u129798154 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['val = input()\n\nres = val + val ** 2 + val ** 3\n\nprint(res.astype(int))', 'val = input()\n\nprint(val + val ** 2 + val ** 3)', 'val = int(input())\n\nprint(val + val **2 + val **3)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s069535062', 's332803200', 's323065432'] | [9028.0, 8888.0, 9140.0] | [24.0, 26.0, 31.0] | [70, 47, 50] |
p02621 | u130417678 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ["import argparse\n\n\ndef main():\n parser = argparse.ArgumentParser()\n\n parser.add_argument('input', metavar='a', type=int)\n\n args = parser.parse_args()\n\n a = args.input\n\n print('{0}'.format(a+a*a+a*a*a))\n\n\nif __name__ == '__main__':\n main()\n", "import argparse\n\nparser = argparse.ArgumentParser()\n\nparser.add_argument('input', metavar='a', type=int)\n\nargs = parser.parse_args()\n\na = args.input\n\nprint('{0}'.format(a+a*a+a*a*a))", "import argparse\n\n\ndef main():\n parser = argparse.ArgumentParser()\n\n parser.add_argument('input', metavar='a', type=int)\n\n args = parser.parse_args()\n\n a = args.input\n\n print('{0}'.format(a+a*a+a*a*a))\n\n\nif __name__ == '__main__':\n main()", "a = int(input())\nprint('{0}'.format(a+a*a+a*a*a))"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s287529459', 's436713616', 's918511298', 's740439033'] | [11336.0, 11228.0, 11340.0, 9148.0] | [44.0, 42.0, 43.0, 26.0] | [256, 182, 255, 49] |
p02621 | u131464432 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['n,m,k = map(int,input().split())\na = list(map(int,input().split()))\nb = list(map(int,input().split()))\nif sum(a)+sum(b)<=k:\n print(n+m)\n exit()\nnum = 0\ncnt = -1\nfor i in range(n+m):\n if num>k:\n break\n elif a == []:\n num += b[0]\n cnt +=1\n del b[0]\n elif b == []:\n num += a[0]\n cnt += 1\n del a[0]\n elif a[0] <= b[0]:\n num += a[0]\n cnt += 1\n del a[0]\n else:\n num += b[0]\n cnt += 1\n del b[0]\nprint(cnt)', 'a = int(input())\nprint(a+a**2+a**3)'] | ['Runtime Error', 'Accepted'] | ['s357608899', 's811719638'] | [9092.0, 9140.0] | [29.0, 28.0] | [510, 35] |
p02621 | u141419468 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['import sympy\nimport sys\nsys.setrecursionlimit(10**6)\n\nN = int(input())\ndiv = []\nfor i in range(1,N+1):\n f = sympy.divisor_count(i)\n div.append(f*i)\n\nprint(sum(div))', 'a = int(input())\nprint(a+a**2+a**3)'] | ['Runtime Error', 'Accepted'] | ['s743731020', 's666246625'] | [8732.0, 8840.0] | [23.0, 33.0] | [170, 35] |
p02621 | u156209487 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a=int(input())\nprint(a+a*a)+(a*a*a)', 'a = int(input())\nprint(a+a*a)+(a*a*a)', 'a = int(input())\nprint(a+a*a)(a*a*a)', 'a=int(input())\nprint(a+a*a)(a*a*a)', 'a = int(input())\nprint(a+(a*a)+(a*a*a))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s846356514', 's908489110', 's919160295', 's981576165', 's107990826'] | [9068.0, 9068.0, 9032.0, 9156.0, 9084.0] | [24.0, 21.0, 23.0, 26.0, 27.0] | [35, 37, 36, 34, 39] |
p02621 | u159369286 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['s = input()\nt = input()\nn = len(s)\nans = 0\nfor i in range(n):\n if s[i] != t[i]:\n ans += 1\nprint(ans)', 's = input()\nt = input()\nn = len(s)\nans = 0\nfor i in range(n):\n if s[i] != t[i]:\n s[i] = t[i]\n x += 1\nprint(ans)', 's = input()\nt = input()\nn = len(s)\ns.split()\nt.split()\nans = 0\nfor i in range(n):\n if s[i] != t[i]:\n s[i] = t[i]\n x += 1\n else:\n pass\nprint(ans)', 'a=int(input())\nprint(a+a**2+a**3)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s119372834', 's550064572', 's853005238', 's353279377'] | [8972.0, 9024.0, 8988.0, 9016.0] | [26.0, 26.0, 30.0, 25.0] | [110, 128, 171, 33] |
p02621 | u161164709 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['N, M, K = list(map(int, input().split()))\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\n\nA_sum = [0]\nB_sum = [0]\nfor i in range(N):\n A_sum.append(A_sum[i]+A[i])\nfor i in range(M):\n B_sum.append(B_sum[i]+B[i])\n\n\nnum = 0\nJ = M\nfor i in range(N+1):\n if A_sum[i] > K:\n break\n for j in (J,-1,-1):\n if A_sum[i] + B_sum[j] <= K:\n if num < i+j:\n num = i+j\n J = j\n break\n\nprint(num)\n', 'a = int(input())\nprint(a+a**2+a**3)'] | ['Runtime Error', 'Accepted'] | ['s027047582', 's100852828'] | [9092.0, 9044.0] | [24.0, 29.0] | [474, 35] |
p02621 | u161693347 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ["import sys, re, os\nfrom collections import deque, defaultdict, Counter\nfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians\n# from fractions import gcd\nfrom itertools import permutations, combinations, product, accumulate\nfrom operator import itemgetter, mul\nfrom copy import deepcopy\nfrom string import ascii_lowercase, ascii_uppercase, digits\nfrom functools import reduce\nfrom bisect import bisect_left, insort_left\nfrom heapq import heapify, heappush, heappop\n\nINPUT = lambda: sys.stdin.readline().rstrip()\nINT = lambda: int(INPUT())\nMAP = lambda: map(int, INPUT().split())\nS_MAP = lambda: map(str, INPUT().split())\nLIST = lambda: list(map(int, INPUT().split()))\nS_LIST = lambda: list(map(str, INPUT().split()))\nZIP = lambda: zip(*(MAP() for _ in range(n)))\n\nsys.setrecursionlimit(10 ** 9)\nINF = float('inf')\nmod = 10 ** 9 + 7\n\n\ndef main():\n a = 0\n print(a + a ** 2 + a **3)\n\n\nif __name__ == '__main__':\n main()\n", "import sys, re, os\nfrom collections import deque, defaultdict, Counter\nfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians\n# from fractions import gcd\nfrom itertools import permutations, combinations, product, accumulate\nfrom operator import itemgetter, mul\nfrom copy import deepcopy\nfrom string import ascii_lowercase, ascii_uppercase, digits\nfrom functools import reduce\nfrom bisect import bisect_left, insort_left\nfrom heapq import heapify, heappush, heappop\n\nINPUT = lambda: sys.stdin.readline().rstrip()\nINT = lambda: int(INPUT())\nMAP = lambda: map(int, INPUT().split())\nS_MAP = lambda: map(str, INPUT().split())\nLIST = lambda: list(map(int, INPUT().split()))\nS_LIST = lambda: list(map(str, INPUT().split()))\nZIP = lambda: zip(*(MAP() for _ in range(n)))\n\nsys.setrecursionlimit(10 ** 9)\nINF = float('inf')\nmod = 10 ** 9 + 7\n\n\ndef main():\n a = INT()\n print(a + a ** 2 + a **3)\n\n\nif __name__ == '__main__':\n main()\n"] | ['Wrong Answer', 'Accepted'] | ['s791043141', 's934866146'] | [9976.0, 10040.0] | [41.0, 40.0] | [940, 944] |
p02621 | u173644182 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['def main():\n n, m, k = map(int, input().split())\n a = list(map(int, input().split()))\n b = list(map(int, input().split()))\n a.append(10**9+1)\n b.append(10**9+1)\n a, b = a[::-1], b[::-1]\n sum = 0\n for _ in range(400001):\n x = a.pop() if a[-1] < b[-1] else b.pop()\n if x > 10**9:\n break\n k -= x\n if k < 0:\n break\n sum += 1\n print(sum)\n\nif __name__ == "__main__":\n main()\n', 'def main():\n a = int(input())\n ans = a + a**2 + a**3\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n'] | ['Runtime Error', 'Accepted'] | ['s340893387', 's029933508'] | [9192.0, 9144.0] | [31.0, 29.0] | [456, 114] |
p02621 | u174536291 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = input()\nmy_result = a + a*a + a*a*a\nprint(my_result)', 'a = input()\nmy_result = a + a**2 + a**3\nprint(my_result)', 'a = int(input())\nmy_result = a + a**2 + a ***3\nmy_result', 'a = int(input())\nmy_result = a + a**2 + a**3\nprint(my_result)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s440454341', 's616493866', 's751981617', 's261214359'] | [8892.0, 8984.0, 8852.0, 9056.0] | [29.0, 21.0, 24.0, 26.0] | [56, 56, 56, 61] |
p02621 | u174990305 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nans = a*(1+a+a*a*)\nprint(ans)', 'a = int(input())\nans = a + a^2 + a^3\nprint(ans)', 'a = int(input())\nans = a + (a*a) + (a*a*a)\nprint(ans)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s330412489', 's556989549', 's227943679'] | [8880.0, 9008.0, 9012.0] | [24.0, 26.0, 28.0] | [46, 47, 53] |
p02621 | u178951696 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['x=input()\nprint(x+(int)(pow(x,2)+(int)(pow(x,3)))', 'x=(int)(input())\ny=x+(int)(pow(x,2))+(int)(pow(x,3))\nprint("{}".format(y))'] | ['Runtime Error', 'Accepted'] | ['s639234152', 's039256069'] | [8844.0, 9036.0] | [20.0, 28.0] | [49, 74] |
p02621 | u185120792 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = (int(x) for x in input().split())\n\nprint(a + a*a + a*a*a)', 'a = int(input())\nprint(a + a*a + a*a*a)'] | ['Runtime Error', 'Accepted'] | ['s119776549', 's507690268'] | [9084.0, 9144.0] | [26.0, 33.0] | [61, 39] |
p02621 | u189762886 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = input()\nprint(a + a*a + a*a*a)', 'a = input()\nprint(a + a**2 + a**3)', 'a = input()\nprint(a + a**2 + a**3)', 'a = input()\na = int(a)\nprint(a + a**2 + a**3)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s240735124', 's267719363', 's999053545', 's761653612'] | [8860.0, 9088.0, 8952.0, 9020.0] | [32.0, 25.0, 29.0, 33.0] | [34, 34, 34, 45] |
p02621 | u190564874 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['# coding: utf-8\n\ninpnum = int(input())\n\nsum = lambda n,t : n * t\n\nprint(sum(inpnum, 6))\n\n', '# coding: utf-8\n\ninpnum = int(input())\n\nsum = lambda n,t : n ** t\n\nprint(inpnum + sum(inpnum, 2) + sum(inpnum, 3))\n\n'] | ['Wrong Answer', 'Accepted'] | ['s375988600', 's957003577'] | [8904.0, 9140.0] | [29.0, 31.0] | [89, 116] |
p02621 | u190850294 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ["import sys\ndef LI(): return list(map(int, sys.stdin.buffer.readline().split()))\ndef I(): return int(sys.stdin.buffer.readline())\ndef LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()\ndef S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef LSR(n): return [LS() for i in range(n)]\ndef SRL(n): return [list(S()) for i in range(n)]\ndef MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]\nmod = 10 ** 9 + 7\n\na = I()\n\nans = int(a + a ** 2 + a ** 3)", "import sys\ndef LI(): return list(map(int, sys.stdin.buffer.readline().split()))\ndef I(): return int(sys.stdin.buffer.readline())\ndef LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()\ndef S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef LSR(n): return [LS() for i in range(n)]\ndef SRL(n): return [list(S()) for i in range(n)]\ndef MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]\nmod = 10 ** 9 + 7\n\na = I()\n\nans = int(a + a ** 2 + a ** 3)\n\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s363308404', 's444533007'] | [9224.0, 9192.0] | [26.0, 28.0] | [623, 635] |
p02621 | u193597115 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['def calc(int: a) -> int:\n return a+a**2+a**3\n\nif __name__ == "__main__":\n a = int(input())\n print(calc(a))', 'def calc(a: int) -> int:\n return a+a**2+a**3\n\nif __name__ == "__main__":\n a = int(input())\n print(calc(a))'] | ['Runtime Error', 'Accepted'] | ['s671297479', 's886565113'] | [8948.0, 9156.0] | [27.0, 27.0] | [115, 115] |
p02621 | u199962958 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['input(a)\n print(a + a * 2 + a * 3 = Z)', 'input(a)\n print("a + a * 2 + a * 3")', 'input(a)\n\na**2 + a**3 + a**4 = Z\nprint("Z")', 'input(a)\n print(a + a * 2 + a * 3)', 'input(a)\n \na * 2 + a * 3 + a * 4 = Z\n\tprint("Z")', 'a = input()\na + a **2 + a ** 3 = A\nprint(A)\n', 'a = input()\na + a * 2 + a * 3 = Z\n print(Z)\n', 'a = input()\n print(a + a * 2 + a * 3)\n', 'a = input()\n print(a + a * 2 + a * 3 = Z)', 'a = input()\n\tprint(a + a ** 2 + a ** 3)\n', 'a = input()\na + a ** 2 + a ** 3 = A\nprint(A)', 'input(a)\n \na ** 2 + a ** 3 + a ** 4 = Z\n\tprint("Z")', 'input(a)\n \na + a * 2 + a * 3 = Z\n\tprint("Z")', 'a = int(input())\nprint(a + a**2 + a**3)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s065025145', 's164049987', 's185614555', 's279430360', 's382356611', 's536177957', 's562089770', 's635757604', 's785903486', 's835258582', 's835648570', 's849532580', 's974455102', 's108485938'] | [8948.0, 9008.0, 8772.0, 8620.0, 9000.0, 9056.0, 8988.0, 8884.0, 8988.0, 8932.0, 8972.0, 9016.0, 8924.0, 9076.0] | [23.0, 23.0, 22.0, 24.0, 29.0, 23.0, 25.0, 25.0, 21.0, 24.0, 27.0, 23.0, 25.0, 26.0] | [38, 36, 43, 34, 48, 44, 44, 38, 41, 40, 44, 51, 44, 39] |
p02621 | u200233381 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['n = int(input())\n\nprint(n*pow(n, 2)*pow(n, 3))', 'n = int(input())\n\nprint(n + pow(n, 2) + pow(n, 3))'] | ['Wrong Answer', 'Accepted'] | ['s255245631', 's391194656'] | [9144.0, 9084.0] | [31.0, 28.0] | [46, 50] |
p02621 | u203239974 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['def get_sum_arr(arr):\n sum_arr = [0]\n N = len(arr)\n for i in range(1,N+1):\n sum_arr.append(sum_arr[i-1] + arr[i-1])\n return sum_arr\n\ndef get_max_b(left_time,j,B_sum_arr):\n # [0,1,2,3,4,5]\n while B_sum_arr[j] >= left_time and j > 0:\n j -= 1\n return j\ndef get_max_book_num(A,B,K):\n A_sum_arr,B_sum_arr = get_sum_arr(A),get_sum_arr(B)\n count,i,j = 0,0,len(B_sum_arr)-1\n for i in range(0,len(A_sum_arr)):\n if K < A_sum_arr[i]:\n break\n else:\n left_time = K - A_sum_arr[i]\n j = get_max_b(left_time,j,B_sum_arr)\n count = max(count,(i+j))\n return count\n\nif __name__ == "__main__":\n N,M,K = list(map(int,input().split()))\n A = list(map(int,input().split()))\n # [0,1,2,3,4,5]\n B = list(map(int,input().split()))\n # [0,1,2,3,4,5]\n print(get_max_book_num(A,B,K))\n \n', 'a = int(input())\nprint(a+a**2+a**3)'] | ['Runtime Error', 'Accepted'] | ['s721686175', 's443381845'] | [9092.0, 9016.0] | [26.0, 27.0] | [877, 35] |
p02621 | u204358360 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['from math import pow\n\ndef func(x):\n return x + pow(x,2) + pow(x,3)\n \n\nif __name__=="__main__":\n input = input()\n print(func(int(input)))\n ', 'def func(x):\n return x + x**2 + x**3\n \n\nif __name__=="__main__":\n input = input()\n print(func(int(input)))\n'] | ['Wrong Answer', 'Accepted'] | ['s725637611', 's120566815'] | [9280.0, 9088.0] | [25.0, 27.0] | [153, 119] |
p02621 | u209620426 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nprint(a + a^2 + a^3)', 'a = int(input())\nprint(a + a^2 + a^3)', 'a = int(input())\nprint(a + a**2 + a**3)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s582979975', 's593198169', 's193526588'] | [8972.0, 9084.0, 9168.0] | [27.0, 26.0, 27.0] | [37, 37, 39] |
p02621 | u212786022 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(inut())\n\nprint(a**3+a**2+a)', 'a = int(input())\n\nprint(a**3+a**2+a)\n'] | ['Runtime Error', 'Accepted'] | ['s176657813', 's259542335'] | [8928.0, 9152.0] | [27.0, 26.0] | [35, 37] |
p02621 | u216015528 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['def dfs(a, b, k):\n global cnt\n seen[a][b] = True\n na = a + 1\n nb = b + 1\n if na <= N and seen[na][b] is False and k >= book_a[na]:\n k -= book_a[na]\n cnt = max(cnt, na + b)\n dfs(na, b, k)\n if nb <= M and seen[a][nb] is False and k >= book_b[nb]:\n k -= book_b[nb]\n cnt = max(cnt, a + nb)\n dfs(a, nb, k)\n \nN, M, k = map(int, input().split())\nbook_a = [int(x) for x in input().split()]\nbook_b = [int(x) for x in input().split()]\nbook_a.insert(0, 0)\nbook_b.insert(0, 0)\ncnt = 0\nseen = [[False] * (M + 1) for _ in range(N + 1)]\ndfs(0, 0, k)\nprint(cnt)', 'def resolve():\n def dfs(a, b, k):\n nonlocal cnt\n seen[a][b] = True\n na = a + 1\n nb = b + 1\n if na <= N and seen[na][b] is False and k >= book_a[na]:\n k -= book_a[na]\n cnt = max(cnt, na + b)\n dfs(na, b, k)\n if nb <= M and seen[a][nb] is False and k >= book_b[nb]:\n k -= book_b[nb]\n cnt = max(cnt, a + nb)\n dfs(a, nb, k)\n\n N, M, k = map(int, input().split())\n book_a = [int(x) for x in input().split()]\n book_b = [int(x) for x in input().split()]\n book_a.insert(0, 0)\n book_b.insert(0, 0)\n cnt = 0\n seen = [[False] * (M + 1) for _ in range(N + 1)]\n dfs(0, 0, k)\n print(cnt)\n\n\nif __name__ == "__main__":\n resolve()\n', 'a = int(input())\nprint(a + a ** 2 + a ** 3)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s667259224', 's887948579', 's020114808'] | [8960.0, 9180.0, 9144.0] | [23.0, 24.0, 33.0] | [612, 753, 43] |
p02621 | u217138547 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a=int(input())\nb=a**a\nprint(int(a+b+a*b)', 'a=int(input())\nb=a*a\nprint(int(a+b+a*b))'] | ['Runtime Error', 'Accepted'] | ['s969305868', 's423935957'] | [8948.0, 9084.0] | [29.0, 27.0] | [40, 40] |
p02621 | u217571418 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nb = a + a^2 + a^3\nprint(int(b))', 'a = int(input)\nb = a + a^2 * a^3\nprint(b)', 'a = int(input())\nb = a + a*a + a*a*a\nprint(int(b))'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s541506143', 's796540561', 's747177470'] | [8940.0, 9000.0, 9072.0] | [29.0, 25.0, 26.0] | [48, 41, 50] |
p02621 | u221940831 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['num = int(input())\nprint(num + num * mum + num ** 3)', 'num = int(input())\n\nprint(num + num ** 2 + num ** 3)'] | ['Runtime Error', 'Accepted'] | ['s566845153', 's546954982'] | [9136.0, 8968.0] | [26.0, 28.0] | [52, 52] |
p02621 | u233891622 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nb = int(a + a^2 + a^3)\nprint(b)', 'a = int(input())\nprint(a + a^2 + a^3)', 'a = int(input())\nb = int(a + a * a + a * a * a)\nprint(b)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s727230481', 's866136226', 's163487866'] | [8932.0, 9052.0, 9036.0] | [29.0, 31.0, 24.0] | [48, 37, 57] |
p02621 | u237380198 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['n, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\na.append(k+1)\nb.append(k+1)\nia = 0\nib = 0\ncount = 0\n\nfor i in range(n + m + 1):\n if (a[ia] < b[ib]):\n if(a[ia] > k):\n print(count)\n break\n else:\n k -= a[ia]\n ia += 1\n count += 1\n else:\n if(b[ib] > k):\n print(count)\n break\n else:\n k -= b[ib]\n ib += 1\n count += 1', 'n, m, k = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\na.append(k+1)\nb.append(k+1)\nia = 0\nib = 0\ncount = 0\n\nfor i in range(n + m + 1):\n if (a[ia] < b[ib]):\n if(a[ia] > k):\n print(count)\n break\n else:\n k -= a[ia]\n ia += 1\n count += 1\n else:\n if(b[ib] > k):\n print(count)\n break\n else:\n k -= b[ib]\n ib += 1\n count += 1\n', 'a = int(input())\nans = a * (1 + a + a * a)\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s386381790', 's902226881', 's265768508'] | [8980.0, 8876.0, 9076.0] | [21.0, 21.0, 23.0] | [513, 498, 53] |
p02621 | u237634011 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nprint(a + a ** 2 + a *** 3)', 'a = int(input())\nprint(a + a ** 2 + a ** 3)\n'] | ['Runtime Error', 'Accepted'] | ['s818751905', 's381282520'] | [8796.0, 9100.0] | [21.0, 25.0] | [44, 44] |
p02621 | u243078991 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = int(input())\nn1 = int( "%s" % a )\nn2 = int( "%s%s" % (a,a) )\nn3 = int( "%s%s%s" % (a,a,a) )\nprint (n1+n2+n3)', 'a = int(input("Input an integer : "))\nn1 = int( "%s" % a )\nn2 = int( "%s%s" % (a,a) )\nn3 = int( "%s%s%s" % (a,a,a) )\nprint (n1+n2+n3', 'a = input()\nprint(pow(a,1)+pow(a,2)+pow(a,3))', 'a = int(input())\nn1 = int(pow(a,1))\nn2 = int(pow(a,2))\nn3 = int(pow(a,3))\nprint (n1+n2+n3)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s040969665', 's294124602', 's397859671', 's403795632'] | [9072.0, 8968.0, 9028.0, 9168.0] | [27.0, 23.0, 23.0, 33.0] | [112, 132, 45, 90] |
p02621 | u245120181 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a,b,c = (int(i) for i in input().split())\nN = list(map(int, input().split())) \nM = list(map(int, input().split())) \nn = 0\nm = 0\ne = 0\nfor i in range(a+b):\n if N[n] < M[m] and n < a:\n c -= N[n]\n e += 1\n print(c)\n n += 1\n elif N[n] > M[m] and m < a:\n c -= M[m]\n e += 1\n m += 1\n print(c)\n\n if c < 0:\n e -= 1\n break\n\nprint(e)', 'a = int(input())\nb = a + a**2 + a**3\nprint(b)'] | ['Runtime Error', 'Accepted'] | ['s821522993', 's418076974'] | [9116.0, 9020.0] | [32.0, 28.0] | [354, 45] |
p02621 | u250517969 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = input()\nprint (int(a+a^2+a^3))', 'a = int(input())\nprint (int(a+a**2+a**3))'] | ['Runtime Error', 'Accepted'] | ['s590869167', 's357208592'] | [9084.0, 9148.0] | [20.0, 29.0] | [34, 41] |
p02621 | u254961675 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['from typing import List\n\nLOCAL = False\n\nif LOCAL:\n import os\n import sys\n import time\n start = time.time()\n # For getting input from input.txt file\n letter = "A"\n sys.stdin = open(f\'{letter}in.txt\', \'r\')\n\n # Printing the Output to output.txt file\n sys.stdout = open(f\'{letter}out.txt\', \'w\')\n\n#### START ####\n\n\ndef calculate(s: int):\n print(s + s**2 + s**3)\n\ns = int(input())\n\n#### END ####\nif LOCAL:\n print(\'TIME:\', time.time()-start, \'sec.\')\n', 'def calculate(s: int):\n print(s + s**2 + s**3)\n\ns = int(input())\ncalculate(s)\n'] | ['Wrong Answer', 'Accepted'] | ['s708283176', 's698853407'] | [10120.0, 9136.0] | [39.0, 32.0] | [476, 81] |
p02621 | u259522160 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['a = input()\nprint(a+a**2+a**3)\n', 'a = int(input())\nprint(a+a**2+a**3)\n'] | ['Runtime Error', 'Accepted'] | ['s089517857', 's630273628'] | [8872.0, 8936.0] | [23.0, 25.0] | [31, 36] |
p02621 | u261700262 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ['N = int(input())\n\nprint(N + N ^ 2 + N ^ 3)\n', 'N = int(input())\n\nprint(N + N ** 2 + N ** 3)\n'] | ['Wrong Answer', 'Accepted'] | ['s034839729', 's064479756'] | [9136.0, 9136.0] | [28.0, 29.0] | [43, 45] |
p02621 | u266014018 | 2,000 | 1,048,576 | Given an integer a as input, print the value a + a^2 + a^3. | ["def main():\n import sys\n def input(): return sys.stdin.readline().rstrip()\n a = int(input())\n for i in range(3):\n ans += a**(i+1)\n print(ans)\n\n\nif __name__ == '__main__':\n main()", "def main():\n import sys\n def input(): return sys.stdin.readline().rstrip()\n a = int(input())\n ans = 0\n for i in range(3):\n ans += a**(i+1)\n print(ans)\n\n\nif __name__ == '__main__':\n main()"] | ['Runtime Error', 'Accepted'] | ['s770753051', 's767732197'] | [9160.0, 9164.0] | [26.0, 31.0] | [203, 215] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.