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
|
---|---|---|---|---|---|---|---|---|---|---|
p02633 | u317533286 | 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 = 1\nwhile True:\n if (360 * i) % X == 0:\n ans = (360 * i) / X\n break\n else:\n i += 1\nprint(ans)\n', 'X = int(input())\ni = 1\nwhile True:\n if (360 * i) % X == 0:\n ans = (360 * i) // X\n break\n else:\n i += 1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s886828998', 's175155508'] | [9152.0, 9184.0] | [29.0, 33.0] | [124, 124] |
p02633 | u327421986 | 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 % x == 0:\n\tprint(360//x)\nprint((360//x)*5)\n', 'from math import gcd\nx = int(input())\n\nlcm = (x * 360)/gcd(x, 360)\nprint(int(lcm/x))\n'] | ['Wrong Answer', 'Accepted'] | ['s876577488', 's580079860'] | [9024.0, 9060.0] | [28.0, 28.0] | [68, 85] |
p02633 | u329865314 | 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=int(input())\nx = 0\ni = 1\nwhile(1):\n x += a\n i += 1\n x %= 360\n if x:\n continue\n else:\n print(i)\n quit()', 'a=int(input())\nx = 0\ni = 0\nwhile(1):\n x += a\n i += 1\n x %= 360\n if x:\n continue\n else:\n print(i)\n quit()'] | ['Wrong Answer', 'Accepted'] | ['s118468146', 's338186506'] | [9048.0, 9084.0] | [31.0, 33.0] | [118, 118] |
p02633 | u340064601 | 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\nprint(360//gcd(360,int(input()))', 'from math import gcd\nprint(360//gcd(360,int(input())))'] | ['Runtime Error', 'Accepted'] | ['s252583343', 's208544800'] | [9020.0, 9156.0] | [27.0, 27.0] | [53, 54] |
p02633 | u346531902 | 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(int(math.ceil(360/x)))', "from math import *\nfrom copy import *\nfrom string import *\t\t\t\t\nfrom random import *\nfrom sys import stdin,stdout\nfrom sys import maxsize\nfrom operator import *\t\t\t\t\nfrom itertools import *\nfrom collections import Counter\t\t\nimport math\nimport math\nimport time\nfrom queue import Queue\n# PradeepGhosh_2017076\n\ndef seive(n):\n\tl=[True]\n\tl=l*(n+1)\n\tfor i in range(2,int(sqrt(n))+1):\n\t\tif(l[i]==True):\n\t\t\tval=i*i\n\t\t\twhile(val<len(l)):\n\t\t\t\tl[val]=False\n\t\t\t\tval+=i\n\tprime=[]\n\tfor i in range(2,len(l)):\n\t\tif(l[i]==True):\n\t\t\tprime.append(i)\n\treturn prime\n\ndef dp(l,i,n,val,ans):\n\tif(i>=n or val<0):\n\t\treturn 1000000\n\telif(val==0):\n\t\treturn 0\n\telse:\n\t\tif(ans[i]==1000000):\n\t\t\tans[i]=min(min(1+dp(l,i+1,n,val-l[i],ans),1+dp(l,i,n,val-l[i],ans)),dp(l,i+1,n,val,ans))\n\t\treturn ans[i]\nfrom queue import Queue\ndef factors(n):\n\tl=[]\n\tfor i in range(1,int(sqrt(n))+1):\n\t\tif(n%i==0):\n\t\t\tif(n//i==i):\n\t\t\t\tl.append(i)\n\t\t\telse:\n\t\t\t\tl.append(i)\n\t\t\t\tl.append(n//i)\n\treturn l\ndef check1(s,v,x):\n\twhile(True):\n\t\tif(v not in s):\n\t\t\treturn v\n\t\telse:\n\t\t\tv-=1\ndef check2(s,v,x):\n\twhile(True):\n\t\tif(v not in s):\n\t\t\treturn v\n\t\telse:\n\t\t\tv+=1\n\nif __name__ == '__main__':\n\t\n\t# s=set(l)\n\t# t=int(input())\n\t\n\t# \tn=int(input())\n\t# \tif(n==2):\n\t# \t\tprint(1)\n\t# \telse:\n\t# \t\tif(n in s):\n\t# \t\t\tn=n-1\n\t# \t\tj=n-1\n\t# \t\twhile(j>0):\n\t# \t\t\tif(n%j==0):\n\t# \t\t\t\tbreak\n\t# \t\t\tj-=1\n\t# \t\tprint(j)\n\tx=int(input())\n\tc=0\n\tans=0\n\twhile(ans!=360):\n\t\tans+=x\n\t\tif(ans>360):\n\t\t\tans-=360\n\t\tc+=1\n\tprint(c)"] | ['Runtime Error', 'Accepted'] | ['s047855009', 's664254754'] | [9032.0, 10676.0] | [30.0, 48.0] | [43, 1564] |
p02633 | u352676541 | 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\nans = 360/x\n\nprint(str(ans))', 'X = int(input())\ni = 1\n\nwhile (360*i) % X != 0:\n i += 1\nprint(i)', 'X = int(input())\nk = 1\nn = 1\n\nwhile true:\n ans = 360 * n % X\n if ans == 0:\n print(360 * n / X)\n else:\n n += 1\n', 'X = int(input())\nk = 1\nn = 1\n\nwhile true:\n ans = 360 * n % X\n if ans == 0:\n print(360 * n / X)\n break:\n else:\n n += 1\n', 'X = int(input())\nk = 1\nn = 1\n\nwhile true:\n ans = 360 * n % X\n if ans == 0:\n print(360 * n / X)\n break;\n else:\n n += 1\n', 'X = int(input())\ni = 1\n\nwhile (360*i) % X != 0:\n i += 1\nans = 360*i//X\nprint(ans)\n'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s069620714', 's473553352', 's849536778', 's905261159', 's919496218', 's107892858'] | [9096.0, 9028.0, 9160.0, 8876.0, 9136.0, 9068.0] | [26.0, 25.0, 26.0, 25.0, 23.0, 26.0] | [46, 65, 119, 130, 130, 83] |
p02633 | u364774090 | 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())\n\nans = (X * 360) // math.gcd(X, 360)\nprint(ans)', 'X = int(input())\n \nfor k in range(1, 361):\n if (k * X) % 360 == 0:\n print(k)\n break'] | ['Wrong Answer', 'Accepted'] | ['s408059177', 's558377804'] | [9092.0, 9048.0] | [30.0, 25.0] | [76, 90] |
p02633 | u401686269 | 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)', 'X = int(input())\ncount = 1\nwhile True:\n count += 1\n newX = count * X\n if newX % 360 == 0:\n break\n\nprint(int(count))'] | ['Wrong Answer', 'Accepted'] | ['s198028344', 's330655171'] | [9084.0, 9092.0] | [29.0, 31.0] | [29, 131] |
p02633 | u406138190 | 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%x==0):\n print(360/x)\n ', 'x=int(input())\nif(360%x==0):\n print(int(360/x))\nelif(360%(180-x)==0):\n print(int(360/(180-x)))\nelse:\n m=2\n while(1):\n if((360*m)%x==0):\n print(int(360*m/x))\n break\n elif((360*m)%(180-x)==0):\n print(int(360*m/(180-x)))\n break\n m+=1'] | ['Wrong Answer', 'Accepted'] | ['s575298226', 's355504225'] | [9016.0, 9076.0] | [29.0, 27.0] | [46, 307] |
p02633 | u406767170 | 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\nx = int(input())\ng = math.gdc(x,360)\nprint(360//g)\n', 'import math\n\nx = int(input())\ng = math.gcd(x,360)\nprint(360//g)\n'] | ['Runtime Error', 'Accepted'] | ['s459741922', 's978692639'] | [9152.0, 9080.0] | [26.0, 29.0] | [64, 64] |
p02633 | u425758699 | 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(360):\n if (i*n+n)%360==0:\n print(i)\n break', 'n=int(input())\nfor i in range(360):\n if (i*n+n)%360==0:\n print(i+1)\n break'] | ['Wrong Answer', 'Accepted'] | ['s325562347', 's516915683'] | [9052.0, 9164.0] | [31.0, 31.0] | [79, 81] |
p02633 | u437990671 | 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())\nx = i\nif x>90:\n x = x-90\nans = 0\na = 360\nwhile True:\n if a%x==0:\n ans+=a//x\n break\n else:\n rem = a%x\n ans+=a//x\n a-=rem\nprint(ans)\n', 'x = int(input())\nans = 0\nfor i in range(1,361):\n num = 360*i\n if num%x==0:\n print(num//x)\n exit()'] | ['Runtime Error', 'Accepted'] | ['s053160310', 's421193399'] | [9100.0, 9152.0] | [25.0, 32.0] | [192, 117] |
p02633 | u465652095 | 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. | ['m = int(input())\ndef 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]\nx = make_divisors(360)\n\n\ndef gcd(a,b):\n if(b>a):\n a,b=b,a\n i=b\n while i>0:\n if(a%i==0 and b%i==0):\n return i\n i-=1\n\n\ndef lcm(a,b):\n return int(a*b/gcd(a,b))\n\ny = lcm(m,360)\n\nprint(y)\nprint(m)\nprint(x)\nif m in x:\n print(360//m)\nelse:\n print(y//m)', 'm = int(input())\ndef 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]\nx = make_divisors(360)\n\n\ndef gcd(a,b):\n if(b>a):\n a,b=b,a\n i=b\n while i>0:\n if(a%i==0 and b%i==0):\n return i\n i-=1\n\n\ndef lcm(a,b):\n return int(a*b/gcd(a,b))\n\ny = lcm(m,360)\n\nif m in x:\n print(360//m)\nelse:\n print(y//m)'] | ['Wrong Answer', 'Accepted'] | ['s770248125', 's993178402'] | [9168.0, 9024.0] | [28.0, 26.0] | [637, 610] |
p02633 | u497188176 | 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())\nB=0\nC=0\nfor i in range(0,360):\n B=B+X\n C=B%360\n K=K+1\n if C==0:\n print(K)\n break\n \n \n ', 'X=int(input())\nK=0\nB=0\nC=0\nfor i in range(0,360):\n B=B+X\n C=B%360\n K=K+1\n if C==0:\n print(K)\n break\n'] | ['Runtime Error', 'Accepted'] | ['s599852416', 's496106958'] | [9152.0, 9100.0] | [25.0, 26.0] | [140, 126] |
p02633 | u499998503 | 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/X)', 'X = int(input())\nprint(360/X)', 'X = int(input())\nx = 1\nwhile True:\n if X*x % 360 == 0:\n print(x)\n break\n x += 1'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s061848738', 's233431754', 's796148806'] | [9140.0, 9144.0, 9152.0] | [25.0, 32.0, 38.0] | [12, 29, 100] |
p02633 | u500823377 | 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())\nK = 0\nwhile ((X * K) % 360 != 0) and (K == 0):\n K += 1\nprint(K)', 'X = int(input())\nK = 0\nwhile ((X * K) % 360 != 0) or (K == 0):\n K += 1\nprint(K)'] | ['Wrong Answer', 'Accepted'] | ['s369978709', 's292361871'] | [9100.0, 9100.0] | [28.0, 26.0] | [81, 80] |
p02633 | u502731482 | 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())\nans = 360 / n\ni = 1\nwhile int(ans * i) != ans * i:\n i += 1\nprint(ans * i)', 'n = int(input())\nans = 360 / n\ni = 1\nwhile int(ans * i) != ans * i:\n i += 1\nprint(int(ans * i))'] | ['Wrong Answer', 'Accepted'] | ['s267137120', 's170375537'] | [9088.0, 8996.0] | [26.0, 30.0] | [91, 96] |
p02633 | u515638999 | 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, 180):\n if (int(360*i) % n ==0) :\n print(i)\n exit(0)', 'n = int(input())\nfor i in range(1, 180, 1):\n if(360*i % n == 0):\n print(int(360*i//n))\n exit(0)'] | ['Wrong Answer', 'Accepted'] | ['s915969753', 's434371997'] | [9060.0, 9024.0] | [25.0, 28.0] | [97, 102] |
p02633 | u529922586 | 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())\ng = math.gcd(x,360)\nprint((x*360)//g)', 'x = int(input())\nk = 1\nwhile (x*k)%360 != 0:\n k+=1\nprint(k)'] | ['Wrong Answer', 'Accepted'] | ['s426902946', 's346732208'] | [9116.0, 9056.0] | [27.0, 30.0] | [66, 60] |
p02633 | u537142137 | 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\nK=1\ny=X % 360\nwhile y != 0:\n K+=1\n y=(y+X)% 360\n#\nprint(k)\n\n', 'X = int(input())\n\nK=1\ny=X\nwhile y != 0:\n K+=1\n y+=X\n#\nprint(k)\n\n', 'X = int(input())\n\nK=1\ny=X % 360\nwhile y != 0:\n K+=1\n y=(y+X)% 360\n#\nprint(K)\n\n'] | ['Runtime Error', 'Time Limit Exceeded', 'Accepted'] | ['s186695027', 's809995413', 's753124381'] | [8912.0, 8952.0, 9056.0] | [25.0, 2206.0, 29.0] | [80, 66, 80] |
p02633 | u539953365 | 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\ntol = 1e-6\nans = 1\ncur = [0,0]\ncur[0] += math.cos(ans*math.pi/x)\ncur[1] += math.sin(ans*math.pi/x)\nwhile cur[0]**2 + cur[1]**2 > tol:\n ans += 1\n cur[0] += math.cos(ans*math.pi/x)\n cur[1] += math.sin(ans*math.pi/x)\nprint(ans)\n', 'import math\nx = int(input())\ntol = 1e-6\nans = 1\ncur = [0,1]\nunit = x/180*math.pi\nwhile cur[0]**2 + cur[1]**2 > tol:\n cur[0] += math.sin(ans*unit)\n cur[1] += math.cos(ans*unit)\n ans += 1\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s423212765', 's963774863'] | [9108.0, 9504.0] | [24.0, 30.0] | [246, 205] |
p02633 | u557792847 | 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 numpy as np\n\nX = int(input())\nX_lcm = np.lcm(360, 360-X)\nprint(X_lcm // X)\n', 'import numpy as np\n \nX = int(input())\nX_lcm = np.lcm(360, X)\nprint(X_lcm // X)'] | ['Wrong Answer', 'Accepted'] | ['s955376505', 's501081229'] | [27080.0, 27024.0] | [117.0, 121.0] | [82, 78] |
p02633 | u572142121 | 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())\nimport math\nprint(360*X//math.gcd(360,X))', 'X=int(input())\nimport math\nprint(360*X//math.gcd(360,X)', 'X=int(input())\nimport math\na=360*X//math.gcd(360,X)\nprint(a//X)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s050476073', 's316827470', 's847022572'] | [8996.0, 8992.0, 9088.0] | [32.0, 24.0, 31.0] | [56, 55, 63] |
p02633 | u600261652 | 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 == 0:\n print(i//X)\n exit()', 'import math\nX = int(input())\nprint((X*360//math.gcd(X, 360))//X)'] | ['Wrong Answer', 'Accepted'] | ['s662161065', 's537061779'] | [9080.0, 9084.0] | [30.0, 25.0] | [82, 64] |
p02633 | u607075479 | 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())\ng = math.gcd(360, X)\nprint(g // X)\n', 'import math\nX = int(input())\ng = math.gcd(360, X)\nprint(X*360//g)\n', 'import math\nX = int(input())\ng = math.gcd(360, X)\nl = X*360//g\nprint(l // X)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s216205478', 's462778472', 's021682522'] | [9104.0, 9100.0, 9152.0] | [31.0, 24.0, 25.0] | [64, 66, 77] |
p02633 | u619972561 | 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 matplotlib.pyplot as plt\nimport math\n \ndef lcm(x, y):\n if x > y:\n z = x\n else:\n z = y\n \n while(True):\n if((z % x == 0) and (z % y == 0)):\n lcm = z\n break\n z += 1\n \n return lcm\n\nX = int(input())\nprint(lcm(X, 360) / X)', '# import matplotlib.pyplot as plt\nimport math\n\ndef lcm(x, y):\n if x > y:\n z = x\n else:\n z = y\n\n while(True):\n if((z % x == 0) and (z % y == 0)):\n lcm = z\n break\n z += 1\n\n return lcm\n\ndef squaredDistance(a, b):\n return (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2\n\nX = int(input())\nprint(lcm(X, 360) / X)\n', 'import math\nprint(int(360 / math.gcd(int(input()), 360)))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s650233593', 's993872028', 's229703502'] | [9100.0, 9092.0, 9052.0] | [27.0, 32.0, 29.0] | [277, 352, 57] |
p02633 | u623687794 | 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())\nprint((x*360)//math.gcd(x,360))', 'cnt=1\nx=int(input())\nwhile True:\n if cnt*360 % x ==0:print(cnt*360//x);exit()\n cnt+=1'] | ['Wrong Answer', 'Accepted'] | ['s422551190', 's009751988'] | [9152.0, 9152.0] | [28.0, 29.0] | [58, 91] |
p02633 | u624455250 | 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 lcm(x, y):\n if x > y:\n greater = x\n else:\n greater = y\n \n while(True):\n if((greater % x == 0) and (greater % y == 0)):\n lcm = greater\n break\n greater += 1\n \n return lcm\n \n \n \nnum1 = int(input())\na=lcm(num1,360)\nb=a/360\nprint(int(b))', 'def lcm(x, y):\n if x > y:\n greater = x\n else:\n greater = y\n \n while(True):\n if((greater % x == 0) and (greater % y == 0)):\n lcm = greater\n break\n greater += 1\n \n return lcm\n \n \n\nnum1 = int(input())\na=lcm(num1,360)\nb=a/360\nprint(b)', 'def lcm(x, y):\n if x > y:\n greater = x\n else:\n greater = y\n \n while(True):\n if((greater % x == 0) and (greater % y == 0)):\n lcm = greater\n break\n greater += 1\n \n return lcm\n \n \n \nnum1 = int(input())\na=lcm(num1,360)\nb=a/num1\nprint(int(b))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s121898880', 's646795917', 's460924352'] | [9132.0, 9172.0, 9176.0] | [29.0, 31.0, 27.0] | [288, 282, 289] |
p02633 | u631579948 | 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=int(input())\nprint(360/a)', 'a=int(input())\nans=360/a\nprint(ans)', 'import math\na=int(input())\ni=1\nwhile True:\n if 360*i%a==0:\n print(int(360*i/a))\n break\n else:\n i+=1\n '] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s540739255', 's980409225', 's531124521'] | [9144.0, 9100.0, 9152.0] | [31.0, 33.0, 29.0] | [27, 35, 131] |
p02633 | u638231966 | 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())\nlcm = round(360 * X / math.gcd(360, X))\nprint(lcm)\nK = round(lcm / X)\nprint(K)', 'import math \nX = int(input())\nlcm = 360 * X // math.gcd(360, X)\nprint(lcm)\nK = lcm // X\nprint(K)', 'import math \nX = int(input())\nlcm = round(360 * X / math.gcd(360, X))\nK = round(lcm / X)\nprint(K)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s074214105', 's221563383', 's263831893'] | [9148.0, 9156.0, 9140.0] | [30.0, 28.0, 29.0] | [108, 96, 97] |
p02633 | u658905620 | 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())\nK=0\na=0\nwhile True:\n a+=X\n K+=1\n if K%360==0:\n break\nprint(K)', 'X=int(input())\nK=0\na=0\nwhile True:\n a+=X\n K+=1\n if a%360==0:\n break\nprint(K)'] | ['Wrong Answer', 'Accepted'] | ['s817415968', 's590182223'] | [9144.0, 9052.0] | [26.0, 28.0] | [82, 82] |
p02633 | u664546626 | 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,360+1):\n if n*i%360==0:\n print(i)\n ', 'n=int(input())\nvar=1\nif n%360==0:\n\tprint(0)\n\texit()\nwhile True:\n\tif (n*var)%360==0:\n\t\tprint(var)\n exit()\n var+=1', 'n=int(input())\nvar=1\nif n%360==0:\n\tprint(0)\n exit()\nwhile True:\n\tif (n*var)%360==0:\n\t\tprint(var)\n exit()\n var+=1', '\n\n#n,k= map(int, input().split())\n#for _ in range(int(input())):\n #n,k= map(int, input().split())\n#from collections import Counter\nn=int(input())\nif n%360==0:\n print(0)\n exit()\nelse:\n var=1\n while (var*n)%360!=0:\n var+=1\n print(var)\n'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s006524622', 's722634119', 's941406520', 's986731026'] | [9040.0, 8976.0, 8848.0, 9068.0] | [25.0, 26.0, 25.0, 26.0] | [71, 121, 124, 309] |
p02633 | u665452497 | 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 sys\nx=int(input())\n\nfor j in range(1,361):\n for k in range(1,361):\n if 360*k==x*j:\n print(x,j,k)\n sys.exit()', 'import sys\nx=int(input())\n\nfor j in range(1,361):\n for k in range(1,361):\n if 360*k==x*j:\n print(j)\n sys.exit()'] | ['Wrong Answer', 'Accepted'] | ['s182775817', 's961594133'] | [9100.0, 9060.0] | [43.0, 43.0] | [147, 143] |
p02633 | u671211357 | 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', 'def gcda(a,b):\n if a < b:\n a, b = b, a\n r = a % b\n if r == 0:\n return b\n return gcda(r, b)\n\ndef lcm(a,b):\n return a*b//gcda(a,b)\n\nX=int(input())\nshukai=lcm(360,X)\nprint(shukai//X)\n \n'] | ['Wrong Answer', 'Accepted'] | ['s312448160', 's743870946'] | [9080.0, 9104.0] | [29.0, 32.0] | [28, 218] |
p02633 | u723345499 | 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. | ['\nx = int(input())\nrad = (math.pi / 180) * x\n\ncos = 0\nsin = 0\nk = 0\nwhile True:\n cos += (math.cos(rad * k))\n sin += (math.sin(rad * k))\n k += 1\n if int(cos) ==0 and int(sin) == 0:\n break\nif k == 359:\n k = 360\nprint(k)', 'import math\nfrom fractions import Fraction\n\nx = int(input())\n\n\nk = 0\nwhile True:\n k += 1\n s = x * k\n if s % 360 == 0:\n break\nprint(k)'] | ['Runtime Error', 'Accepted'] | ['s612309374', 's530839900'] | [9176.0, 10364.0] | [32.0, 38.0] | [238, 149] |
p02633 | u729133443 | 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. | ['y=x=int(input())\nwhile y%360:y+=x\nprint(y/x)', 'y=x=int(input())\nwhile y%360:y+=x\nprint(y//x)'] | ['Wrong Answer', 'Accepted'] | ['s860556217', 's726055319'] | [9152.0, 9152.0] | [30.0, 29.0] | [44, 45] |
p02633 | u749947386 | 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\nx = list(map(int, input()))\n\nprint(360*x/gcd(360,x))\n\n', 'import math\n\nx = list(map(int, input()))\n\nprint(360*x/gcd(360,x))\n\n', 'import math\n\nx = input()\nx = int(x)\n\nlcd=(360*x)//math.gcd(360,x)\n\nprint(lcd//x)\n\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s167639486', 's939664623', 's773400341'] | [8920.0, 9096.0, 9040.0] | [25.0, 23.0, 25.0] | [67, 67, 82] |
p02633 | u750228275 | 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())\nls = [2, 2, 2, 3, 3, 5]\na = []\nfor l in ls:\n if X % l == 0:\n a.append(l)\n X /= l\nnum = 1\nif len(a) != 0:\n for b in a:\n num *= b\nprint(360 / b)', 'X = int(input())\nls = [2, 2, 2, 3, 3, 5]\na = []\nfor l in ls:\n if X % l == 0:\n a.append(l)\n X /= l\nnum = 1\nif len(a) != 0:\n for b in a:\n num *= b\nprint(int(360 / num))'] | ['Runtime Error', 'Accepted'] | ['s427435362', 's324556134'] | [9236.0, 9240.0] | [28.0, 28.0] | [170, 177] |
p02633 | u764860452 | 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\nans=0\ntmp=360 \n\nif 360%X==0:\n ans=360/X\nelse:\n while(1):\n if tmp%X!=0:\n tmp+=360\n else:\n ans=tmp/X\n break\nprint(ans)', 'X=int(input())\n\nans=0\ntmp=360 \n\nif 360%X==0:\n ans=360//X\nelse:\n while(1):\n if tmp%X!=0:\n tmp+=360\n else:\n ans=tmp//X\n break\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s134326120', 's758783069'] | [9104.0, 9168.0] | [30.0, 26.0] | [188, 190] |
p02633 | u779728630 | 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\nr = X\nans = 0\nwhile True:\n r += X\n r %= 360\n ans += 1\n if r == 0:\n break\nprint(ans)', 'X = int(input())\n\nr = 0\nans = 0\nwhile True:\n r += X\n r %= 360\n ans += 1\n if r == 0:\n break\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s405343098', 's080962399'] | [8996.0, 9164.0] | [32.0, 27.0] | [108, 108] |
p02633 | u789854092 | 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())\nk = 360 / x\nout = None\nfor l in range(1, 181):\n if (k * l).is_integer():\n out = k * l\n break\nprint(out)', 'x = int(input())\nk = 360 / x\nout = None\nfor l in range(1, 10000):\n if (k * l).is_integer():\n out = k * l\n break\nprint(out)', 'x = int(input())\nk = 360 / x\nif k.is_integer():\n print(int(k))\nelse:\n for idx in range(2, x+1):\n tmp = k * idx\n if tmp.is_integer():\n print(int(tmp))\n break'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s445045565', 's785673248', 's058792096'] | [9160.0, 8908.0, 9164.0] | [31.0, 27.0, 32.0] | [127, 129, 174] |
p02633 | u790867486 | 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(ceil(360/n))', 'n=int(input())\nk=1\nwhile k>0:\n if k*n%360==0:\n print(k)\n break\n else:\n k+=1 \n '] | ['Runtime Error', 'Accepted'] | ['s731407203', 's507592998'] | [9040.0, 8980.0] | [23.0, 28.0] | [33, 104] |
p02633 | u802220820 | 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 numpy as np\n\nrotate = int(input()) \n\nx = 0\ny = 1\nheading = 0\n\ncount = 1\n\nwhile x != 0 and y != 0:\n heading += rotate\n x += cos(np.deg2rad(heading))\n y += sin(np.deg2rad(heading))\n count++\n \nprint(count)', "import numpy as np\nimport math\n\nrotate = int(input())\n\nx = 0\ny = 1\nheading = 90\n\ncount = 1\n\nwhile True:\n heading += rotate\n x += np.cos(np.deg2rad(heading))\n y += np.sin(np.deg2rad(heading))\n count += 1\n #print('heading', heading)\n #print('x : ', x)\n #print('y : ', y)\n\n if math.isclose(x, 0.0,abs_tol=0.000001) and math.isclose(y, 0.0,abs_tol=0.0000001):\n break\n\nprint(count)"] | ['Runtime Error', 'Accepted'] | ['s186528888', 's952133442'] | [8976.0, 27204.0] | [22.0, 117.0] | [214, 407] |
p02633 | u818349438 | 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 k in range(100000):\n if x*k%360==0:\n print(k)\n exit(0)', 'x =int(input())\nfor k in range(1,100000):\n if x*k%360==0:\n print(k)\n exit(0)\n'] | ['Wrong Answer', 'Accepted'] | ['s567871302', 's107452323'] | [9096.0, 9148.0] | [28.0, 29.0] | [91, 94] |
p02633 | u839018659 | 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\nn=int(input())\nprint((n*360)//math.gcd(n,360))', 'def g(a,b):\n if a*b:\n if a>b:\n return g(a-b,b)\n elif(a<b):\n return g(a,b-a)\n else:\n return a\n else:\n if(a*b):\n return max(a,b)\n else:\n return 1\nn=int(input())\nprint(360//g(n,360))'] | ['Wrong Answer', 'Accepted'] | ['s950081414', 's567369630'] | [9140.0, 9228.0] | [27.0, 24.0] | [58, 275] |
p02633 | u839236261 | 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())\nimport math\ny=x*360/math.gcd(x,360)\nprint(y/x)\n', 'x=int(input())\nimport math\nK=360/math.gcd(x,360)\nprint(K)\n', 'x=int(input())\nimport math\ny=math.gcd(x,360)\nprint(y/x)', 'x=int(input())\nimport math\nK=360//math.gcd(x,360)\nprint(K)\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s481763236', 's669709084', 's901586469', 's719774022'] | [8972.0, 9100.0, 9156.0, 9148.0] | [25.0, 28.0, 29.0, 30.0] | [62, 58, 55, 59] |
p02633 | u844813573 | 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())\nans = 0\ni = 0\nwhile i == 0:\n ans = ans + x\n if ans % 360 == 0:\n print(ans)\n break\n', 'x = int(input())\ntotal = 0\nans = 0\n\ni = 0\nwhile i == 0:\n total = total + x\n ans = ans + 1\n if total % 360 == 0:\n print(ans)\n break\n'] | ['Wrong Answer', 'Accepted'] | ['s392886001', 's663877247'] | [9144.0, 9152.0] | [29.0, 27.0] | [119, 154] |
p02633 | u858742833 | 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\n for i in range(10**5):\n t += X\n if t % 360 == 0:\n return i + 1\n\nprint(main())\n', 'def main():\n X = int(input())\n t = 0\n\n for i in range(10**5):\n t += X\n if t % 360 == 0:\n return i + 1\n\nprint(main())\n'] | ['Runtime Error', 'Accepted'] | ['s413515782', 's282921215'] | [9144.0, 9184.0] | [26.0, 25.0] | [141, 151] |
p02633 | u867826040 | 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)', 'x = int(input())\nc = 0\nn = x\nwhile(True):\n if n%360 == 0:\n c+=1\n break\n c+=1\n n+=x\nprint(c)'] | ['Wrong Answer', 'Accepted'] | ['s007954952', 's517446903'] | [9096.0, 9152.0] | [27.0, 30.0] | [29, 114] |
p02633 | u869265610 | 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. | ['M = int(input())\nprint(360/M)', 'M = int(input())\ni = 1\nwhile True:\n if(M*i%360==0):\n print(int(i))\n exit()\n else:\n i+=1'] | ['Wrong Answer', 'Accepted'] | ['s451047504', 's086659200'] | [9144.0, 9144.0] | [28.0, 32.0] | [29, 98] |
p02633 | u879309973 | 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 solve(x):\n k = 0\n while k*x % 360 != 0:\n k += 1\n return k\n \nx = int(input())\nprint(solve(x))', 'def solve(x):\n k = 1\n while k*x % 360 != 0:\n k += 1\n return k\n\nx = int(input())\nprint(solve(x))'] | ['Wrong Answer', 'Accepted'] | ['s344562303', 's511511994'] | [9056.0, 9160.0] | [29.0, 24.0] | [115, 111] |
p02633 | u882616665 | 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 numpy as np\n\nA,B,C,D = map(int, input().split())\nP = 998244353\n\nDP = np.zeros([C+1,D+1],dtype=np.int32)\nDP[A,B] = 1\nfor a in range(A+1,C+1):\n DP[a,B] = DP[a-1, B] * B % P\nfor b in range(B+1,D+1):\n DP[A,b] = DP[A, b-1] * A % P\nfor a in range(A+1,C+1):\n for b in range(B+1,D+1):\n DP[a,b] = (b*DP[a-1,b] + a*DP[a,b-1] - (a-1)*(b-1)*DP[a-1,b-1]) % P\n\nprint(DP[C,D])', 'x = int(input())\nn = 0\nwhile (x*n)%360!=0:\n n+=1\nprint(n)', 'x = int(input())\nn = 1\nwhile (x*n)%360!=0:\n n+=1\nprint(n)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s407294529', 's459994510', 's760348944'] | [27180.0, 9156.0, 9144.0] | [126.0, 30.0, 28.0] | [384, 60, 61] |
p02633 | u882869256 | 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=int(input())\nprint(360/a)', 'a=int(input())\nb=a\nc=1\nwhile b!=0:\n b=b+a\n b=b%360\n c=c+1\nprint(c)\n'] | ['Wrong Answer', 'Accepted'] | ['s448650505', 's865502727'] | [9140.0, 9132.0] | [31.0, 33.0] | [27, 76] |
p02633 | u883237011 | 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. | ['degree = int(input())\nprint(360/degree)\n', 'x = int(input())\n\nk = 1\nwhile True:\n if k*x % 360 ==0:\n print(k)\n exit(0)\n k += 1'] | ['Wrong Answer', 'Accepted'] | ['s322272819', 's991825540'] | [9012.0, 9160.0] | [27.0, 28.0] | [40, 101] |
p02633 | u896726004 | 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())\nrad = 90\ncnt = 0\n\nwhile True:\n cnt += 1\n if rad==360:\n break\n else:\n rad += X\n rad = rad if rad < 360 else rad = 360\n\nprint(cnt)', 'X = int(input())\n\neikaku = X if X < 180 else X - 180\ncnt = 0\n\nans = 0\nwhile True:\n ans += 1\n cnt += eikaku\n if cnt % 360 == 0:\n print(ans)\n break'] | ['Runtime Error', 'Accepted'] | ['s625535952', 's055991317'] | [8988.0, 9172.0] | [26.0, 25.0] | [175, 168] |
p02633 | u898109279 | 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', 'X = int(input)\nprint(360 / x)', 'import sys\n\nX = int(input())\n\nn = 1\nwhile True:\n if 360 * n % X == 0:\n print(360 * n // X)\n break\n n += 1\n '] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s026282639', 's495693465', 's174935333'] | [8960.0, 9084.0, 9128.0] | [29.0, 23.0, 26.0] | [32, 29, 130] |
p02633 | u907446975 | 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())\nk=360%x\nj=360//x\nv=k\nwhile 360%k!=0:\n k=360%k\n v+=k\nprint(j*(360//v))', 'x=int(input())\nk=360%x\nj=360//x\nv=k\nwhile 360%k!=0:\n k=360%k\n v+=k\nv1=360//v\nprint(j*v1)', 'import math\nx=int(input())\nprint(math.ceil(360/x))\nprint(360/x)\n', 'def do():\n x=int(input())\n k=360%x\n j=360//x\n v=k\n if k==0:\n return j\n while 360%k!=0:\n k=360%k\n v+=k\n v1=360//v\n return j*v1\nprint(do())'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s071483083', 's500899096', 's844972576', 's997472482'] | [9184.0, 9164.0, 9140.0, 9168.0] | [27.0, 26.0, 29.0, 36.0] | [90, 94, 64, 182] |
p02633 | u910555044 | 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 360*i % x === 0:\n print(360*i//x)\n break\nelse:\n print(360)', 'x = int(input())\nfor i in range(1, 361):\n if 360*i % x == 0:\n print(360*i//x)\n break\nelse:\n print(360)'] | ['Runtime Error', 'Accepted'] | ['s006436288', 's651656691'] | [8960.0, 9088.0] | [28.0, 32.0] | [111, 110] |
p02633 | u916242112 | 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())\nY =360\nwhile 1:\n\tif Y % X == 0:\n\t\tprint(Y/X)\n\t\tbreak\n\telse:\n\t\tY += 360', '90', 'X=int(input())\nY =360\nwhile 1:\n\tif Y % X == 0:\n\t\tprint(Y//X)\n\t\tbreak\n\telse:\n\t\tY += 360\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s071660631', 's313438260', 's746966101'] | [9096.0, 9028.0, 9128.0] | [30.0, 23.0, 27.0] | [85, 2, 87] |
p02633 | u923172145 | 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 = map(int,input().split())\n\nK = 1\ndirect = X\nwhile True:\n \n if direct % 360 = 0\n \tbreak\n direct += X\n K += 1\n\nprint(K)', 'X = int(input())\n\nK = 1\ndire = X\nwhile True:\n if (dire % 180) == 0:\n break\n K+=1\n dire+=X\n\n \nprint(K)', 'X = int(input())\n\nK = 1\ndire = X\nwhile True:\n if (dire % 360) == 0:\n break\n K+=1\n dire+=X\n\n \nprint(K)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s458771025', 's668552665', 's132851538'] | [8868.0, 9088.0, 9152.0] | [25.0, 30.0, 33.0] | [125, 108, 108] |
p02633 | u944886577 | 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=int(input())\nfor i in range(1,361):\n if a*i==360:\n print(str(int(i)))\n else:\n for j in range(1,361):\n if a*i/j==360:\n print(i*j)\n break\n else:\n pass\n', 'a=int(input())\nfor i in range(1,361):\n if a*i==360:\n print(str(int(i)))\n else:\n for j in range(1,361):\n if a*i/j==360:\n print(i)\n break\n else:\n pass\n', 'a,n =map(str, input().split())\nb=str(a[2:])\nans=0\n\nfor i in range(int(n)+1):\n for j in range(1):\n c=b[i:]+str(a[j])+b[i+1:]\n ans+=1\nprint(ans*2)', 'a=int(input())\nfor i in range(1,361):\n if a*i==360:\n print(str(int(i)))\n break\n else:\n for j in range(1,361):\n if a*i/j==180:\n print(str(int(j*i)))\n break\n else:\n pass\n', 'a=int(input())\nfor i in range(1,361):\n if a*i==360:\n print(str(int(i)))\n break\n else:\n for j in range(1,361):\n if a*i/j==180:\n print(str(int(j*i+1)))\n break\n else:\n pass\n', 'a=int(input())\nfor i in range(1,361):\n if a*i==360:\n print(str(int(i)))\n break\n else:\n print(0)\n', 'a=int(input())\nfor i in range(1,360):\n if 360%i==0:\n print(360/i)\n break\n else:\n pass', "a=int(input())\nfor i in range(1,361):\n if a*i==360:\n print(str(int(i)))\n break\n else:\n pass\n\nprint('0')\n", 'import math\na=int(input())\ni=a*360/math.gcd(a,360)\nprint(int(i/a))\n'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s217009034', 's329678347', 's699301207', 's699918294', 's770761282', 's831526663', 's884041530', 's995655379', 's821588039'] | [9160.0, 9100.0, 9112.0, 9136.0, 9108.0, 9148.0, 9144.0, 9088.0, 9144.0] | [47.0, 47.0, 22.0, 46.0, 52.0, 31.0, 30.0, 30.0, 30.0] | [183, 181, 155, 203, 205, 107, 88, 115, 67] |
p02633 | u972277483 | 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 1<=x<=179:\n\tif 360/x>int(360/x):\n\t\tprint(int(360/x)+1)\n\telse:\n\t\tint(360/x)\n', 'x=int(input())\ni=1\nif 1<=x<=179:\n\twhile True:\n\t\tif 360*i%x==0:\n\t\t\tprint(int(360*i/x))\n\t\t\tbreak\n\t\telse:\n\t\t\ti+=1\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s712571182', 's171434848'] | [9148.0, 9052.0] | [28.0, 27.0] | [93, 113] |
p02633 | u981931040 | 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(100000):\n\tif x * i % 360 == 0:\n\t\tprint(i)\n\t exit()\n', 'x = int(input())\nfor i in range(100000):\n\tif x * i % 360 == 0:\n\t print(i)\n\t exit()\n', 'x = int(input())\nfor i in range(100000):\n if x * i % 360 == 0:\n print(i)\n exit()\n', 'x = int(input())\nfor i in range(100000):\n\tif x * i % 360 == 0:\n print(i)\n\t exit()\n', 'x = int(input())\nfor i in range(100000):\n\tif x * i % 360 == 0:\n\tprint(i)\n\t exit()\n', 'x = int(input())\nfor i in range(1, 100000):\n if x * i % 360 == 0:\n print(i)\n exit()\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s260344705', 's276614878', 's433205016', 's609065498', 's785067942', 's240000656'] | [8956.0, 8864.0, 8980.0, 8936.0, 8996.0, 9144.0] | [22.0, 22.0, 26.0, 22.0, 26.0, 28.0] | [86, 87, 88, 92, 85, 91] |
p02633 | u997648604 | 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 sys\nsys.setrecursionlimit(10**9)\n\ndef mi(): return map(int,input().split())\ndef ii(): return int(input())\ndef isp(): return input().split()\n\ndef main():\n X = ii()\n print(360//math.gcd(X,360))\n\nif __name__ == "__main__":\n main()\n', 'import math\nimport sys\nsys.setrecursionlimit(10**9)\n\ndef mi(): return map(int,input().split())\ndef ii(): return int(input())\ndef isp(): return input().split()\n\ndef main():\n X = ii()\n print(360//math.gcd(X,360))\n\nif __name__ == "__main__":\n main()\n'] | ['Runtime Error', 'Accepted'] | ['s151045838', 's252352838'] | [9048.0, 8984.0] | [24.0, 34.0] | [242, 254] |
p02639 | u000842852 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['N = list(map(int, input().split()))\n\n\nfor i in range(len(N)):\n if N[i]==0:\n print(i)', 'N = list(map(int, input().split()))\n\n\nfor i in range(len(N)):\n if N[i]==0:\n print(i+1)'] | ['Wrong Answer', 'Accepted'] | ['s422632016', 's360923257'] | [9088.0, 9032.0] | [21.0, 21.0] | [88, 90] |
p02639 | u003142309 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ["import sys\n\ndef main(args):\n ans = [1,2,3,4,5]\n given = [int(i) for i in args]\n\n for i in range(len(ans)):\n if ans[i] != given[i]:\n print(i)\n break\n\n\nif __name__ == '__main__':\n main(sys.argv[1:])", 'import sys\n\ndef main(args):\n \n \n # print(ans[0][1]+1)\n print(2)\n return 0\n ans = [1,2,3,4,5]\n given = [int(i) for i in args]\n\n for i in range(len(ans)):\n if ans[i] != given[i]:\n print(ans[i])\n return 0\n\nmain(sys.argv)', 'import sys\n\ndef main(args):\n ans = [1,2,3,4,5]\n given = [int(i) for i in args]\n\n for i in range(len(ans)):\n if ans[i] != given[i]:\n print(i)\n break\n\nmain(sys.argv[1:])', 'X, N = [int(i) for i in input().split()]\nif N == 0:\n# if False:\n print(X)\nelse:\n Ps = set([int(i) for i in input().split()])\n if X not in Ps:\n print(X)\n\n \n diff = 0\n while True:\n a = X - diff\n if a not in Ps:\n print(a)\n break\n a = X + diff\n if a not in Ps:\n print(a)\n break\n diff += 1', 'X, N = [int(i) for i in input().split()]\nif N == 0:\n print(X)\nelse:\n Ps = set([int(i) for i in input().split()])\n if not X in Ps:\n print(X)\n\n diff = 0\n while True:\n if not X - diff in Ps:\n print(X - diff)\n break\n if not X + diff in Ps:\n print(X + diff)\n break\n diff += 1', 'import sys\n\ndef main(args):\n \n \n # print(ans[0][1]+1)\n\n ans = [1,2,3,4,5]\n given = [int(i) for i in args]\n\n for i in range(len(ans)):\n if ans[i] != given[i]:\n print(ans[i])\n return 0\n\nmain(sys.argv)', 'import sys\n\ndef main(args):\n \n \n # print(ans[0][1]+1)\n\n ans = [1,2,3,4,5]\n given = [int(i) for i in args]\n\n for i in range(len(ans)):\n if ans[i] != given[i]:\n print(ans[i])\n return 0\n\nmain(sys.argv[1:])', 'X, N = [int(i) for i in input().split()]\nif N == 0:\n print(X)\nelse:\n Ps = set([int(i) for i in input().split()])\n if not X in Ps:\n print(X)\n\n \n diff = 0\n while True:\n a = X - diff\n if a not in Ps:\n print(a)\n break\n a = X + diff\n if a not in Ps:\n print(a)\n break\n diff += 1', 'import sys\n\ndef main(args):\n \n \n # print(ans[0][1]+1)\n\n ans = [1,2,3,4,5]\n given = [int(i) for i in args]\n\n for i in range(len(ans)):\n if ans[i] != given[i]:\n print(ans[i])\n break\n\nmain(sys.argv[1:])', 'X, N = [int(i) for i in input().split()]\nif N == 0:\n print(X)\nelse:\n Ps = set([int(i) for i in input().split()])\n if not X in Ps:\n print(X)\n\n diff = 0\n while True:\n if not X - diff in Ps:\n print(X - diff)\n break\n if not X + diff in Ps:\n print(X + diff)\n break\n diff += 1', '#!python\ngiven = [int(i) for i in input().split()]\nans = [1,2,3,4,5]\n\nfor i in range(len(ans)):\n if ans[i] != given[i]:\n print(ans[i])\n break'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s019559754', 's168184192', 's174689102', 's304646825', 's338851018', 's394721730', 's447405224', 's485325651', 's905195483', 's994811908', 's123506404'] | [9048.0, 8984.0, 9044.0, 9068.0, 9196.0, 9176.0, 8984.0, 9192.0, 9048.0, 9196.0, 9204.0] | [19.0, 21.0, 20.0, 19.0, 22.0, 19.0, 19.0, 20.0, 24.0, 24.0, 21.0] | [237, 370, 205, 416, 357, 345, 349, 404, 346, 357, 158] |
p02639 | u004823354 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['a = input()\nl = a.split("")\nb = l.index("0")\nprint(b+1)', 'a=input()\nl=a.split(" ")\nb=l.index("0")\nprint(b+1)'] | ['Runtime Error', 'Accepted'] | ['s420993506', 's363543850'] | [8968.0, 9024.0] | [26.0, 29.0] | [55, 50] |
p02639 | u005569385 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['a = list(map(int,input().split()))\nb = a.index(0)\nprint(b)', 'a = list(map(int,input().split()))\nb = a.index(0)\nprint(b+1)'] | ['Wrong Answer', 'Accepted'] | ['s316209028', 's820548143'] | [9024.0, 9028.0] | [23.0, 20.0] | [58, 60] |
p02639 | u005899289 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['x = list(map(int, input().split()))\nif x[0] == 0:\n print(1)\nif x[1] == 0:\n print(2)\nif x[2] == 0:\n print(3)\nif x[3] == 0:\n print(4)\nelse:\n print(5)', 'x = list(map(int, input().split))\nfor i in x:\n if i == 0:\n print(i)', 'x = list(map(int, input().split()))\nif x[0] == 0:\n print(1)\nelif x[1] == 0:\n print(2)\nelif x[2] == 0:\n print(3)\nelif x[3] == 0:\n print(4)\nelse:\n print(5)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s623708989', 's991581639', 's128657544'] | [9084.0, 8956.0, 9040.0] | [26.0, 25.0, 31.0] | [162, 77, 168] |
p02639 | u007346335 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['x = map(int,input().split())\ni = 0\nwhile (x[i] != 0):\n i+=1\nprint(i)', 'x = list(map(int,input().split()))\ni = 0\nwhile (x[i] != 0):\n i+=1\nprint(i+1)'] | ['Runtime Error', 'Accepted'] | ['s860976117', 's205083318'] | [8940.0, 9060.0] | [26.0, 34.0] | [69, 77] |
p02639 | u011202375 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['a=int(input())\na=a.split(" ")\nc=0\nfor i in a:\n c+=1\n if i==0:\n break\nprint(c)', 'a=input()\na=a.split(" ")\nc=0\nfor i in a:\n c+=1\n if i==str(0):\n break\nprint(c)\n'] | ['Runtime Error', 'Accepted'] | ['s494099730', 's693978086'] | [9020.0, 8948.0] | [20.0, 25.0] | [90, 91] |
p02639 | u017849462 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['X,N = map(int,input().split())\np = list(map(int, input().split())) \n\n\nfor i in range(1,N+1):\n a = X+i\n b = X-i\n if b not in p:\n print(b)\n break\n elif a not in p:\n print(a)\n break\n\nif N==0:\n print(X)', 'li = list(map(int, input().split()))\nfor i in range(len(li)):\n if li[i]==0:\n print(i+1)'] | ['Runtime Error', 'Accepted'] | ['s267161089', 's325461098'] | [9124.0, 9160.0] | [23.0, 20.0] | [241, 97] |
p02639 | u021217230 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['N=int(input())\nA=list(map(int,input().split()))\nA.sort()\nma=A[-1]\ndp=[1]*(ma+1)\nans=0\n\nfor i in range(len(A)-1):\n p=A[i]\n if dp[i]==1:\n for q in range(ma//p+1):\n dp[p*q]=0\n if A[i]!=A[i+1]:\n ans+=1\nif dp[ma]==1:\n ans+=1\nprint(ans)\n', 'l=list(map(int,input().split()))\nprint(l.index(0)+1)'] | ['Runtime Error', 'Accepted'] | ['s697145277', 's706134443'] | [9056.0, 8988.0] | [21.0, 27.0] | [250, 52] |
p02639 | u021387650 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['num_list = list(map(int,input().split()))\n\nfor i in range(len(num_list)):\n if i+1 == num_list[i]:\n print(i+1)\n break', 'num_list = list(map(int,input().split()))\n \nfor i in range(len(num_list)):\n if i+1 != num_list[i]:\n print(i+1)\n break'] | ['Wrong Answer', 'Accepted'] | ['s800541449', 's157848653'] | [9092.0, 9020.0] | [24.0, 25.0] | [123, 124] |
p02639 | u021849254 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['p=input()\n\na="p"\n\nb=a%10\nc=a%100\nd=a%1000\ne=a%10000\n\n\nif a%10==0:\nprint(5)\nelif (a-b)%100==0:\nprint(4)\nelif (a-c)%1000==0:\nprint(3)\nelif (a-d)%10000==0:\nprint(2)\nelse:\nprint(1)', 'a=input()\n\nb=a%10\nc=a%100\nd=a%1000\ne=a%10000\n\n\nif a%10==0:\nprint(5)\nelif (a-b)%100==0\nprint(4)\nelif (a-c)%1000==0\nprint(3)\nelif (a-d)%10000==0\nprint(2)\nelse\nprint(1)', 'a=input()\na=a.split()\n\nn=1\n\nfor x in a:\n if n==int(x):\n n=n+1\n else:\n print(n)\n break\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s812311082', 's842070012', 's118882454'] | [8964.0, 8836.0, 9144.0] | [21.0, 20.0, 23.0] | [176, 165, 97] |
p02639 | u021877437 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['x = [int(v) for v in input().rstrip().split()\ni = x.index(0)\nprint(i + 1)\n', 'x = [int(v) for v in input().rstrip().split()]\ni = x.index(0)\nprint(i + 1)\n'] | ['Runtime Error', 'Accepted'] | ['s494655879', 's842497894'] | [8872.0, 9132.0] | [24.0, 24.0] | [74, 75] |
p02639 | u024550857 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['x = input().split()\nfor i in range(len(x)):\n if x[i] == 0.0:\n print(i)\n break', 'x = input().split()\nfor i in range(len(x)):\n if x[i] == 0.0:\n print(i+1)\n break', 'x = list(map(int, input().split()))\nfor i in range(len(x)):\n if x[i] == 0:\n print(i+1)\n break'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s577166016', 's801151185', 's569903445'] | [8976.0, 8872.0, 9160.0] | [24.0, 24.0, 26.0] | [94, 96, 100] |
p02639 | u027903950 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['N=input()\nA = list(map(int, input().split()))\nT=True\nsucl =[]\nfor i in range(0,int(N)):\n T=True\n for j in range(0,int(N)):\n \n if A[i] % A[j]==0:\n if i==j:\n pass\n else:\n T=False\n break\n \n if T==True:\n sucl.append(i)\nprint(len(sucl))\n ', 'list1 = list(map(int, input().split()))\n\n\nfor i in range(1,5):\n if list1[i-1] != i:\n return(i)\n', 'list = []\nlist.append(input())\n\n\n\nfor i in range(1,5):\n if list[i-1] != i:\n return(i)', 'X, N = map(int,input().split())\nplist = list(map(int, input().split()))\nif len(plist)==0:\n print(X)\n break\nabst1 = []\nabst2 = []\nsuci = []\nfor i in range(1,101):\n if i in plist:\n pass\n else:\n abst1.append(abs(X-i))\n abst2.append([i,abs(X-i)])\nA = min(abst1)\nfor j in range(0,len(abst1)):\n if abst2[j][1] == A:\n print(abst2[j][0])\n break\n \n', 'list1 = list(map(int, input().split()))\n\n\nfor i in range(1,6):\n if list1[i-1] != i:\n print(i)\n\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s044018522', 's741739273', 's744903738', 's877123223', 's442626355'] | [8996.0, 9016.0, 8872.0, 9076.0, 9096.0] | [18.0, 20.0, 26.0, 26.0, 21.0] | [286, 99, 89, 360, 99] |
p02639 | u029000441 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['import sys\ninput = lambda: sys.stdin.readline().rstrip()\n\nn, q = map(int, input().split())\ny = [[] for _ in range(2*10**5)] \ndata = [(0, 0)]*n \nimport heapq\nfor i in range(n):\n a, b = map(int, input().split())\n data[i] = (a, b - 1)\n heapq.heappush(y[b - 1], (-a, i))\nmax_rate = [] \nmax_rate_list = [()]*(2*10**5) #list\nfor i in range(2*10**5):\n if y[i]:\n s, t = heapq.heappop(y[i])\n heapq.heappush(max_rate, (-s, t, i))\n heapq.heappush(y[i], (s, t))\n max_rate_list[i] = (-s, t)\nfrom collections import defaultdict\nng_num = defaultdict(set)\nfor _ in range(q):\n c, d = map(int, input().split())\n c -= 1\n d -= 1\n a, b = data[c]\n data[c] = (a, d)\n heapq.heappush(y[d], (-a, c))\n ng_num[b].add(c)\n if c in ng_num[d]:\n ng_num[d].discard(c)\n #print(ng_num)\n while y[b]:\n s, t = heapq.heappop(y[b])\n if t not in ng_num[b]:\n heapq.heappush(max_rate, (-s, t, b))\n heapq.heappush(y[b], (s, t))\n max_rate_list[b] = (-s, t)\n break\n while y[d]:\n s, t = heapq.heappop(y[d])\n if t not in ng_num[d]:\n heapq.heappush(max_rate, (-s, t, d))\n heapq.heappush(y[d], (s, t))\n max_rate_list[d] = (-s, t)\n break\n #print(max_rate)\n while max_rate:\n s, t, r = heapq.heappop(max_rate)\n if t not in ng_num[r] and (s, t) == max_rate_list[r]:\n print(s)\n heapq.heappush(max_rate, (s, t, r))\n break\n\n\n', "\n\nimport sys\ninput = sys.stdin.readline\nsys.setrecursionlimit(10**7)\nfrom collections import Counter, deque\nfrom collections import defaultdict\nfrom itertools import combinations, permutations, accumulate, groupby, product\nfrom bisect import bisect_left,bisect_right\nfrom heapq import heapify, heappop, heappush\nfrom math import floor, ceil,pi,factorial\nfrom operator import itemgetter\ndef I(): return int(input())\ndef MI(): return map(int, input().split())\ndef LI(): return list(map(int, input().split()))\ndef LI2(): return [int(input()) for i in range(n)]\ndef MXI(): return [[LI()]for i in range(n)]\ndef SI(): return input().rstrip()\ndef printns(x): print('\\n'.join(x))\ndef printni(x): print('\\n'.join(list(map(str,x))))\ninf = 10**17\nmod = 10**9 + 7\n\nlis=LI()\nfor i in range(5):\n if lis[i]==0:\n print(i+1)"] | ['Runtime Error', 'Accepted'] | ['s339809252', 's544440229'] | [9220.0, 9356.0] | [21.0, 24.0] | [1906, 856] |
p02639 | u029251499 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['X, N = map(int,input().split())\np_list = list(map(int, input().split()))\n\np_list.sort()\nr = 200\nanswer = 101\n\nfor i in range(0, 102):\n if i in p_list:\n continue\n else:\n if r > abs(i - X):\n r = abs(i - X)\n answer = i\n else:\n print(answer)\n break\n', 'a = list(map(int,input().split()))\ncount = 1\n\nfor i in a:\n if i == 0:\n print(count)\n break\n count+=1\n'] | ['Runtime Error', 'Accepted'] | ['s041346725', 's819233127'] | [9116.0, 9132.0] | [24.0, 29.0] | [316, 121] |
p02639 | u030278108 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['X = list(map(int, input().split()))\n\nfor int i range 5:\n if X[i] == 0:\n print(i)', 'X = list(map(int, input().split()))\ni = 0\n\nfor i in range(0,5):\n if X[i] == 0:\n print(i+1)'] | ['Runtime Error', 'Accepted'] | ['s638758067', 's331461764'] | [9016.0, 9104.0] | [22.0, 19.0] | [90, 100] |
p02639 | u033287260 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['x = [0] * 5\nx = input().split()\nx = [int(_) for _ in x]\nprint(x)\n\nfor i in range(5):\n if x[i] == 0:\n ans = i\n print(ans+1)\n break\n', 'x = [0] * 5\nx = input().split()\nx = [int(_) for _ in x]\n# print(x)\n\nfor i in range(5):\n if x[i] == 0:\n ans = i\n print(ans+1)\n break\n'] | ['Wrong Answer', 'Accepted'] | ['s792292357', 's575542597'] | [9144.0, 9036.0] | [23.0, 22.0] | [154, 156] |
p02639 | u033642300 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ["def main():\n sum, leg = map(int, input().split())\n \n\n\n for i in range(sum):\n for x in range(sum - i):\n crane = i * 2\n turtle = x * 4\n total = crane + turtle\n if total == leg:\n print('Yes')\n return\n print('No')\n \nmain()", 'def main():\n l = list(map(int, input().split()))\n for i in range(len(l)):\n if l[i] == 0:\n print(i + 1)\n return\n \nmain()'] | ['Runtime Error', 'Accepted'] | ['s880196402', 's156174858'] | [9084.0, 9092.0] | [18.0, 19.0] | [314, 157] |
p02639 | u040298438 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | [' ', 'l = input().split()\nprint(l.index("0") + 1)'] | ['Wrong Answer', 'Accepted'] | ['s461047215', 's653045700'] | [8980.0, 8924.0] | [26.0, 25.0] | [1, 43] |
p02639 | u040752342 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ["x = map(lambda x: int(x), input().split(' '))\n\nfor i in range(1, 6):\n if i != x[i-1]:\n print(i)\n exit(0)", "mass = list(map(lambda x: int(x), input().split(' ')))\n\na = 0\n\n#[1, 2, 3, 0, 5]\n# 0 1 2 3 4\nfor i in range(0, len(mass)):\n if(mass[i] == 0):\n a = i\n\nprint(a + 1)"] | ['Runtime Error', 'Accepted'] | ['s422140148', 's856901875'] | [9036.0, 9004.0] | [20.0, 29.0] | [121, 175] |
p02639 | u054717609 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['x1=list(input().split())\nfor i in range(1,len(x1)):\n if(x1[i]=="0"):\n print(i)\n \n \n \n', 'x1=list(input().split())\nfor i in range(0,len(x1)):\n if(x1[i]=="0"):\n print(i+1)\n \n \n \n'] | ['Wrong Answer', 'Accepted'] | ['s179052371', 's115741435'] | [9072.0, 9020.0] | [25.0, 24.0] | [130, 132] |
p02639 | u055244973 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['A, B, C, D, E = map(int, input().split())\n\nresult = 15 - (A+B+C+D+E)', 'A, B, C, D, E = map(int, input().split())\n\nresult = 15 - (A+B+C+D+E)\nprint(result)\n'] | ['Wrong Answer', 'Accepted'] | ['s005950643', 's472282425'] | [9040.0, 9088.0] | [21.0, 19.0] | [68, 83] |
p02639 | u055668401 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['N = int(input())\nnums = list(map(int, input().split()))\nnums.sort()\n\n\nnum_max = nums[-1]\nexist_counts = [0] * (num_max + 1)\nfor num in nums:\n \n if exist_counts[num]:\n exist_counts[num] = 2\n continue\n \n idx = num\n while idx < num_max:\n exist_counts[idx] += 1\n idx += num\n\n\ncount = 0\nfor num in nums:\n if exist_counts[num] == 1:\n count += 1\nprint(count)', 'lst = list(map(int, input().split()))\nprint(lst.index(0) + 1)'] | ['Runtime Error', 'Accepted'] | ['s777226380', 's530042206'] | [9196.0, 9100.0] | [23.0, 22.0] | [646, 61] |
p02639 | u057362336 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['x=list(map(int,input().split()))\nfor i in range(5):\n if x[i]==0:\n print(i)', 'x=list(map(int,input().split()))\nfor i in range(5):\n if x[i]==0:\n print(i+1)'] | ['Wrong Answer', 'Accepted'] | ['s833625685', 's073790605'] | [9160.0, 9100.0] | [21.0, 22.0] | [78, 80] |
p02639 | u057942294 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['l = list(map(int, input().split()))\n\nfor i in range(5):\n if l[i] == 0\n print(i + 1)', 'l = list(map(int, input().split()))\n \nfor i in range(5):\n if l[i] == 0:\n print(i + 1)\n '] | ['Runtime Error', 'Accepted'] | ['s510400242', 's805873752'] | [9020.0, 9156.0] | [20.0, 19.0] | [87, 98] |
p02639 | u060012100 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['for i in range (1,6):\n print(i)\n int x\n if(x(i) == 0):\n print(i)', 'for i in range (1,6):\n if(x(i) == 0):\n print(i)', '*x, = map(int,input().split())\nprint(x.index(0)+1)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s597397047', 's616662373', 's319251630'] | [8792.0, 9088.0, 9164.0] | [19.0, 24.0, 24.0] | [70, 51, 50] |
p02639 | u060793972 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | [' ', "print(input().split().index('0')+1)"] | ['Wrong Answer', 'Accepted'] | ['s510917207', 's198975656'] | [8948.0, 9020.0] | [24.0, 21.0] | [1, 35] |
p02639 | u062754605 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['X, N = map(int, input().split())\nif N > 0:\n l = list(map(int, input().split()))\n A = [0] * N\n for i in range(N):\n A[i] = abs(l[i] - X)\n S = A.count(0)\n if S == 0:\n print(X)\n else:\n for i in range(1, N):\n S = A.count(N)\n if S == 1:\n if l.count(X - 1) == 0:\n print(X - 1)\n break\n else:\n print(X + 1)\n break\n else:\n pass\nelse:\n print(X)\n', '\nl = list(map(int, input().split()))\n\nfor i in range(5):\n if l[i] == 0:\n print(i+1)\n'] | ['Runtime Error', 'Accepted'] | ['s905433092', 's737059047'] | [9208.0, 9044.0] | [23.0, 23.0] | [590, 94] |
p02639 | u065052748 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['nums = [int(x) for x in input()]\n\nfor i in range(5):\n if nums[i] == 0:\n print(i + 1)\n exit(0)\n', 'nums = [int(x) for x in input().split(" ")]\n\nfor i in range(5):\n if nums[i] == 0:\n print(i + 1)\n exit(0)\n'] | ['Runtime Error', 'Accepted'] | ['s316600506', 's123867837'] | [9096.0, 8972.0] | [27.0, 28.0] | [111, 122] |
p02639 | u068322747 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['g=[]\na, b, c, d, e = map(int,input().split())\nfor i in a, b, c, d, e, f:\n g.append(i)\nprint(g.index(0)+1)', 'g=[]\na, b, c, d, e, f = map(int,input().split())\nfor i in a, b, c, d, e, f:\n g.append(i)\nh=g.index(0)\nprint(h+1)', 'g=[]\na, b, c, d, e = map(int,input().split())\nfor i in a, b, c, d, e, f:\n g.append(i)\nh=g.index(0)\nprint(h+1)', 'g=[]\na, b, c, d, e = map(int,input().split())\nfor i in a, b, c, d, e:\n g.append(i)\nprint(g.index(0)+1)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s160681101', 's841315835', 's977052563', 's881579519'] | [9084.0, 9172.0, 9048.0, 9164.0] | [24.0, 18.0, 22.0, 19.0] | [108, 115, 112, 105] |
p02639 | u068538925 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['x,y = int(input().split())\n \nif x*4>y and y<x*2 and y%2 == 0:\n print("Yes")\nelse:\n print("No")', 'in_list = list(map(int, input().split()))\nfor i in range(5):\n if in_list[i] ==0:\n print(i)\n', 'C', 'in_list = list(map(int, input().split()))\nfor i in range(5):\n if in_list[i] ==0:\n print(i+1)'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s246175016', 's451564820', 's606201215', 's322474545'] | [8956.0, 8884.0, 8904.0, 9092.0] | [25.0, 23.0, 19.0, 26.0] | [96, 95, 1, 96] |
p02639 | u068844030 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['a, b, c, d, e = map(int, input().split())\nif a = 0:\n\tprint("1")\nelif b = 0:\n\tprint("2")\nelif c = 0:\n\tprint("3")\nelif d = 0:\n\tprint("4")\nelse:\n\tprint("5")\n \n ', "a, b, c, d, e = map(int,input().split())\nif a = 0:\n\u3000\u3000\u3000\u3000print(β1β)\nelif b = 0:\n\u3000\u3000\u3000\u3000print(β2β)\nelif c = 0:\n\u3000\u3000\u3000\u3000print(β3β)\nelif d = 0:\n\u3000\u3000\u3000\u3000print(β4β)\nelse: \n\u3000\u3000\u3000\u3000print('5')\n ", 'x = [int(i) for i in input().split()]\nprint(x.index(0) + 1)\n\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s114497128', 's735135779', 's502901856'] | [9016.0, 8912.0, 9096.0] | [19.0, 24.0, 21.0] | [163, 229, 61] |
p02639 | u069347602 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['a=map(int,input().split())\nfor i in range(1,6):\n if a[i-1]==0:\n print(i)\n break', 'a=list(map(int,input().split()))\nfor i in range(1,6):\n if a[i-1]==0:\n print(i)\n break'] | ['Runtime Error', 'Accepted'] | ['s643743725', 's514450333'] | [9032.0, 9160.0] | [22.0, 20.0] | [96, 102] |
p02639 | u069522822 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['x = list(map(int, input().split()))\n\nprint(x)\n', 'x = list(map(int, input().split()))\n \nfor a in range(len(x)):\n if x[a] == 0:\n print(a+1)\n '] | ['Wrong Answer', 'Accepted'] | ['s360497056', 's749056127'] | [9148.0, 9164.0] | [19.0, 20.0] | [46, 95] |
p02639 | u070069212 | 2,000 | 1,048,576 | We have five variables x_1, x_2, x_3, x_4, and x_5. The variable x_i was initially assigned a value of i. Snuke chose one of these variables and assigned it 0. You are given the values of the five variables after this assignment. Find out which variable Snuke assigned 0. | ['n = map(int, input().split())\nfor i in range(5):\n if n[i] == 0:\n print(i+1)\n\texit()', 'print(list(map(int, input().split())).index(0)+1)'] | ['Runtime Error', 'Accepted'] | ['s818317027', 's838113722'] | [8964.0, 9024.0] | [25.0, 27.0] | [87, 49] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.