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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02631 | u207241407 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['def main():\n _ = int(input())\n a = tuple(map(int, input().split()))\n\n res = 0\n for i in a:\n res ^= i\n ans = [res ^ j for j in a]\n for k in ans:\n print(ans)\n\n\nif __name__ == "__main__":\n main()', 'def main():\n _ = int(input())\n a = tuple(map(int, input().split())... | ['Runtime Error', 'Accepted'] | ['s603301009', 's696988302'] | [158832.0, 31624.0] | [2378.0, 146.0] | [227, 211] |
p02631 | u216928054 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\nAS = list(map(int, input().split()))\nprint(*AS, sep=" ")\n', 'from functools import reduce\nfrom operator import xor\n\nN = int(input())\nAS = list(map(int, input().split()))\ntotal = reduce(xor, AS)\nprint(*[a ^ total for a in AS])\n'] | ['Wrong Answer', 'Accepted'] | ['s991608189', 's535065594'] | [31428.0, 31880.0] | [122.0, 149.0] | [74, 165] |
p02631 | u217732870 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\na = list(map(int, input().split()))\n\nb = [0 for i in range(n)]\n\nA = 0\n\nfor i in range(n):\n A = A ^ a[i]\n \nfor i in range(n):\n b[i] = A ^ a[i]\n\nprint(b)', "n = int(input())\na = list(map(int, input().split()))\n\nb = [0 for i in range(n)]\n\nA = 0\n\nfor i in range(n):\n A = A ^ a[i]\... | ['Wrong Answer', 'Accepted'] | ['s440313724', 's018915266'] | [31600.0, 41812.0] | [158.0, 175.0] | [171, 191] |
p02631 | u228303592 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\narr = list(map(int,input().split()))\nxors = 0\nfor val in arr:\n xors^=val\nans = []\nfor i in range(n):\n ans.append(xros^arr[i])\n \nprint(*ans)', 'n = int(input())\narr = list(map(int,input().split()))\nxors = 0\nfor val in arr:\n xors^=val\nans = []\nfor i in range(n):\n ans.append(xors^ar... | ['Runtime Error', 'Accepted'] | ['s297565959', 's600472859'] | [31448.0, 31588.0] | [92.0, 168.0] | [159, 160] |
p02631 | u241348301 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\nA = list(map(int, input().split()))\ncount = 0\nfor i in A:\n count ^= x\nfor i in range(len(A)):\n A[i] ^= count\n \n \n \nprint(*A)', 'N = int(input())\nA = list(map(int, input().split()))\ncount = 0\nfor i in A:\n count ^= i\nfor i in range(len(A)):\n A[i] ^= count\n \n ... | ['Runtime Error', 'Accepted'] | ['s379733800', 's347108023'] | [31512.0, 31668.0] | [72.0, 152.0] | [156, 151] |
p02631 | u271469978 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["N = int(input())\naaa = list(map(int, input().split()))\nbbb = list(aaa[i] ^ aaa[i+1] for i in range(N-1))\nans = [0] * N\nans[0] = 1\nfor i, b in enumerate(bbb):\n ans[i+1] = b ^ ans[i]\nprint(*ans,sep=' ')\n", 'N = int(input())\naaa = list(map(int, input().split()))\na_all = 0\nfor a in aaa:\n a_all ^= a\npri... | ['Wrong Answer', 'Accepted'] | ['s619759418', 's841188627'] | [35660.0, 31608.0] | [180.0, 147.0] | [204, 131] |
p02631 | u278057806 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['from sys import stdin\ninput = stdin.readline\n\nN = int(input())\na = list(map(int, input().split()))\n\nans = []\n\nfor i in range(N - 1):\n ans.append(a[i] ^ a[i + 1])\n\nans.append(a[0] ^ a[N - 1])\n\nprint(*ans)\n', 'from sys import stdin\ninput = stdin.readline\n\nN = int(input())\na = list(map(int, input().... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s059638760', 's377225230', 's411794002'] | [31408.0, 31424.0, 31440.0] | [163.0, 159.0, 178.0] | [207, 207, 215] |
p02631 | u296150111 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n=int(input())\na=list(map(int,input().split()))\np=0\nfor x in a:\n\tp^=x\nans=[]\nfor x in a:\n\tans.append(p^x)\nprint(ans)', 'n=int(input())\na=list(map(int,input().split()))\np=0\nfor x in a:\n\tp^=x\nans=[]\nfor x in a:\n\tans.append(p^x)\nprint(*ans)'] | ['Wrong Answer', 'Accepted'] | ['s214150694', 's463999579'] | [31612.0, 31752.0] | [136.0, 158.0] | [116, 117] |
p02631 | u306033313 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["n = int(input())\nlis = list(map(int, input().split()))\n\ns = 0\nfor i in lis:\n s = s^i\nlis = list(map(lambda x: str(-(-s^x)), lis))\nst = ' '.join(lis)\nprint(st)", "n = int(input())\nlis = list(map(int, input().split()))\n\ns = 0\nfor i in lis:\n s = s^i\nlis = list(map(lambda x: str(s^x), lis))\nst = ' '.... | ['Wrong Answer', 'Accepted'] | ['s088871030', 's734432343'] | [31404.0, 31612.0] | [153.0, 137.0] | [161, 157] |
p02631 | u307516601 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['import sys\nsys.setrecursionlimit(10**6)\n\nn = int(input())\na = list(map(int, input().split()))\n#n, m = map(int, input().split())\n#s = input()\n#s,t = input().split()\n#a = [int(input()) for _ in range(n)]\n#\n#readline = sys.stdin.readline\n\n#ab = [[int(i) for i in readline().split()] for _ in range(n)]\n\nsu =... | ['Runtime Error', 'Accepted'] | ['s247143352', 's397454447'] | [31428.0, 31652.0] | [145.0, 208.0] | [488, 489] |
p02631 | u314089899 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\nA_list = [int(e) for e in input().split()]\n\nall_A_xor = A_list[0]\n#print(A_list[0],bin(A_list[0]))\n\nfor i in range(1,N):\n #print(A_list[i],bin(A_list[i]))\n all_A_xor ^= A_list[i]\n\n#print(all_A_xor,bin(all_A_xor))\n\nans = [A^all_A_xor for A in A_list]\nprint(ans)', "N = int(input())\n... | ['Wrong Answer', 'Accepted'] | ['s999243572', 's378763137'] | [31552.0, 41788.0] | [139.0, 156.0] | [283, 303] |
p02631 | u317423698 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['import sys\nfrom collections import Counter\nreadline = sys.stdin.buffer.readline\n\nn = int(readline())\na = list(map(int, readline().split()))\n\nfor j in range(n):\n b = 0\n for i, v in enumerate(a):\n if i != j:\n b ^= v\n print(b)', "import sys\nfrom functools import reduce\nfrom operator import xor\n... | ['Time Limit Exceeded', 'Accepted'] | ['s559124172', 's137170168'] | [29412.0, 35960.0] | [2206.0, 135.0] | [234, 255] |
p02631 | u326278153 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\na_list = list(map(int, input().split()))\nall_xor = 0\nres = []\n\nfor a in a_list:\n all_xor ^= a\n\nfor a in a_list:\n res.append(a ^ all_xor)\n\nprint(res)\n', 'N = int(input())\na_list = list(map(int, input().split()))\nall_xor = 0\nres = []\n\nfor a in a_list:\n all_xor ^= a\n\nfor a i... | ['Wrong Answer', 'Accepted'] | ['s017367190', 's459454232'] | [31548.0, 31400.0] | [126.0, 162.0] | [172, 173] |
p02631 | u326775883 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\na = list(map(int, input().split()))\nx = 0\nfor i in range(1, n):\n x = x^a[i]\n \nl = [x]\nfor i in range(n-1):\n x = a[i]^a[i+1]\n l.append(l[i]^x)\nprint(l)\n\n', 'n = int(input())\na = list(map(int, input().split()))\nx = 0\nfor i in range(1, n):\n x = x^a[i]\n \nl = [x]\nfor i in range(n-... | ['Wrong Answer', 'Accepted'] | ['s200274295', 's603451519'] | [31724.0, 31636.0] | [173.0, 215.0] | [173, 174] |
p02631 | u327465093 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\nA = list(map(int, input().split()))\n\np = 0\nfor i in range(1, N):\n p ^= A[i]\nprint(p)\n\nans = [str(p)]\nfor i in range(1, N):\n t = A[i-1] ^ A[i]\n p = p ^ t\n ans.append(str(p))\nprint(" ".join(ans))\n', 'N = int(input())\nA = list(map(int, input().split()))\n\np = 0\nfor i in rang... | ['Wrong Answer', 'Accepted'] | ['s462846942', 's672758521'] | [35668.0, 35684.0] | [214.0, 212.0] | [223, 214] |
p02631 | u364774090 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["N = int(input())\nA = list(map(int, input().split()))\n\ns = 0\nfor a in A:\n\ts ^= a\n\tprint(s)\nans = []\n\nfor a in A:\n\tans += [str(a ^ s)]\nprint(' ' .join(ans))", "N = int(input())\nA = list(map(int, input().split()))\n\ns = 0\nfor a in A:\n\ts ^= a\nans = []\n\nfor a in A:\n\tans += [str(a ^ s)]\nprint(' ' .... | ['Wrong Answer', 'Accepted'] | ['s487132298', 's341236944'] | [35752.0, 35728.0] | [228.0, 169.0] | [154, 144] |
p02631 | u365838886 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\na = list(map(int, input().split()))\n\nb = [0]*N\n\nfor i in range(1,N):\n b[i] = b[i-1] ^ a[i-1] ^ a[i]\n\nprint(" ".join(map(str, b)))', 'N = int(input())\na = list(map(int, input().split()))\n\nb = [0]*N\n\nxorsum = 0\nfor i in range(1,N):\n b[i] = b[i-1] ^ a[i-1] ^ a[i]\n xorsum = xorsu... | ['Wrong Answer', 'Accepted'] | ['s244763930', 's772131654'] | [41028.0, 41652.0] | [161.0, 231.0] | [149, 265] |
p02631 | u369133448 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n=int(input())\na=list(map(int,input().split()))\nwk=0\nfor i in range(0,n,2):\n wk^=a[i]^a[i+1]\nans=[]\nfor i in range(n):\n ans.append(str(wk^a[i]))\nprint(" ".join(list(set(ans))))', 'n=int(input())\na=list(map(int,input().split()))\nwk=0\nfor i in range(0,n,2):\n wk^=a[i]^a[i+1]\nans=[]\nfor i in range(n):\n ... | ['Wrong Answer', 'Accepted'] | ['s271873444', 's113180101'] | [43860.0, 35812.0] | [240.0, 172.0] | [178, 167] |
p02631 | u377989038 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\na = list(map(int, input().split()))\n\nketa = len(bin(max(a))) - 2\ntmp = [0] * keta\nfor i in a:\n for j, k in enumerate(bin(i)[2:][::-1]):\n tmp[j] += int(k)\ntmp = tmp[::-1]\n\nans = [""] * n\nfor i in tmp:\n for j in range(n):\n if i > 0:\n ans[j] += "0"\n ... | ['Wrong Answer', 'Accepted'] | ['s529621098', 's545840934'] | [34916.0, 31592.0] | [2207.0, 165.0] | [417, 145] |
p02631 | u391157755 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n=int(input())\na_array=list(map(int,input().split()))\nnext_xor=[0 for _ in range(n-1)]\nfor i in range(n-1):\n next_xor[i]=a_array[i]^a_array[i+1]\nans=[2<<28]\nfor xo in next_xor:\n ans.append(ans[-1]^xo)\nprint(" ".join(map(str,ans)))', 'import math\n\nn=int(input())\na_array=list(map(int,input().split()))\... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s475423785', 's556366044', 's651509127'] | [48744.0, 59084.0, 33568.0] | [191.0, 295.0, 143.0] | [236, 485, 147] |
p02631 | u407702479 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N=int(input())\na=list(map(int,input().split()))\nS=0\nfor i in a:\n S^=i\nprint([i^S for i in a])', 'N=int(input())\na=list(map(int,input().split()))\nS=0\nfor i in a:\n S^=i\na=[S^i for i in a] \nprint(*a)'] | ['Wrong Answer', 'Accepted'] | ['s829989746', 's855061600'] | [31640.0, 31496.0] | [123.0, 143.0] | [94, 101] |
p02631 | u426572476 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["import sys\nimport heapq\nimport re\nfrom itertools import permutations\nfrom bisect import bisect_left, bisect_right\nfrom collections import Counter, deque\nfrom math import factorial, sqrt, ceil, gcd\nfrom functools import lru_cache, reduce\nfrom decimal import Decimal\nINF = 1 << 60\nMOD = 1000000007\nsys.setrecu... | ['Wrong Answer', 'Accepted'] | ['s298417288', 's149898616'] | [32776.0, 32624.0] | [150.0, 203.0] | [4068, 4190] |
p02631 | u432251613 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['def main():\n N = int(input())\n a = list(map(int, input().split()))\n \n ans = a\n for i in range(10):\n c0,c1 = 0,0\n for j in range(N):\n if (a[j]>>i)&1:\n c1+=1\n if c1%2==0:\n ans[j] += (a[j]>>i)*pow(2,i)\n else:\n ans[j] ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s068805515', 's950789725', 's604195066'] | [31452.0, 31336.0, 31432.0] | [330.0, 332.0, 151.0] | [412, 349, 266] |
p02631 | u441100668 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\nxor_arr = list(map(int, input().split()))\nxor_of_xor = 0\nfor elm in xor_arr:\n xor_of_xor = xor_of_xor ^ elm\nscarf_val = [xor_of_xor ^ elm for elm in xor_arr]\n\nprint(scarf_val)', ' n = int(input())\n xor_arr = list(map(int, input().split()))\n xor_of_xor = 0\n for elm in xor_arr:... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s705426505', 's854988296', 's876228269', 's364518515'] | [31512.0, 8876.0, 8928.0, 41668.0] | [119.0, 25.0, 31.0, 143.0] | [195, 254, 276, 230] |
p02631 | u442877951 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["N = int(input())\nA = list(map(int,input().split()))\n\nl = [0]*(2**max(A))\nll = []\nfor a in A:\n pattern = bin(a)[2:].zfill(N)\n for i in range(len(pattern)):\n if pattern[i] == '1':\n l[i] += 1\n\nfor a in A:\n ans = ''\n pattern = bin(a)[2:].zfill(N)\n for i in range(len(pattern)):\n if pattern[i... | ['Runtime Error', 'Accepted'] | ['s346910426', 's922532088'] | [244128.0, 31644.0] | [2214.0, 180.0] | [478, 143] |
p02631 | u455408345 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n=int(input(""))\na=[]\nans=[1]\nain=input("").split(" ")\nfor i in range(n):\n a+=[int(ain[i])]\ns=a[1]\nfor i in range(n-2):\n s^=a[i+2]\nans[0]=s\nfor i in range(n-1):\n s=s^a[i]\n s^=a[i+1]\n ans+=s\nprint(" ".join(ans))\n\n\n \n', 'n=int(input(""))\na=[]\nans=[1]\nain=input("").split(" ")\nfor ... | ['Runtime Error', 'Accepted'] | ['s490383562', 's949942553'] | [31436.0, 57456.0] | [130.0, 267.0] | [233, 278] |
p02631 | u476674874 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["from functools import reduce\ndef resolver(N, A):\n X = reduce(int.__xor__, A)\n ans = [X^a for a in A]\n \n return ans\n\ndef test():\n pass\n\ndef main():\n\n #test()\n\n N = int(input())\n A = list(map(int, input().split()))\n ans = resolver(N, A)\n\n print(ans)\n\n\n\nif __name__ == ... | ['Wrong Answer', 'Accepted'] | ['s939494207', 's238041743'] | [31704.0, 36084.0] | [111.0, 127.0] | [318, 338] |
p02631 | u485979475 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n=int(input())\nalist=list(map(int,input().split()))\n\nallh=alist[0]^alist[1]\nfor i in range(n-1):\n allh = allh ^ alist[i+2]\n\noutlist=[]\nfor a in alist:\n outlist.append(str(allh ^ a))\n outlist.append(" ")\noutlist.pop()\nprint("".join(outlist))\n', 'n=int(input())\nalist=list(map(int,input().split())... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s828318771', 's882370413', 's559229951'] | [31636.0, 37940.0, 37760.0] | [104.0, 189.0, 185.0] | [250, 250, 250] |
p02631 | u487594898 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['#!/usr/bin/env python3\nimport sys\nimport numpy as np\ninput = sys.stdin.readline\nn=int(input())\nA = list(map(int,input().split()))\nB = []\nans = A[0]\nfor i in range(1,n):\n ans = ans ^ A[i]\n\nfor i in range(n):\n B.append(ans ^ A[i])\nprint(B)\n ', '#!/usr/bin/env python3\nimport sys\nimport numpy as... | ['Wrong Answer', 'Accepted'] | ['s946421102', 's514376022'] | [48860.0, 58748.0] | [228.0, 256.0] | [249, 281] |
p02631 | u501451051 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\nlis = list(map(int, input().split()))\n\nt = lis[0]\nfor i in range(1, n):\n t ^= i\n\nans = [0] * n\nfor i , j in enumerate(lis):\n ans[i] = t ^ j\n\nprint(*ans)', 'n = int(input())\nlis = list(map(int, input().split()))\n\nt = lis[0]\nfor i in range(1, n):\n t ^= lis[i]\n\nans = [0] * n\n... | ['Wrong Answer', 'Accepted'] | ['s221349019', 's369310863'] | [31440.0, 31416.0] | [159.0, 173.0] | [175, 180] |
p02631 | u514118270 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['import sys\nimport math\nimport itertools\nimport bisect\nfrom copy import copy\nfrom collections import deque,Counter\nfrom decimal import Decimal\ndef s(): return input()\ndef i(): return int(input())\ndef S(): return input().split()\ndef I(): return map(int,input().split())\ndef L(): return list(input().split())\n... | ['Wrong Answer', 'Accepted'] | ['s248997248', 's275786761'] | [93960.0, 45264.0] | [2282.0, 1808.0] | [860, 843] |
p02631 | u520276780 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['import numpy as np\nn=int(input())\n*a,=map(int, input().split())\nx=0\nfor ai in a:\n x^=ai\n\nans=[ai^x for ai in ans]\nprint(*ans)', 'n=int(input())\n*a,=map(int, input().split())\nx=0\nfor ai in a:\n x^=ai\n\na=[ai^x for ai in a]\nprint(*a)'] | ['Runtime Error', 'Accepted'] | ['s072456596', 's375896698'] | [49436.0, 31760.0] | [173.0, 154.0] | [128, 103] |
p02631 | u556610039 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['num = int(input())\na_i = list(map(int, input().split()))\ns = 0\nfor x in a_i:\n s ^= x\nans = []\nfor x in a_i:\n ans.append(x ^ s)\nprint(ans)', "num = int(input())\na_i = list(map(int, input().split()))\ns = 0\nfor x in a_i:\n s ^= x\nans = []\nfor x in a_i:\n ans.append(x ^ s)\nprint(' '.join(map(str... | ['Wrong Answer', 'Accepted'] | ['s674176063', 's657757412'] | [31524.0, 41600.0] | [134.0, 155.0] | [143, 163] |
p02631 | u570155187 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['import numpy as np\n\nn = int(input())\na = list(map(int, input().split()))\n\nb = [0]*n\nfor i in range(n):\n b[i] = list(map(int, bin(a[i])[2:][::-1]))\n\nl = max(map(len, b))\nb_pad = list(map(lambda x: x + [0]*(l-len(x)), b))\n\nfor j in range(n):\n b_add = (np.sum(b_pad,axis=0) - np.array(b_pad[j])) % 2\n ans... | ['Time Limit Exceeded', 'Accepted'] | ['s208130756', 's297387293'] | [227960.0, 31444.0] | [2210.0, 179.0] | [379, 160] |
p02631 | u582759840 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["import copy\n\n\nn = int(input())\nlst = list(map(int,input().split(' ')))\n\nfor i in range(n):\n l = copy.deepcopy(lst)\n del l[i]\n buf = 0\n for ll in l:\n buf ^= ll\n print(buf)", "n = int(input())\nlst = list(map(int,input().split(' ')))\n\nx = 0\nfor l in lst:\n x ^= l\nout = ''\nfor l... | ['Time Limit Exceeded', 'Accepted'] | ['s048404340', 's913734041'] | [31732.0, 31408.0] | [2206.0, 174.0] | [192, 152] |
p02631 | u589969467 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\na = list(map(int,input().split()))\nans = []\ntmp = a[0]\nfor i in range(1,n):\n tmp = tmp^a[i]\nfor i in range(n):\n ans.append(tmp^a[i])\nprint(ans)', "n = int(input())\na = list(map(int,input().split()))\nans = []\ntmp = a[0]\nfor i in range(1,n):\n tmp = tmp^a[i]\nans = ''\nfor i in ran... | ['Wrong Answer', 'Accepted'] | ['s294843286', 's600759706'] | [31756.0, 31444.0] | [146.0, 194.0] | [166, 189] |
p02631 | u598296382 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["N = int(input())\na = list(map(int,input().split()))\n#xor_a = [bin(x) for x in a]\n#print(xor_a)\nb = [sum(a) ^ a[x] for x in range(N)]\n\nprint(' '.join(map(str, b))) ", "N = int(input())\na = list(map(int, input().split()))\nb = [sum(a) ^ a[x] for x in range(N)]\nprint(' '.join(map(str, b)))", '#N = int(input())\n... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s605384390', 's706436466', 's871503608', 's256775279'] | [31744.0, 31564.0, 9000.0, 41804.0] | [2206.0, 2206.0, 30.0, 140.0] | [283, 119, 170, 320] |
p02631 | u608755339 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\nA = [int(i) for i in input().split()]\n \nO = [0] * N\n\nfor i in range(N):\n for j in range(N):\n if i == j:\n continue\n O[i] ^= A[j]\n\nprint(O)', 'N = int(input())\nA = [int(i) for i in input().split()]\n \nO = [0] * 4\n\nfor i in range(N):\n for j in range(N):\n if i == j:\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s396476557', 's814836283', 's789471973'] | [31540.0, 31528.0, 41860.0] | [2206.0, 214.0, 173.0] | [167, 167, 173] |
p02631 | u618251217 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["N = int(input())\nA = list(map(int, input().split()))\n\nlis = []\nfor a in A:\n stra = str(a)\n S = '0b'\n i = 0\n for s in stra:\n s = 0 | (a >> i)\n if i%2 == 0:\n S = s + S\n else:\n if s == '0':\n S = '1' + S\n else:\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s319030672', 's527932469', 's228862636'] | [31440.0, 31736.0, 31668.0] | [77.0, 2133.0, 178.0] | [363, 321, 151] |
p02631 | u647796955 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["import sys\nN = int(sys.stdin.readline().rstrip())\nA = list(map(int, sys.stdin.readline().rstrip().split()))\nS= 0\nfor n in range(N):\n S = S^A[n]\n print(S)\n \nans = ''\nfor n in range(N):\n m = S^A[n]\n ans += str(m) + ' '\n\nprint(ans)", "import sys\nN = int(sys.stdin.readline().rstrip())\nA = list(map(int... | ['Wrong Answer', 'Accepted'] | ['s290904496', 's707389583'] | [31444.0, 31448.0] | [265.0, 204.0] | [233, 227] |
p02631 | u678505520 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n=int(input())\nA=list(map(int,input().split()))\nA.append(A[0])\nB=[]\nC=[]\n\ndef xor(C):\n total=0\n for i in range(1,len(C)):\n total^=C[i]\n return total\n\nfor i in range(n):\n B.append(A[i]^A[i+1])\n\nfor i in range(1,100000):\n C.append(i)\n p=i\n for j in range(n-1):\n C.append(B[j]^p)\n p^=B... | ['Wrong Answer', 'Accepted'] | ['s436709635', 's858157912'] | [32316.0, 43932.0] | [2206.0, 163.0] | [362, 248] |
p02631 | u693173434 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n=int(input())\na=list(map(int,input().split()))\n\nfor i in range(n-1):\n c=a[i]^a[i+1]\n\nans=[0]*n\nfor i in range(n):\n ans[i]=c^a[i]\nL=[str(a) for a in ans]\nL=" ".join(L)\nprint(L)\n', 'n=int(input())\na=list(map(int,input().split()))\n\nc=a[0]\nfor i in range(n-1):\n c=c^a[i+1]\n\nans=[0]*n\nfor i in... | ['Wrong Answer', 'Accepted'] | ['s707956885', 's655652202'] | [41800.0, 41672.0] | [190.0, 180.0] | [183, 187] |
p02631 | u708255304 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\nA = list(map(int, input().split()))\nsum_of_A = sum(A)\nans = []\nfor a in A:\n ans.append((sum_of_A-a)^a)\nprint(" ".join(map(str, ans)))\n', 'N = int(input())\nA = list(map(int, input().split()))\nsum_of_A = sum(A)\nans = []\nfor a in A:\n ans.append(sum_of_A^a)\nprint(" ".join(map(str, ans)... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s949782385', 's997951693', 's688703502'] | [42540.0, 42708.0, 41644.0] | [162.0, 147.0, 155.0] | [154, 150, 184] |
p02631 | u731603651 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\na = sorted(list(map(int, input().split())))\nx = 0\nfor i in a:\n x ^= i\nfor i in range(n):\n a[i] ^= x\nprint(*a)', 'n = int(input())\na = list(map(int, input().split()))\nx = 0\nfor i in a:\n x ^= i\nfor i in range(n):\n a[i] ^= x\nprint(*a)'] | ['Wrong Answer', 'Accepted'] | ['s780067279', 's110700801'] | [31456.0, 31356.0] | [207.0, 158.0] | [132, 124] |
p02631 | u747703115 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\nA = list(map(int, input().split()))\nans = list()\nfor i in range(n-2):\n for j in range(i+1, n-1):\n for k in range(j+1, n):\n ans.append(A[i]^A[j]^A[k])\nprint(*ans)', 'n = int(input())\nA = list(map(int, input().split()))\nbase = 0\nfor a in A:\n base = base ^ a\nans = [ba... | ['Wrong Answer', 'Accepted'] | ['s862895445', 's792242358'] | [400816.0, 31608.0] | [2222.0, 150.0] | [199, 131] |
p02631 | u749359783 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\na = [int(i) for i in input().split()]\n\nnow = 1\nprint(now)\n\nfor i in range(N-1):\n A = a[i]^a[i+1]\n now = A^now\n print(now)', 'N = int(input())\na = [int(i) for i in input().split()]\n\nall_a = 0\nfor i in range(N):\n all_a = all_a^a[i]\n\nans = []\nfor i in range(N):\n ans.appe... | ['Wrong Answer', 'Accepted'] | ['s193296200', 's254705236'] | [31432.0, 31560.0] | [188.0, 180.0] | [147, 175] |
p02631 | u750770975 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\na = input().split(" ")\n\ns = a[0]\n\nfor num in a[1:]:\n\ts^=num\n\nans = [0]*n\n\nfor i, num in enumerate(a):\n\tans[i] = s^num\n\nprint(*ans)\n', 'n = int(input())\na = input().split(" ")\n\ns = a[0]\n\nfor num in a[1:]:\n\ts ^= num\n\nans = [0]*n\n\nfor i, num in enumerate(a):\n\tans[i] = s^num\... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s678420890', 's725314358', 's944408017'] | [25184.0, 25272.0, 40912.0] | [50.0, 48.0, 168.0] | [148, 149, 175] |
p02631 | u756609156 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\naa = map(int,input().split())\nx = 0\nfor a in aa:\n x^=a\nprint(" ".join(str(x^a) for a in aa ))', 'n = int(input())\naa = list(map(int,input().split()))\nx = 0\nfor a in aa:\n x^=a\nprint(" ".join([str(x^a) for a in aa ]))'] | ['Wrong Answer', 'Accepted'] | ['s054937401', 's416940800'] | [25152.0, 33500.0] | [85.0, 134.0] | [111, 119] |
p02631 | u764956288 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['# import sys\n# readline = sys.stdin.readline\n# generator = (readline().strip() for _ in range(N))\n\n# N, M = map(int, input().split())\n# As = list(map(int, input().split()))\n# queries = (input() for _ in range(N))\n\n\ndef solve():\n N = int(input())\n As = list(map(int, input().split()))\n\n digits = d... | ['Wrong Answer', 'Accepted'] | ['s981227415', 's519265509'] | [31444.0, 31444.0] | [865.0, 893.0] | [721, 659] |
p02631 | u768256617 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["import sys\nsys.setrecursionlimit(10**9)\n\ndef mi(): return map(int,input().split())\ndef lmi(): return list(map(int,input().split()))\ndef ii(): return int(input())\ndef isp(): return input().split()\n\n\n\nn=ii()\na=lmi()\nS=0\nfor i in a:\n S=S^i\n\nb=[]\nfor i in a:\n a_=S^i\n b.append(a_)\n\n print(' '.join... | ['Runtime Error', 'Accepted'] | ['s778501228', 's503032222'] | [148184.0, 41788.0] | [2252.0, 151.0] | [310, 148] |
p02631 | u804800128 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int( input() )\na = list( map(int, input().split()) )\nx = 0\nfor i in a:\n x ^= i\nprint( * list( map( lamda y: x^y , a ) ) )', 'n = int( input() )\na = list( map(int, input().split()) )\nx = 0\nfor i in a:\n x ^= i\nprint( * list( map( lambda y: x^y , a ) ) )'] | ['Runtime Error', 'Accepted'] | ['s245303990', 's152744813'] | [8996.0, 31312.0] | [28.0, 160.0] | [128, 129] |
p02631 | u806325134 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ["n = int(input())\na = list(map(int, input().split()))\n\nm = max(a)\nans = [0] * n\nz = 1\nwhile True:\n b = False\n for i in range(n):\n if a[i] & z:\n b = not b\n for i in range(n):\n if b:\n if a[i] & z:\n ans[i] |= z\n else:\n if not (a[i] & z):\n ans[i] |= z\n\n z <<= 1\... | ['Wrong Answer', 'Accepted'] | ['s862789789', 's345200746'] | [41480.0, 41808.0] | [1791.0, 1762.0] | [361, 364] |
p02631 | u809714729 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\nA = map(int, input().split())\ntotal = 0\nfor a in A:\n total ^= a\nresult = []\nfor a in A:\n result.append(total ^ a)\nprint(*result)', 'N = int(input())\nA = map(int, input().split())\ntotal = 0\nfor a in A:\n total ^= a\nresult = []\nfor a in A:\n result.append(total ^ a)\nprint(result)', 'N... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s111897718', 's481618938', 's432530458'] | [24972.0, 24996.0, 31548.0] | [84.0, 81.0, 160.0] | [147, 146, 153] |
p02631 | u843135954 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['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()\na = na()\n\nprint(*a)', 'import sys\nstdin = sys.stdin\nsys.setrecursionlimit(10*... | ['Wrong Answer', 'Accepted'] | ['s892541313', 's506398153'] | [31256.0, 31296.0] | [124.0, 156.0] | [247, 310] |
p02631 | u845573105 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\na = list(map(int, input().split()))\nans = [0]\nfor i in range(N-1):\n ans.append(ans[-1]^a[i]^a[i+1])\nprint(" ".join(map(str,ans)))', 'N = int(input())\nA = list(map(int, input().split()))\n \nXOR = 0\nfor a in A:\n XOR ^= a\nfor i in range(N):\n A[i] = A[i]^XOR\nprint(*A)'] | ['Wrong Answer', 'Accepted'] | ['s205492144', 's954009498'] | [40688.0, 31560.0] | [171.0, 156.0] | [147, 132] |
p02631 | u860038009 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['import numpy as np\n\nN = int(input())\na = np.fromstring(input(), sep=" ", dtype=np.int64)\n# b = np.bitwise_xor.reduce(a)\n# c = np.bitwise_xor(a, b)\n# print(*c, sep=" ")\nfor n in range(N):\n print(np.bitwise_xor.reduce(a) ^ a[n])\n', 'import numpy as np\n\nN = int(input())\na = np.fromstring(input(), sep=" ",... | ['Time Limit Exceeded', 'Time Limit Exceeded', 'Wrong Answer', 'Accepted'] | ['s231998094', 's536725292', 's684369907', 's822116426'] | [30800.0, 31080.0, 39952.0, 40160.0] | [2206.0, 2206.0, 251.0, 252.0] | [230, 151, 162, 162] |
p02631 | u871841829 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\nA = list(map(int, input().split()))\nA = A + A\nans = [0] * N\na = 0\nfor i in range(N-1):\n a ^= A[i]\nans[N-1] = a\nW = N - 1\nfor i in range(N-1):\n remove = A[i]\n addition = A[i+W]\n a = remove^a^addition\n ans[i] = a\n\nprint(" ".join([str(i) for i in ans))\n', 'N = int(input())... | ['Runtime Error', 'Accepted'] | ['s960114329', 's850292506'] | [9004.0, 43504.0] | [24.0, 204.0] | [282, 283] |
p02631 | u876438858 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['import sys\n\ninput = sys.stdin.readline\n\n\ndef S():\n return input().rstrip()\n\n\ndef I():\n return int(input())\n\n\ndef MI():\n return map(int, input().split())\n\n\nn = I()\nA = list(MI())\n\ns = 0\nfor a in A:\n s ^= a\n\nans = []\nfor a in A:\n ans.append(str(s ^ a))\n\nprint(" ".join(ans[::-1... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s445733044', 's896255467', 's803368663'] | [36764.0, 36484.0, 32536.0] | [176.0, 163.0, 204.0] | [294, 297, 279] |
p02631 | u902544771 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\nA = list(map(int, input().split()))\n\nxor = 0\nfor a in A:\n xor ^= a\nresult = []\nfor a in A:\n result.append(xor ^ a)\nprint(result)', "n = int(input())\nA = list(map(int, input().split()))\n\nxor = 0\nfor a in A:\n xor ^= a\nresult = []\nfor a in A:\n result.append(str(xor ^ a))\npr... | ['Wrong Answer', 'Accepted'] | ['s135823620', 's308772580'] | [31600.0, 35764.0] | [130.0, 151.0] | [151, 166] |
p02631 | u945200821 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['import sys\nfrom typing import Callable, List, NoReturn\n\nimport numpy as np\n\n\ndef main() -> NoReturn:\n readline: Callable[[], str] = sys.stdin.readline\n n: int = int(readline().rstrip())\n a: np.ndarray = np.array(tuple(int(_) for _ in readline().rstrip().split()))\n\n xor_all: int = 0\n for a_n... | ['Runtime Error', 'Accepted'] | ['s108550060', 's770350054'] | [49572.0, 49704.0] | [226.0, 345.0] | [445, 469] |
p02631 | u952656646 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['N = int(input())\nA = map(int, input().split())\nax = 0\nans = []\nfor a in A:\n ax ^= a\nfor a in A:\n ans.append(a^ax)\n \nprint(" ".join(map(str,ans)))', 'N = int(input())\nA = list(map(int, input().split()))\nb = 0\nfor a in A:\n b ^= a\nans = []\nfor a in A:\n ans.append(str(a^b))\nprint(" ".join(ans))'... | ['Wrong Answer', 'Accepted'] | ['s314167368', 's360374819'] | [25092.0, 35596.0] | [84.0, 154.0] | [148, 148] |
p02631 | u962718741 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['#!/usr/bin/env python3\n\ndef main():\n n = int(input())\n a = list(map(int, input().split()))\n ans = [None] * n\n for i in range(n - 1):\n allxor = a[i] ^ a[i + 1]\n for i in range(n):\n ans[i] = allxor ^ a[i]\n print(*ans)\n\n\nif __name__ == "__main__":\n main()\n', '#!/usr/bin/... | ['Wrong Answer', 'Accepted'] | ['s752661586', 's477734445'] | [31556.0, 31388.0] | [157.0, 158.0] | [288, 289] |
p02631 | u970082363 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['n = int(input())\nlist = [int(i) for i in input().split()]\ntotal = 0\nans = []\nfor i in range(n):\n total = total ^ list[i]\n\nprint(total)\nfor j in range(n):\n ans.append(str(total^list[j]))\nprint(" ".join(ans))\n', 'n = int(input())\nlist = [int(i) for i in input().split()]\ntotal = 0\nans = []\nfor i in ... | ['Wrong Answer', 'Accepted'] | ['s513898468', 's007034504'] | [35748.0, 35808.0] | [185.0, 188.0] | [213, 200] |
p02631 | u987164499 | 2,000 | 1,048,576 | There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**. Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written. Recently, they learned the operation called xor (exclusive OR). What is xor? For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x... | ['import numpy as np\n\nn = int(input())\na = list(map(int,input().split()))\na = np.array(a,dtype=np.int64)\nb = [((a>>i)&1).sum() for i in range(21)]\nli = []\nfor i in a:\n c = np.array([((i>>j)&1) for j in range(21)],dtype=np.int64)\n d = b-c\n point = 0\n for i in range(31):\n if d[i]%2 == 1:\n ... | ['Runtime Error', 'Accepted'] | ['s005825253', 's241475661'] | [49776.0, 50152.0] | [194.0, 271.0] | [364, 159] |
p02632 | u153094838 | 2,000 | 1,048,576 | How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"? The answer can be enormous, so print it modulo (10^9+7). | ['# -*- coding: utf-8 -*-\n"""\nCreated on Wed Jun 24 20:53:22 2020\n\n@author: NEC-PCuser\n"""\n\nif __name__ == \'__main__\':\n K = int(input())\n n = len(input())\n mod = 10**9+7 \n #25 25 a 25 25 25 b 25 25 c 26 26\n cmb = 1\n ans = 0\n for i in range(0, K + 1):\n print(cmb)\n a... | ['Wrong Answer', 'Accepted'] | ['s649482555', 's490918147'] | [10828.0, 10940.0] | [2212.0, 1990.0] | [496, 311] |
p02632 | u221301671 | 2,000 | 1,048,576 | How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"? The answer can be enormous, so print it modulo (10^9+7). | ['k = int(input())\n\n\ns = int(input())\n\nmod = 10 ** 9 + 7\nn = k + s\n\n\ndef _fac_inv(_n, _mod):\n _fac = [1] * (_n + 1)\n _inv = [1] * (_n + 1)\n for i in range(_n):\n _fac[i + 1] = _fac[i] * (i + 1) % _mod\n _inv[_n] = pow(_fac[_n], _mod - 2, _mod)\n for i in range(_n, 0, -1):\n _inv... | ['Runtime Error', 'Accepted'] | ['s008950088', 's178857336'] | [11028.0, 248332.0] | [31.0, 1966.0] | [650, 629] |
p02632 | u260036763 | 2,000 | 1,048,576 | How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"? The answer can be enormous, so print it modulo (10^9+7). | ['def cmb(n, r, mod):\n if ( r<0 or r>n ):\n return 0\n r = min(r, n-r)\n return g1[n] * g2[r] * g2[n-r] % mod\n\nmod = 10**9+7 \nN = 10**4\ng1 = [1, 1] \ng2 = [1, 1] \ninverse = [0, 1] 計算用テーブル\n\nfor i in range( 2, N + 1 ):\n g1.append( ( g1[-1] * i ) % mod )\n inverse.append( ( -inverse[mod % i]... | ['Runtime Error', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Wrong Answer', 'Time Limit Exceeded', 'Runtime Error', 'Runtime Error', 'Time Limit Exceeded', 'Accepted'] | ['s138856542', 's240537737', 's279256603', 's324200150', 's467840467', 's684531628', 's692449815', 's830952097', 's231709538'] | [13156.0, 131224.0, 296672.0, 10924.0, 131720.0, 131808.0, 129536.0, 131184.0, 10892.0] | [2206.0, 2210.0, 2216.0, 1708.0, 2209.0, 2209.0, 2210.0, 2211.0, 1956.0] | [603, 627, 603, 259, 607, 603, 629, 615, 257] |
p02632 | u347640436 | 2,000 | 1,048,576 | How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"? The answer can be enormous, so print it modulo (10^9+7). | ['\ndef main():\n from builtins import pow\n\n K = int(input())\n S = input()\n\n m = 1000000007\n\n result = 0\n t = pow(26, K, m)\n u = pow(26, m - 2, m) * 25 % m\n l = len(S)\n for i in range(K + 1):\n \n result += t\n result %= m\n t *= u\n t %= m\n ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s316208656', 's590836708', 's785149656', 's965076394', 's122109231'] | [9024.0, 10964.0, 8964.0, 11004.0, 10896.0] | [25.0, 2062.0, 31.0, 2206.0, 1880.0] | [498, 316, 432, 541, 316] |
p02632 | u392319141 | 2,000 | 1,048,576 | How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"? The answer can be enormous, so print it modulo (10^9+7). | ['class Combination:\n def __init__(self, size, MOD):\n self.MOD = MOD\n self.size = size + 2\n\n f = 1\n self.fact = fact = [f]\n for i in range(1, size+1):\n f = f * i % MOD\n fact.append(f)\n f = pow(f, MOD-2, MOD)\n self.factInv = factInv = [... | ['Wrong Answer', 'Accepted'] | ['s320822772', 's883720967'] | [168868.0, 169824.0] | [1522.0, 1914.0] | [1157, 1101] |
p02632 | u638456847 | 2,000 | 1,048,576 | How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"? The answer can be enormous, so print it modulo (10^9+7). | ['import sys\nread = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\n\nMOD = 10**9+7\n\nfac = [1, 1] \nf_inv = [1, 1] \ninv = [0, 1] 計算用テーブル\n\ndef prepare(n, mod):\n for i in range(2, n+1):\n fac.append((fac[-1] * i) % mod)\n inv.append((-inv[mod % i] * (mod//... | ['Time Limit Exceeded', 'Accepted'] | ['s913830968', 's220920766'] | [247524.0, 168080.0] | [2212.0, 1725.0] | [884, 957] |
p02632 | u726285999 | 2,000 | 1,048,576 | How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"? The answer can be enormous, so print it modulo (10^9+7). | ["import sys\n\nK = int(sys.stdin.readline())\nS = sys.stdin.readline().rstrip('\\n')\n\n# ## COMBINATION (MOD) ###\nN_MAX = 10**6 \nMOD = 10**9 + 7\n\ninv = [0] * (N_MAX + 2)\ninv[0] = 0 \ninv[1] = 1\n\nfor i in range(2, N_MAX + 2):\n q, r = divmod(MOD, i)\n inv[i] = -inv[r] * q % MOD\n\n\n\nans = 0\n\nln = le... | ['Runtime Error', 'Wrong Answer', 'Time Limit Exceeded', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s183226531', 's193881362', 's204907233', 's369359116', 's524131726', 's364713326'] | [49400.0, 49500.0, 247388.0, 128684.0, 51196.0, 49396.0] | [616.0, 1200.0, 2214.0, 2209.0, 1344.0, 1152.0] | [642, 715, 908, 905, 644, 609] |
p02632 | u811176339 | 2,000 | 1,048,576 | How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"? The answer can be enormous, so print it modulo (10^9+7). | ['def calc_inv(n, mod_n):\n inv_li = [0] * (n + 2)\n inv_li[0] = 0\n inv_li[1] = 1\n for i in range(2, n + 2):\n q, r = divmod(mod_n, i)\n inv_li[i] = -inv_li[r] * q % mod_n\n return inv_li\n\n\nMOD = 10**9 + 7\ninv = calc_inv(max(K, 26) + 10, MOD)\n\nK = int(input())\nS = input()\ns_len = ... | ['Runtime Error', 'Accepted'] | ['s676040294', 's852982562'] | [9064.0, 49496.0] | [29.0, 1026.0] | [469, 468] |
p02633 | u007074599 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['n = int(input())\nc=360/n\nprint(c)', 'x=input()\nprint(360/x)', 'n = int(input())\nc=180-n\nk=1\nwhile(1):\n if c*k%180==0:\n print(k)\n break\n else:\n k+=1', 'n = int(input())\nimport numpy as np\nx=0\ny=0\nrad=0\nk=1\nwhile(1):\n y+=np.cos(rad*np.pi/180)\n x+=np.sin(rad*np.pi/180)\n if x<0.0001 and ... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s252475516', 's395479305', 's603629739', 's943110579'] | [9144.0, 9076.0, 9056.0, 27200.0] | [30.0, 22.0, 29.0, 124.0] | [33, 22, 95, 196] |
p02633 | u018679195 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['def times(X):\n if X == int(X):\n if 1<= X <= 179:\n K = 360/X\n if int(K) < K :\n K = int(K) + 1\n print(K)\n else:\n print(int(K))', ' if X == int(X):\n if 1<= X <= 179:\n K = 360/X\n if int(K) < ... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s313188213', 's556077961', 's739789734', 's686902917'] | [9088.0, 8796.0, 8952.0, 9100.0] | [25.0, 22.0, 24.0, 28.0] | [212, 225, 166, 315] |
p02633 | u023229441 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['n=int(input())\nfor i in range(1,361):\n if n**i%360==0:\n print(i)\n ', 'n=int(input())\n\nfor i in range(1,361):\n if (n*i)%360==0:\n print(i);exit()'] | ['Wrong Answer', 'Accepted'] | ['s600896202', 's390396983'] | [9084.0, 9076.0] | [32.0, 30.0] | [73, 77] |
p02633 | u033642300 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['def main():\n X = int(input())\n print(360/X)\nmain() ', 'def main():\n X = int(input())\n i = 1\n while True:\n if i * X % 360 == 0:\n print(i)\n break\n i += 1\nmain() '] | ['Wrong Answer', 'Accepted'] | ['s721562491', 's184722499'] | [9048.0, 9156.0] | [30.0, 27.0] | [58, 150] |
p02633 | u054825571 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['a=360/n\nb=a-360//n\nprint(int(n*360/math.gcd(n,360)/n))', 'import math\nprint(360//math.gcd(int(input()),360))'] | ['Runtime Error', 'Accepted'] | ['s123636343', 's468889748'] | [8992.0, 9072.0] | [23.0, 27.0] | [54, 50] |
p02633 | u060012100 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['x = int(input())\nprint(360/x)\n', 'from math import gcd\ns = int(input())\nprint(360//gcd(360,s))'] | ['Wrong Answer', 'Accepted'] | ['s188210282', 's312437088'] | [9068.0, 9028.0] | [25.0, 31.0] | [30, 60] |
p02633 | u066494348 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['n=int(input())\nprint(int(360/math.gcd(n,360)))', 'n=int(input())\nprint(int(360/math.gcd(n,360)))', 'n=int(input())\nprint(360/n)', 'import math\nn=int(input())\nprint(int(360/math.gcd(n,360)))'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s242336333', 's546230547', 's569931460', 's001403360'] | [9068.0, 9060.0, 9048.0, 9140.0] | [24.0, 27.0, 27.0, 29.0] | [46, 46, 27, 58] |
p02633 | u067694718 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['print(360 // input())', 'i = 1\nx = int(input())\nwhile True:\n if (360 * i) % x == 0:\n print(360 * i // x)\n break\n i += 1\n'] | ['Runtime Error', 'Accepted'] | ['s685860635', 's048077157'] | [9140.0, 9148.0] | [25.0, 26.0] | [21, 103] |
p02633 | u083031094 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['max_test = 100000\nfor i in range(max_test):\n if i * X % 360 == 0:\n break\n\nreturn I+1', 'X= int(input())\nmax_test = 100000\nfor i in range(1,max_test):\n if i * X % 360 == 0:\n break\n\nprint(i)'] | ['Runtime Error', 'Accepted'] | ['s984174766', 's990994886'] | [8996.0, 9144.0] | [21.0, 34.0] | [88, 104] |
p02633 | u112629957 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['from math import gcd\nN = int(input())\nprint(N // gcd(360, N))', 'from math import gcd\nX = int(input())\nprint(360 // gcd(360, X))'] | ['Wrong Answer', 'Accepted'] | ['s746925045', 's373644013'] | [9040.0, 9036.0] | [30.0, 29.0] | [61, 63] |
p02633 | u130900604 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['45tokabaguruna', 'import math\nn=int(input())\nmi=1/100000000\nx=1\ny=0\npi=math.pi\ncnt=1\nwhile abs(x)>mi or abs(y)>mi:\n x+=math.cos(cnt*n*pi/180)\n y+=math.sin(cnt*n*pi/180)\n cnt+=1\nprint(cnt)\n'] | ['Runtime Error', 'Accepted'] | ['s214163636', 's009234401'] | [8940.0, 9552.0] | [33.0, 32.0] | [14, 173] |
p02633 | u132892633 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['x = int(input())\na = 1\nwhile True:\n if x % 360 == 0:\n print(a)\n quit()\n x = x * a\n a += 1\n ', '#!/usr/bin/env python3\nfrom math import gcd\nn = int(input())\nprint(360//gcd(360, n))\n'] | ['Wrong Answer', 'Accepted'] | ['s187443636', 's213686240'] | [9148.0, 9084.0] | [28.0, 29.0] | [117, 85] |
p02633 | u139441419 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['x=int(input())\n\nprint(360/x)', 'x=int(input())\ni=1\n\nwhile (x*i)%180!=0:\n i=i+1\n\nprint(i)', 'x=int(input())\ni=1\n\nwhile (x*i)%360!=0:\n i=i+1\n\nprint(i)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s680659797', 's735667155', 's372848759'] | [9148.0, 9152.0, 9064.0] | [28.0, 33.0, 26.0] | [28, 57, 57] |
p02633 | u163320134 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['x=int(input())\nfor i in range(1,361):\n if (i*x)%360==0:\n print(i)', 'x=int(input())\nfor i in range(1,361):\n if (i*x)%360==0:\n print(i)\n break'] | ['Wrong Answer', 'Accepted'] | ['s730354187', 's770627013'] | [9164.0, 9096.0] | [32.0, 27.0] | [69, 79] |
p02633 | u164953285 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['import math\n\nk = 1\nx = float(input())\nwhile x*k%360 == 0:\n k += 1\t\nprint(k)\n', 'import math\n\nx = float(input())\n\nif 360%x == 0:\n print(math.floor(k))\nelse:\n print(math.ceil(k))', 'import math\n \nk = 1\nx = float(input())\nwhile x*k%360 != 0:\n k += 1\t\nprint(k)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s015027701', 's632956999', 's058936362'] | [8940.0, 9032.0, 8992.0] | [27.0, 23.0, 26.0] | [78, 98, 78] |
p02633 | u182166469 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['x=int(input())\ni=0\nwhile True:\n 360*i%x!=0\n i+=1\n if 360*i%x==0:\n break\nk=360*i/x\nprint(k)\n', 'x=int(input())\ni=0\nwhile True:\n 360*i%x!=0\n i+=1\n if 360*i%x==0:\n break\nk=360*i/x\nprint(int(k))\n'] | ['Wrong Answer', 'Accepted'] | ['s604801332', 's237376885'] | [9156.0, 8928.0] | [26.0, 27.0] | [97, 102] |
p02633 | u208882647 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['n=int(input())\n#n*k1=(360)*k2\n#(k1/k2)=(360/n)\nk=1\nwhile((k*n)%360!=0):\n k+=1\n print(k)', 'n=int(input())\nk=1\nwhile((k*n)%360!=0):\n k+=1\nprint(k)\n#We can now regard Takahashi’s move as movingXdegrees on the circle,\n#so the answer is the minimumksuch thatkXis a multiple of 360'] | ['Wrong Answer', 'Accepted'] | ['s334450939', 's753580441'] | [8868.0, 9160.0] | [27.0, 27.0] | [89, 188] |
p02633 | u212328220 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['x = int(input())\n\ndef lcm(x, y):\n return (x * y) // math.gcd(x, y)\n\nprint(lcm(x, 360)//x)', 'import math\nx = int(input())\n\ndef lcm(x, y):\n return (x * y) // math.gcd(x, y)\n\nprint(lcm(x, 360)//x)\n'] | ['Runtime Error', 'Accepted'] | ['s227037378', 's161182881'] | [9036.0, 8968.0] | [27.0, 28.0] | [92, 105] |
p02633 | u216928054 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['import math\nX = 1\nt = 360 - (180 - X)\ng = math.gcd(t, 360)\nprint(360 * t // g // t)\n', 'X = int(input())\nret = 0\ncur = 0\nwhile True:\n ret += 1\n cur += X\n if cur % 360 == 0:\n print(ret)\n break\n'] | ['Wrong Answer', 'Accepted'] | ['s195829807', 's439916768'] | [9020.0, 9156.0] | [29.0, 27.0] | [84, 127] |
p02633 | u227085629 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['x = int(input())\nfor i in range(1,1000):\n if (360*i)%x == 0:\n print((360*i)//x)', 'x = int(input())\nfor i in range(1,1000):\n if (360*i)%x == 0:\n print((360*i)//x)\n exit()'] | ['Wrong Answer', 'Accepted'] | ['s121475615', 's010145840'] | [9156.0, 9140.0] | [26.0, 26.0] | [83, 94] |
p02633 | u232652798 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['X = int(input())\n\nprint(360/X)', 'X = int(input())\n\nfor i in range(1,361):\n if (i*X) % 360 == 0:\n print(i)\n break\n'] | ['Wrong Answer', 'Accepted'] | ['s054472515', 's972985265'] | [9104.0, 9064.0] | [27.0, 27.0] | [30, 97] |
p02633 | u243572357 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['x = int(input())\nprint((360 -1 // x) + 1)\n', 'a = int(input())\nfor i in range(1, a*360 + 1):\n if i % 360 == 0 and i % a == 0:\n print(i//a)\n break'] | ['Wrong Answer', 'Accepted'] | ['s115145637', 's134636975'] | [9076.0, 9152.0] | [28.0, 35.0] | [43, 106] |
p02633 | u244416763 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['print(360/int(input()))', 'x = int(input())\nfor i in range(1,361):\n if (x*i)%360 == 0:\n print(i)\n exit()'] | ['Wrong Answer', 'Accepted'] | ['s892930717', 's612994056'] | [9124.0, 9128.0] | [26.0, 25.0] | [23, 84] |
p02633 | u249372595 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['X=int(input())\nif 360%K==0:\n K=360//X\n print(K)\nelif 360%K!=0:\n K=2*360//(180-X)\n print(K)', 'X=int(input())\nif 360%X==0:\n K=360//X\n print(K)\nelif 360%X!=0:\n i=1\n while True:\n if (X*i)%360==0:\n break\n i+=1\n print(i)'] | ['Runtime Error', 'Accepted'] | ['s416656289', 's749874747'] | [9160.0, 9164.0] | [29.0, 25.0] | [94, 137] |
p02633 | u254961675 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['# -*- coding: utf-8 -*-\n# get a integer\na = int(input())\n\nm = a\nc = 1\nwhile m % 360 != 0:\n\tm+=a\n\tc+=1\nprint(m)', '# -*- coding: utf-8 -*-\n# get a integer\na = int(input())\n\nm = a\nc = 1\nwhile m % 360 != 0:\n\tm+=a\n\tc+=1\nprint(c)'] | ['Wrong Answer', 'Accepted'] | ['s663381808', 's028164506'] | [9088.0, 9068.0] | [32.0, 30.0] | [110, 110] |
p02633 | u257750994 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['import math\nx = int(input())\ndef lcm(x, y):\n return (x * y) // math.gcd(x, y)\nif x == 1:\n print(360 / x)\nelif x == 45:\n print(360 / x)\nelif x == 90:\n print(360 / x)\nelse:\n z = lcm(x, 360)\n print(math.floor(z / x))\n', 'import math\nx = int(input())\ndef lcm(x, y):\n return (x * y) // math.gcd(x... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s157162019', 's231617710', 's456691717', 's515659518'] | [9104.0, 9164.0, 9100.0, 9076.0] | [31.0, 28.0, 27.0, 26.0] | [222, 215, 32, 230] |
p02633 | u272457181 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['x = int(input())\ns = x * 360/ gcd(x,360)\nprint(s/x)', 'x = int(input())\ns = x * 360 / math.gcd(x, 360)\nprint(s/x)', 'import math\nx = int(input())\ns = x * 360 / math.gcd(x, 360)\nprint(int(s//x))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s096723522', 's326880013', 's517388596'] | [9144.0, 9088.0, 9212.0] | [28.0, 25.0, 29.0] | [51, 59, 77] |
p02633 | u306144075 | 2,000 | 1,048,576 | Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times: * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise. | ['n=int(input())\np=1\nif 360//n == 0:\n\tprint(360//n)\nelse:\n while true:\n\tif n*p%360 == 0:\n\t\tprint(n)\n \tbreak\n n+=1\n\t', 'n=int(input())\nl=360/n\nprint(l)', 'n=int(input())\np=1\nif 360//n == 0:\n\tprint(360//n)\nelse:\n while true:\n\tif n*p%360 == 0:\n\t\tprint(n)\n \texit()\n n+=1\n\t... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s331588947', 's424541680', 's773234016', 's248782004'] | [9012.0, 9096.0, 8948.0, 9164.0] | [21.0, 29.0, 28.0, 29.0] | [122, 31, 123, 116] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.