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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03633 | u092926023 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n_in = int(input()) \nl = [int(input()) for i in range(n_in)] \n\np = l[0]\nfor i in range(1, len(l)):\n q = l[i]\n\n if p >= q:\n m = p\n n = q\n else:\n m = q\n n = p\n\n while True:\n mod_value = m % n\n\n if mod_value == 0:\n n = mod_value\n ... | ['Runtime Error', 'Accepted'] | ['s786869100', 's729015797'] | [3060.0, 3064.0] | [17.0, 17.0] | [376, 331] |
p03633 | u094191970 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['from fractions import gcd\n\nn=int(input())\nt=[int(input()) for i in range(n)]\n\nfor i in range(1,n):\n lcm=(t[i]*t[i-1]//gcd(t[i],t[i-1]))\n t[i]=lcm\nprint(lcm)', 'from fractions import gcd\n\nn=int(input())\nt=[int(input()) for i in range(n)]\n\nfor i in range(0,n-1):\n lcm=(t[i]*t[i+1]//gcd(t[i],t[i+1]... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s130052347', 's221315658', 's155146205'] | [5688.0, 5688.0, 9084.0] | [51.0, 51.0, 29.0] | [162, 166, 150] |
p03633 | u102461423 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\n\ndef gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n\nanswer = 0\nfor _ in range(N):\n answer = gcd(answer, int(input())\n \nprint(answer)', 'N = int(input())\n\ndef gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n\nanswer = 0\nfor _ in range(N):\n x = int(input())\n answe... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s422240989', 's835846220', 's151559449'] | [2940.0, 2940.0, 3060.0] | [18.0, 17.0, 17.0] | [166, 179, 179] |
p03633 | u104282757 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\n\na_list = []\nfor _ in range(N):\n a_list.append(int(input())\n\ndef gcd(a, b):\n if a < b:\n a, b = b, a\n if b == 0:\n return a\n c = a % b\n return gcd(b, c)\n\nres = 1\nfor i in range(N):\n d = gcd(res, a_list[i])\n res = res // d\n res = res * a_list[i]\n\... | ['Runtime Error', 'Accepted'] | ['s152455701', 's009551735'] | [2940.0, 3064.0] | [17.0, 17.0] | [312, 315] |
p03633 | u112465297 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a,b):\n a=min(a,b)\n b=max(a,b)\n while b:\n a,b= b, a%b\n return a\n\ndef lcm(a,b):\n return a*b//gcd(a,b)\n\nN=int(input())\nfor i in range(N):\n T.append(int(input()))\n\nans=1\nfor t in range(N):\n ans=lcm(ans,T[i])\n \nprint(ans)', 'def gcd(a,b):\n #a=min(a,b)\n ... | ['Runtime Error', 'Accepted'] | ['s306924390', 's460366555'] | [3060.0, 3060.0] | [17.0, 17.0] | [263, 253] |
p03633 | u114920558 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(x, y):\n while(x % y != 0 and y % x != 0):\n if(x > y):\n x = x % y\n else:\n y = y % x\n if(x > y):\n return y\n else:\n return x\n \nN = int(input())\nA = list()\nfor i in range(N):\n A.append(int(input()))\n\nans = 1\nfor i in range(N):\n gcd_i = gcd(A[i], ans)\n print(gcd_i)\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s163389912', 's192525657', 's636554485'] | [3064.0, 3064.0, 3060.0] | [18.0, 20.0, 18.0] | [339, 325, 325] |
p03633 | u116002573 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def main():\n N = int(input())\n T = []\n for _ in range(N):\n T.append(int(input()))\n\n if N == 1: return 0\n\n g = T[0]\n ans = T[0]\n for t in T[1:]:\n gc = gcd(t, g)\n g = g*t//gc\n return g\n\ndef gcd(a, b):\n if a > b:\n a, b = b, a\n if a == 0: return ... | ['Wrong Answer', 'Accepted'] | ['s057050312', 's978368276'] | [3060.0, 3064.0] | [18.0, 18.0] | [332, 382] |
p03633 | u120810144 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['from functools import reduce\n\ndef gcd(a, b):\n if b == 0:\n return a\n return gcd(b, a % b)\n\ndef lcm(a, b):\n return a * b // gcd(a, b)\n\nn = int(input())\nt = [int(input()) for i in range(n)]\n\nx = reduce(t, lcm)\n\nprint(x)\n\n', 'from functools import reduce\n\ndef gcd(a, b):\n if b == 0:\n return ... | ['Runtime Error', 'Accepted'] | ['s715476932', 's995307700'] | [3700.0, 3572.0] | [36.0, 23.0] | [224, 223] |
p03633 | u123756661 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n=int(input())\nans=1\nfor i in range(n):\n t=int(input())\n print(t)\n ans=lcm(ans,t)\nprint(ans)', 'def gcd(a,b): return a if b==0 else gcd(b,a%b)\ndef lcm(a,b): return a*b//gcd(a,b)\nn=int(input())\nans=1\nfor i in range(n):\n t=int(input())\n print(t)\n ans=lcm(ans,t)\nprint(ans)', 'def gcd(a,b)... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s654197429', 's691308668', 's089399915'] | [2940.0, 3060.0, 2940.0] | [17.0, 18.0, 17.0] | [101, 183, 170] |
p03633 | u123824541 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import fractions\n\nN = int(input())\nT = []\n\nfor i in range(N):\n T.append(int(input()))\n\nT.sort\na = T[0]\n\nfor i in range(N-1):\n gcd = fractions.gcd(a, T[i+1])\n a = int(a * T[i+1] / gcd)\n\nprint(int(a)) \n', 'N = int(input())\nT = []\n\nfor i in range(N):\n T.append(int(input()))\n\na = 1\n\nde... | ['Runtime Error', 'Accepted'] | ['s837673469', 's588041716'] | [5048.0, 3060.0] | [36.0, 17.0] | [209, 209] |
p03633 | u124762318 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\nt_list = [float(input()) for i in range(N)]\n\ndef gcd(a,b):\n\twhile b:\n\t\ta,b = b, a%b\n\treturn float(a)\n\na = t_list[0]\nfor c in range(N-1):\n\tb = t_list[c+1]\n\ta =a*b/gcd(a,b)\n\nprint(a)', 'N = int(input())\nt_list = [int(input()) for i in range(N)]\n\ndef gcd(a,b):\n\twhile b:\n\t\ta,b ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s176819958', 's980457839', 's943160433'] | [3060.0, 2940.0, 2940.0] | [2104.0, 2104.0, 18.0] | [197, 188, 189] |
p03633 | u131405882 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(x, y):\n\tif x < y:\n\t\tx, y = y, x\n\tif y == 0:\n\t\treturn x\n\tz = x % y\n\treturn gcd(y, z) \n\t\nN=int(input())\nprenum = 1\nfor i in range(N):\n\tT = int(input())\n\tlcm = prenum / gcd(prenum, T) * T\n\tprenum = lcm\nprint(str(lcm))', 'def gcd(x, y):\n\tif x < y:\n\t\tx, y = y, x\n\tif y == 0:\n\t\tre... | ['Runtime Error', 'Accepted'] | ['s435617204', 's652911260'] | [3944.0, 3060.0] | [75.0, 19.0] | [222, 218] |
p03633 | u137228327 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\nT = []\nfor i in range(N):\n T.append(int(input()))\ndef lcm(x, y):\n return (x * y) // math.gcd(x, y)\ng = lcm(T[0],T[1])\nif len(T) > 2:\n for i in range(N-1):\n g = lcm(g,T[i+1])\nprint(g)', 'import math\nN = int(input())\nT = []\n\ndef lcm(x, y):\n gc = math.gcd(x, y)\n ans... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s023815412', 's214632844', 's727272619'] | [9036.0, 9136.0, 9068.0] | [26.0, 29.0, 28.0] | [215, 323, 165] |
p03633 | u143492911 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a,b):\n if b==0:\n return a\n return (gcd(b,a%b))\ndef lcm(a,b):\n return a*b//gcd(a,b)\nn=int(input())\nif n==1:\n print(int(input()))\n exit()\nans=0 \nfor i in range(n):\n ans=lcm(ans,int(input()))\nprint(int(ans))\n', 'def gcd(a,b):\n if b==0:\n return a\n return (gcd... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s542669415', 's953482459', 's707212730'] | [3060.0, 3316.0, 3060.0] | [17.0, 24.0, 17.0] | [272, 237, 214] |
p03633 | u153902122 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import sys\nsys.setrecursionlimit(10**7)\nN = int(input())\nts = [int(input()) for _ in range(N)]\n\ndef gcd(a, b):\n if b==0:\n return a\n else:\n return gcd(b, b%a)\n\ndef lcm(a, b):\n g = gcd(a, b)\n return a * b // g\n\nl = 1\nfor t in ts:\n l = lcm(l, t)\n\nprint(l)', 'import sys\nsy... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s009983032', 's785860145', 's031937156'] | [3060.0, 3060.0, 3060.0] | [18.0, 17.0, 18.0] | [281, 281, 268] |
p03633 | u156314159 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\nTs = list(set([int(input()) for _ in range(N)]))\n\ndef get_divider(n):\n divider = set()\n for i in range(1, n):\n if i * i > n:\n break\n\n if n % i == 0:\n divider.add(i)\n if i != int(n / i):\n divider.add(int(n / i))\n retur... | ['Wrong Answer', 'Accepted'] | ['s205535864', 's853906327'] | [6808.0, 3316.0] | [2104.0, 21.0] | [454, 296] |
p03633 | u179169725 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\nT = []\nfor i in range(N):\n T.append(int(input()))\n\n\nimport numpy as np\nT = np.array(T)\n\n\nans = 1\n\nflg = True\nwhile(flg):\n for i in range(2, int(np.sqrt(max(T))) + 1):\n if sum(T % i) == 0:\n T = T // i\n # print(T)\n ans = ans * i\n ... | ['Wrong Answer', 'Accepted'] | ['s327061577', 's155902562'] | [14480.0, 3060.0] | [2109.0, 18.0] | [494, 306] |
p03633 | u180058306 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import numpy as np\n\nN = int(input())\n\narr_T = np.empty(N)\nfor i in range(N):\n arr_T[i] = int(input())\n\n\n\nmax_T = np.max(arr_T)\nlcm = max_T\n\nwhile True:\n \n bools = lcm % arr_T == 0\n if bools.all():\n break\n else:\n lcm += max_T\n\n\nprint(lcm)', 'import numpy as np\n\n\nde... | ['Wrong Answer', 'Accepted'] | ['s727236898', 's770526032'] | [14504.0, 12500.0] | [2109.0, 150.0] | [517, 772] |
p03633 | u191829404 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ["# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0\n# abcde\ts=input()\ts='abcde'\n# abcde\ts=list(input())\ts=['a', 'b', 'c', 'd', 'e']\n\n# 1 2\t| x,y = map(int,input().split()) |\tx=1,y=2\n\n\n\n\n# INPUT\n# 3\n# hoge\n# foo\n# bar\n# ANSWER\n# n=int(input())\n\n\n\nfrom collections import defaultdict, Cou... | ['Runtime Error', 'Accepted'] | ['s664649300', 's719531830'] | [12900.0, 20816.0] | [231.0, 318.0] | [1078, 1089] |
p03633 | u215315599 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['sys.setrecursionlimit(100000)\ndef lcm(x,y):\n return (x*y)//gcd(x,y)\n\ndef gcd(x,y):\n if y <= 0:\n return x\n else:\n return gcd(y,x%y)\n\nN = int(input())\nT = [int(input()) for _ in range(N)]\nans = lcm(T[0],T[1])\nfor i in range(2,N):\n ans = lcm(ans,T[i])\nprint(ans)', 'import sys\nim... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s717694376', 's741463401', 's782681218', 's735584986'] | [3064.0, 3060.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0] | [285, 318, 316, 354] |
p03633 | u216289806 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a,b):\n return b\n\ndef lcm(a,b):\n c=gcd(a,b);\n return a/c*b\n\n\n\nn=int(input())\nt=[0]*n\n\nfor lop2 in range(n):\n t[lop2]=int(input())\n\nans=t[0]\n\nfor lop in range(1,n):\n ans=lcm(ans,t[lop])\nprint(int(ans))', 'import gcc\n\ndef gcd(a,b):\n if a<b:\n c=a;\n a=b;\n ... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Run... | ['s247833581', 's287376330', 's311997503', 's333438983', 's438917650', 's441494950', 's453578379', 's462863339', 's476965047', 's484140869', 's497119869', 's519430056', 's522254117', 's599780751', 's617709332', 's685024597', 's702319523', 's769382992', 's773285224', 's778844947', 's807653141', 's814093433', 's819548031... | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3060.0, 3064.0, 3060.0, 3060.0, 2940.0, 3064.0, 3064.0, 3060.0, 3060.0, 3064.0, 3064.0, 3060.0, 3952.0, 3064.0, 3064.0, 2940.0, 3064.0, 3060.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0, 17.0, 17.0, 17.0, 17.0, 18.0, 17.0, 17.0, 17.0, 75.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [222, 350, 334, 328, 335, 430, 189, 430, 249, 185, 139, 283, 327, 284, 268, 334, 188, 229, 345, 357, 348, 81, 352, 229, 325, 326, 518] |
p03633 | u231685196 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import math\nn = int(input())\ns = int(input())\ndef gcd_core(a, b):\n if b == 0:\n return a\n else:\n return gcd_core(b, a % b)\nfor i in range(1,n):\n t = int(input())\n s = (s*t)//math.gcd_core(s,t)\n\nprint(s)', 'n = int(input())\ns = int(input())\ndef gcd_core(a, b):\n if b == 0:\n ... | ['Runtime Error', 'Accepted'] | ['s953903857', 's581174682'] | [3060.0, 2940.0] | [17.0, 17.0] | [227, 210] |
p03633 | u238510421 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import sys\nsys.setrecursionlimit(10**7)\nN = int(input())\nts = [int(input()) for _ in range(N)]\n\ndef gcd(a,b):\n if b == 0:\n return a\n return gcd(b,a%b)\n\ndef lcm(a,b):\n g = gcd(a,b)\n return a/g*b\n\nl = 1\nfor t in ts:\n l = lcm(l,t)\n \nprint(l)', 'import sys\nsys.setrecursionlimit... | ['Runtime Error', 'Accepted'] | ['s859920958', 's029030271'] | [683764.0, 3060.0] | [1318.0, 17.0] | [263, 268] |
p03633 | u239316561 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd (num1,num2):\n tmp = max(num1,num2) % min(num1,num2)\n if tmp == 0:\n return min(num1,num2)\n return gcd(min(num1,num2),tmp)\n\n\nn = int(input())\nt = []\nstock = [1]\nfor i in range(n):\n t.append(input())\n\nfor i in range(len(t)-1):\n stock.append(t[i] * t[i+1] / gcd(stock[i],t[i]))\... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s335315990', 's736546976', 's746883225', 's881647729', 's884368464', 's205294471'] | [3064.0, 2940.0, 3948.0, 3064.0, 3060.0, 3060.0] | [17.0, 18.0, 73.0, 17.0, 17.0, 17.0] | [389, 306, 229, 320, 216, 216] |
p03633 | u239375815 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['cl = [int(input()) for i in range(int(input()))]\nans = 1\n\ndef gcd(a, b):\n\twhile b:\n\t\ta, b = b, a % b\n\treturn a\n\ndef lcm(a, b):\n\treturn a * b // gcd (a, b)\n\nfor i in cl:\n ans = lcm(ans,i)\n print(ans)\n\nprint(ans)\n', 'cl = [int(input()) for i in range(int(input()))]\nans = 1\n\ndef gcd(a, b):\... | ['Wrong Answer', 'Accepted'] | ['s221086282', 's774988978'] | [3060.0, 3060.0] | [17.0, 17.0] | [217, 202] |
p03633 | u240793404 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import math\ninput()\nlc = 1\nfor i in range(n):\n t = int(input())\n lc = lc * t // math.gcd(lc,t)\nprint(lc)', 'import math\ninput()\nt = list(map(int,input().split()))\nlc = 1\nfor i in t:\n lc = lc * t // math.gcd(lc,t)\nprint(lc)', 'def gcd(a, b):\n while b:\n a, b = b, a % b\n return a\nn ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s058974201', 's904194073', 's934614662'] | [3060.0, 3060.0, 2940.0] | [18.0, 17.0, 17.0] | [110, 117, 167] |
p03633 | u252828980 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n = int(input())\n\nli = []\nfor i in range(n):\n li.append(int(input()))\n\ndef gcd1(a,b):\n while b:\n a,b = b,a%b\n return a\n\ndef lcm1(a,b):\n return a*b//gcd1(a,b)\nnum = 1\nfor i in range(2,len(li)):\n num = lcm1(num,li[i])\nprint(num)\n ', 'n = int(input())\n\ndef gcd1(a,b):\n while b:\n a,b ... | ['Wrong Answer', 'Accepted'] | ['s275881847', 's055100262'] | [3060.0, 2940.0] | [17.0, 18.0] | [241, 186] |
p03633 | u267300160 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import fractions\nN = int(input())\nans = 1\n\ndef lcm(x,y):\n return (int(x*y/fractions.gcd(x,y)))\n\nfor i in range(N):\n ans = lcm(ans,int(input()))\n\nprint(ans)\n', 'N = int(input())\nans = int(input())\n\ndef gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n\ndef lcm(x,y):\n return (x*y//gcd... | ['Runtime Error', 'Accepted'] | ['s271704076', 's935723083'] | [5304.0, 2940.0] | [39.0, 17.0] | [162, 215] |
p03633 | u296518383 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N=int(input())\nT=[int(input()) for _ in range(N)]\nT=list(set(T))\nprint(T)\n\ndef gcd(a,b):\n if b==0:\n return a\n else:\n return gcd(b,a%b)\n\nans=T[0]\nfor i in range(N):\n #print(ans)\n ans=ans*T[i]//gcd(ans,T[i])\nprint(ans)', 'N=int(input())\nT=[int(input()) for _ in range(N)]\nT=list(set(T))\nN=len... | ['Runtime Error', 'Accepted'] | ['s446833156', 's747893295'] | [3064.0, 3064.0] | [18.0, 18.0] | [226, 236] |
p03633 | u301823349 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\nT = []\nfor _ in range(N):\n T.append(int(input()))\nfor x in range(1,10**8):\n for y in T:\n z = 0\n z += x % y\n if z == 0:\n print(x)\n break\n \n', 'N = int(input())\nT = []\nfor _ in range(N):\n T.append(int(input()))\n\ndef gcd(a, b):\n\twhile b:\n\t\... | ['Wrong Answer', 'Accepted'] | ['s377817920', 's211481223'] | [2940.0, 3060.0] | [2104.0, 17.0] | [195, 318] |
p03633 | u314050667 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import sys\nimport math\nif N == 1:\n\tprint(T[0])\n\tsys.exit()\ndef GCD(a,b):\n\tif b == 0:\n\t\treturn a\n\treturn GCD(b,a%b)\n\nN = int(input())\nT = [int(input()) for _ in range(N)]\n\ndef SKS(a,b):\n\treturn (a*b)//GCD(a,b)\n\nfor i in range(1,N):\n\tif i == 1:\n\t\ttemp = SKS(T[0], T[1])\n\t\tcontinue\n\n\ttem... | ['Runtime Error', 'Accepted'] | ['s294193307', 's970697952'] | [3064.0, 3064.0] | [17.0, 18.0] | [316, 316] |
p03633 | u333768710 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ["import fractions\n\n\ndef lcm(a, b):\n return a * b / fractions.gcd(a, b)\n\n\ndef list_lcm(number_list):\n lcm_number = 1\n for j in range(len(number_list)):\n lcm_number = lcm(lcm_number, number_list[j])\n\n return lcm_number\n\n\nif __name__ == '__main__':\n number_count = int(input())\n n... | ['Wrong Answer', 'Accepted'] | ['s127934497', 's040392017'] | [5084.0, 3060.0] | [2104.0, 17.0] | [418, 457] |
p03633 | u338225045 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int( input() )\nT = [ int( input() ) for _ in range(N) ]\n\n\n\n\n\ndef GCD( a, b ):\n if b == 0: return a\n return GCD(b, a%b)\n\n\ndef LCM( a, b ):\n return a*b / GCD(a,b)\n\n\nans = LCM( T[0], T[1] )\nfor i in range(2,N):\n ans = LCM( ans, T[i] )\nprint( ans )', 'import functools\n\nN = int( input(... | ['Runtime Error', 'Accepted'] | ['s039487693', 's692181233'] | [3952.0, 3572.0] | [78.0, 23.0] | [433, 414] |
p03633 | u353241315 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ["import sys\n\nsys.setrecursionlimit = 10000000\n\ndef get_gcd(A, B):\n r = A%B\n if r == 0:\n return B\n else:\n return get_gcd(B, r)\n \nif __name__ == '__main__':\n N = int(input())\n T = [int(input()) for _ in range(N)]\n \n ans = 1\n for n in range(N):\n gcd ... | ['Wrong Answer', 'Accepted'] | ['s654415750', 's141814787'] | [3060.0, 3060.0] | [17.0, 18.0] | [378, 360] |
p03633 | u364618491 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a, b):\n if b == 0:\n return a\n return gcd(b, a % b) \n\nn=int(input())\np=1\nfor i in range(n):\n m=int(input())\n p=p*m/gcd(p,m)\nprint(p)', 'def gcd(a, b):\n if b == 0:\n return a\n return gcd(b, a % b) \n \nn=int(input())\np=1\nfor i in range(n):\n m=int(input())\n p=p*m//gcd(p,m)\nprin... | ['Runtime Error', 'Accepted'] | ['s178856171', 's913454517'] | [3944.0, 2940.0] | [72.0, 18.0] | [148, 155] |
p03633 | u371763408 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n = int(input())\nT=[int(input()) for i in range(n)]\nT = sorted(T,reverse=True)\n\nfor i in range(2,100):\n if T[0] % T[1] !=0:\n if sum(map(lambda x:T/2, T)) !=0:\n T[0] = T[0]*i\n else:\n print(T[0])\n exit()\n', 'n = int(input())\nT=[int(input()) for i in range(n)]\nT = sorted(T,reverse=True)\n\nf... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s870133444', 's931723185', 's298003604'] | [3060.0, 3064.0, 3060.0] | [18.0, 19.0, 18.0] | [218, 234, 242] |
p03633 | u387110752 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import urllib.request\nfrom bs4 import BeautifulSoup\nimport re\nimport sys\nimport os\nimport time\nimport subprocess\nimport datetime\n\n\ndef gcd(a, b):\n if a < b:\n c = a\n a = b\n b = c\n\n r = a % b\n\n while r > 0:\n a = b\n b = r\n r = a % b\n\n return b\... | ['Runtime Error', 'Accepted'] | ['s393922267', 's254251396'] | [9456.0, 3064.0] | [133.0, 17.0] | [745, 615] |
p03633 | u393512980 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a, b):\n if b == 0:\n return a\n return gcd(b, a % b)\n\ndef lcm(a, b):\n return a * b // gcd(a, b)\n\nimport sys\ninput = sys.stdin.readline\nN = int(input())\nT = [int(input()) for _ in range(N)]\nif N == 1:\n ans = T[0]\nelse:\n ans = lcm(T[0], T[1])\n for i in range(2, N):\n an... | ['Runtime Error', 'Accepted'] | ['s129895697', 's418735600'] | [2940.0, 3060.0] | [17.0, 17.0] | [330, 347] |
p03633 | u410996052 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['s=set()\nn=int(input())\nfor i in range(n):\n s.add(int(input()))\nwhile len(s) != 1:\n l=list(cb(s,2))\n s = set([lcm(x,y) for x,y in l])\nprint(list(s)[0])', 'def gcd(a, b):\n while b > 0:\n a, b = b, a%b\n return a\ndef lcm(a, b):\n return a*b//gcd(a, b)\nn=int(input())\nt=[int(input()) fo... | ['Runtime Error', 'Accepted'] | ['s949836555', 's360231200'] | [3060.0, 3064.0] | [17.0, 17.0] | [159, 222] |
p03633 | u411858517 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import math\nfrom functools import reduce\n\nN = int(input())\nL = [ int(input()) for i in range(N)]\n\n\ndef lcm_list(numbers):\n return reduce(lcm_base, numbers, 1)\n\nprint(lcm_list(L))', '\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\n\ndef lcm(a, b):\n return a * b // gcd (a, b)\n... | ['Runtime Error', 'Accepted'] | ['s848158840', 's015889333'] | [3572.0, 3060.0] | [23.0, 18.0] | [181, 288] |
p03633 | u415905784 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import functools\nN = int(input())\nT = []\nfor i in range(N):\n T.append(int(input()))\n\ndef gcd(a, b):\n if a < b:\n a, b = b, a\n if b == 0:\n return a\n return gcd(b, b % a)\n \ndef lcm(A, B):\n return (A // gcd(A, B)) * B\n \nprint(functools.reduce(lcm, T))', 'import math\nimport functools\nN = int(i... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s083666530', 's252908653', 's379904881', 's960432154', 's000762615'] | [3572.0, 3572.0, 3812.0, 3572.0, 3572.0] | [22.0, 23.0, 24.0, 23.0, 23.0] | [258, 290, 280, 256, 259] |
p03633 | u463655976 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\n\ndef gcd(x, y):\n if y == 0:\n return x\n else:\n return gcd(y, x % y)\n\ng = 1\nfor x in (int(input()) for _ in range(N)):\n g = g * x / gcd(g, x)\nprint(g)\n', 'N = int(input())\n\ndef gcd(x, y):\n if y == 0:\n return x\n else:\n return gcd(y, x % y)\n\ng = 0\nfor x in (int(input... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s024111096', 's288743851', 's311250559', 's360451544'] | [3948.0, 2940.0, 2940.0, 2940.0] | [74.0, 17.0, 17.0, 18.0] | [175, 167, 172, 176] |
p03633 | u469281291 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a, b):\n while a != b:\n if (a != 1 and b != 1):\n if a < b:\n b = b % a\n elif a > b:\n a = a % b\n else:\n break\n if (a == 1 or b == 1):\n return 1\n else:\n return a\n\ndef lcm(a, b):\n return (a... | ['Time Limit Exceeded', 'Wrong Answer', 'Accepted'] | ['s104646541', 's529400369', 's617362659'] | [3064.0, 37236.0, 2940.0] | [2104.0, 2104.0, 17.0] | [426, 268, 223] |
p03633 | u473999868 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import math as m\nfrom functools import reduce\n\nn=int(input())\nl=set([])\ndef gcd(a,b):\n a1=a\n b1=b\n if b%a==0 :\n return b\n if a%b==0:\n return a\n while a != 0:\n c = a\n a = b % a\n b = c\n return a1*b1/b\n\nfor i in range(n):\n l.add(int(input()))\npr... | ['Wrong Answer', 'Accepted'] | ['s992061171', 's227715991'] | [3828.0, 3700.0] | [2104.0, 23.0] | [325, 286] |
p03633 | u480472958 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a,b):\n while b:\n a, b = b, a % b\n return max(a,b)\n\ndef lcd(a,b):\n return a * b / gcd(a,b)\n\n\nn = int(input())\nt = [int(input()) for i in range(n)]\nans = 1\nfor i in t:\n ans = lcd(i, ans)\nprint(ans)', 'def gcd(a,b):\n while b:\n a, b = b, a % b\n return a\n\ndef lcd(... | ['Wrong Answer', 'Accepted'] | ['s259386290', 's953102694'] | [3060.0, 3060.0] | [2104.0, 19.0] | [222, 220] |
p03633 | u495415554 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['A, B, C, D = map(int, input().split())\nvalue = min(B, D) - max(A, C)\nprint(value if value > 0 else "0")\n\n', '\n\n@profile\ndef gcd(list, n):\n if n == 0:\n return list[0]\n else:\n a, b = list[n-1], list[n]\n \n while list[n]:\n list[n-1], list[n] = list[n], list[n-1] ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s122641556', 's625186267', 's145077501'] | [2940.0, 3064.0, 3060.0] | [17.0, 17.0, 17.0] | [105, 416, 272] |
p03633 | u503901534 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n = int(input())\ntt = []\nfor i in range(n):\n tt.append(int(input()))\n \nss = int(1)\n\nfor i in tt:\n p = []\n p.append(ss)\n p.append(i)\n q = list(sorted(p))\n while q[1] % q[0] != 0:\n r = [q[1] % q[0] , q[0]]\n s = list(sorted(r))\n q[0] = s[0]\n q[1] = s[1]\n ... | ['Runtime Error', 'Accepted'] | ['s477492991', 's546077492'] | [3064.0, 3064.0] | [19.0, 17.0] | [369, 364] |
p03633 | u513081876 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | [' = int(input())\nT = sorted([int(input()) for i in range(N)])\n\ndef gcd(a, b):\n while b != 0:\n a, b = b,a%b\n return a\n\nif N == 1:\n print(T[0])\nelse:\n ans = T[0]\n for i in range(1, N):\n ans = (ans*T[i])//(gcd(ans, T[i]))\n \n print(ans)', 'N = int(input())\nT = set([int(in... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s013120480', 's675364745', 's379849233'] | [2940.0, 3700.0, 9168.0] | [17.0, 2108.0, 31.0] | [266, 301, 136] |
p03633 | u521902517 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\na = [int(input()) for x in range(N)]\nprint(a)\n\nans = max(a)\nmx = max(a)\niteration = 1 \nwhile (ans < 10^18):\n flag = True \n for item in a:\n if not (ans%item == 0):\n flag = False\n if flag:\n print(ans)\n break\n else:\n iteration = iteration... | ['Wrong Answer', 'Accepted'] | ['s593415153', 's967003013'] | [3064.0, 3060.0] | [17.0, 18.0] | [335, 208] |
p03633 | u530335051 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import fractions\n\ndef lcm(n, m):\n return int(n * m / fractions.gcd(n, m))\n\n\nn = int(input())\nt = []\nfor i in range(0, n):\n t.append(int(input()))\nt_sorted = sorted(t)\n\ntime = 0\nfor i in range(0, n):\n if i == 0:\n time = t_sorted[0]\n else:\n time = lcm(int(time), t_sorted[i])\n... | ['Runtime Error', 'Accepted'] | ['s756585761', 's189243147'] | [5048.0, 3064.0] | [36.0, 17.0] | [317, 403] |
p03633 | u549383771 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['for i in range(len(t_list)):\n if i == 0:\n continue\n elif i == 1:\n ans_list.append(lcm(t_list[0] , t_list[1]))\n \n else:\n ans_list.append(lcm(ans_list[i-2],t_list[i]))\n \nprint(ans_list[-1])', 'def fcd(a , b):\n if a>= b:\n while b != 0:\n a,b = b,a%b... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s741352865', 's742873845', 's204813125'] | [3060.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0] | [227, 516, 587] |
p03633 | u553348533 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\nlistClock = [int(input()) for i in range(N)]\ndef gcd(x, y):\n while y > 0:\n x, y = y, x%y\n return x\n\ndef lcm(x, y):\n return x/gcd(x, y)*y\n\nans = 1\n\nfor i in listClock:\n ans = lcm(ans,i)\n\nprint(ans)', 'N = int(input())\nlistClock = [int(input()) for i in range(N)]\n\nd... | ['Wrong Answer', 'Accepted'] | ['s980799963', 's382748107'] | [3060.0, 3060.0] | [18.0, 18.0] | [232, 322] |
p03633 | u555947166 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def GCD(x: int, y: int):\n if x < y:\n x, y = y, x\n\n if x % y == 0:\n return y\n else:\n return GCD(y, x % y)\n\n\ndef LCM(x: int, y: int):\n return x * y // GCD(x, y)\n\n\nN = int(input())\nTlist = [int(input()) for i in range(N)]\nans = 1\nfor num in Tlist[1:]:\n ans = LCM(ans,... | ['Wrong Answer', 'Accepted'] | ['s071655149', 's622247128'] | [3060.0, 3060.0] | [19.0, 21.0] | [317, 313] |
p03633 | u557171945 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n = int(input())\nt = list(int(input()) for i in range(n))\nmxt = max(t)\nls = []\nans = 0\nj = 0\nmod_flag = False\n\nfor i in range(n):\n if not mxt % t[i] == 0:\n mod_flag = True\n ls.append(t[j])\n j+=1\n \nif mod_flag:\n ans = mxt\n\nif ans == 0:\n ans = 1\n for i in range(len... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s590471241', 's655971121', 's250066810'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 18.0] | [358, 540, 517] |
p03633 | u559250296 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n = int(input())\nlis = []\nfor i in range(n):\n lis.append(int(input()))\ndef lcm(*numbers):\n return reduce(lcm_base, numbers, 1)\nprint(lcm(lis))', 'import math\nfrom functools import reduce\nn = int(input())\nlis = []\nfor i in range(n):\n lis.append(int(input()))\ndef lcm_base(x, y):\n return (x * y)... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s129586478', 's184965161', 's529507410', 's187871646'] | [9116.0, 9468.0, 9164.0, 27084.0] | [26.0, 29.0, 28.0, 117.0] | [148, 312, 90, 118] |
p03633 | u560988566 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import fractions\n\ndef main():\n n = int(input())\n ans = 1\n for _ in range(n):\n t = int(input())\n ans = ans*t/fractions.gcd(ans,t)\n print(int(ans))\n\n\nif __name__ == "__main__":\n main()\n', 'import fractions\n\ndef lcm(a,b):\n return a * b / fractions.gcd(a, b)\n\ndef main():\... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s025514624', 's646157683', 's647435773', 's730505599', 's968343185', 's663607085'] | [5560.0, 5560.0, 5600.0, 5048.0, 5432.0, 3060.0] | [2104.0, 2104.0, 2104.0, 2104.0, 2104.0, 17.0] | [212, 277, 272, 243, 225, 237] |
p03633 | u588341295 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['# -*- coding: utf-8 -*-\n\nimport fraction\nfrom functools import reduce\n\nN = int(input())\nTN = [int(input()) for i in range(N)]\n\n\ndef lcm_base(x, y):\n return (x * y) // fraction.gcd(x, y)\ndef lcm_list(numbers):\n return reduce(lcm_base, numbers, 1)\n\nprint(lcm_list(TN))', '# -*- coding: utf-8 -*-\n\nf... | ['Runtime Error', 'Accepted'] | ['s310386002', 's068580201'] | [2940.0, 3572.0] | [17.0, 23.0] | [328, 370] |
p03633 | u598229387 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import fractions\nn=int(input())\nt=[int(input()) for i in range(n)]\nt.sort()\nfor i in range(n-1):\n f1=fractions.gcd(t[i],t[i+1])\n f2=t[i]*t[i+1]//f1\nprint(f2)', 'import fractions\nn=int(input())\nt=[int(input()) for i in range(n)]\nt.sort()\ncheck=t[0]\nfor i in range(n-1):\n f1=fractions.gcd(t[i],t[i+... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s019071493', 's420407450', 's564514177', 's461273088'] | [5304.0, 5048.0, 5048.0, 3064.0] | [38.0, 35.0, 35.0, 18.0] | [163, 188, 187, 246] |
p03633 | u599114793 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n = int(input())\nimport functools\nfrom functools import reduce\n\ndef gcd(numbers):\n return reduce(functools.gcd, numbers)\n\ndef lcm_base(x, y):\n return x // functools.gcd(x, y) * y\n\ndef lcm(numbers):\n return reduce(lcm_base, numbers, 1)\n\n\nnum = []\nfor i in range(n):\n num.append(int(input()))... | ['Runtime Error', 'Accepted'] | ['s717967950', 's911539163'] | [3700.0, 2940.0] | [23.0, 18.0] | [319, 228] |
p03633 | u599547273 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import fraction\n\ndef lcm(a, b):\n\treturn a * b // fraction.gcd(a, b)\n\nn = int(input())\nt = [int(input()) for i in range(n)]\n\nans = t[0]\nfor t_i in t[1:]:\n\tans = lcm(ans, t_i)\n\nprint(ans)', 'def gcd(a, b):\n\twhile b:\n\t\ta, b = b, a % b\n\treturn a\n\ndef lcm(a, b):\n\treturn a * b // gcd(a, b)\n\nn = i... | ['Runtime Error', 'Accepted'] | ['s043373552', 's665270281'] | [2940.0, 3060.0] | [17.0, 17.0] | [185, 213] |
p03633 | u620868411 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['# -*- coding: utf-8 -*-\n\nn = int(input())\nt = []\nfor _ in range(n):\n t.append(int(input()))\n\ndef gcd(a, b):\n if b==0:\n return a\n return gcd(b, a%b)\n\ndef lcm(a,b):\n return a*b/gcd(a,b)\n\ndef lcmary(x, t):\n if len(t)==0:\n return x\n elif len(t)==1:\n return lcm(x,t... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s218357305', 's483777783', 's723270802', 's733414317', 's583255647'] | [4072.0, 3944.0, 3960.0, 3948.0, 3060.0] | [76.0, 75.0, 75.0, 74.0, 18.0] | [401, 233, 401, 233, 269] |
p03633 | u624475441 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a, b):\n while b:\n a, b = b, a % b\n return b\n\nans = 1\nfor _ in range(int(input())):\n t = int(input())\n ans = ans * t // gcd(ans, t)\nprint(ans)', 'def gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\nans = 1\nfor _ in range(int(input())):\n t = int(input())\n ... | ['Runtime Error', 'Accepted'] | ['s976714599', 's258351567'] | [2940.0, 2940.0] | [17.0, 17.0] | [168, 168] |
p03633 | u626468554 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a,b):\n if a<b:\n a,b = b,a\n if b==0:\n return a\n else:\n return gcd(b,a%b)\n\nn = int(input())\nli = [int(input()) for _ in range(n)]\n\nans = 1\nfor i in range(n):\n ans = gcd(ans,li[i])\nprint(ans)', 'def gcd(a,b):\n if a<b:\n a,b = b,a\n if b==0:\n re... | ['Wrong Answer', 'Accepted'] | ['s800769784', 's983512371'] | [3060.0, 3060.0] | [17.0, 17.0] | [229, 273] |
p03633 | u638795007 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ["def gcd(a,b):\n if a>b :\n while b!=0:\n a,b = b,a%b\n return a\n elif a==b:\n return a\n else :\n while a!=0:\n a,b = b%a,a\n return b\ndef lcm(n,A):\n gcdn = [0]*n\n lcmn = [0]*n\n gcdn[0]=A[0]\n lcmn[0]=A[0]\n for i in range(n-1):\n ... | ['Wrong Answer', 'Accepted'] | ['s794146435', 's175954533'] | [3444.0, 3444.0] | [2104.0, 23.0] | [840, 615] |
p03633 | u642905089 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a,b):\n if b == 0:\n return a\n else:\n return gcd(b, a % b)\n \nN = int(input())\nTs = [None for i in range(N)]\n\na = input()\nb = 0\nfor i in range(N-1):\n b = int(input())\n a = (a*b) // gcd(a,b)\n \nprint(a)', 'def gcd(a,b):\n if b == 0:\n return a\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s837573837', 's713632466'] | [417012.0, 2940.0] | [149.0, 18.0] | [237, 213] |
p03633 | u644778646 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import math\ndef lcm(a,b):\n return (a*b)/int(ath.gcd(a,b))\n\nN = int(input())\nT = []\nfor i in range(N):\n T.append(int(input()))\n\nans = T[0]\nfor i in range(1,N):\n ans = int(lcm(ans,T[i]))\nprint(int(ans))\n', 'def gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n\n\ndef lcm(a,b):\n retu... | ['Runtime Error', 'Accepted'] | ['s915059358', 's455898878'] | [3060.0, 3060.0] | [18.0, 18.0] | [210, 240] |
p03633 | u648901783 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\nle = [int(input()) for i in range(N)]\nle.sort()\n\n\n\n\ndef GCD(a,b):\n if b == 0:\n return a\n return GCD(b,a%b)\n\n\ndef LCM(a,b):\n return int(a*b//GCD(a,b))\n\ndef multi_LCM(le):\n print(le)\n if len(le)==1:\n return \n mxle=le[-1]\n del(le[-1])\n le[-1]=L... | ['Wrong Answer', 'Accepted'] | ['s570824588', 's421974024'] | [3188.0, 3064.0] | [18.0, 17.0] | [651, 651] |
p03633 | u665038048 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['from fractions import gcd\nN = int(input())\nT = [0]*N\nfor i in range(N):\n T[i] = int(input())\ndef lcm(a, b):\n return int((a*b)/gcd(a, b))\nlcm_ans = lcm(T[0], T[1])\nfor i in range(N):\n lcm_ans = lcm(T[i], lcm_ans)\nprint(lcm_ans)', 'from functools import reduce\nN = int(input())\nT = [0]*N\nfor i in r... | ['Runtime Error', 'Accepted'] | ['s572001775', 's165154145'] | [5304.0, 3572.0] | [38.0, 23.0] | [235, 230] |
p03633 | u665415433 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import copy\nN = int(input())\nT = [int(input()) for i in range(N)]\nt = copy.deepcopy(T)\nprint(t ,T)\nfor i in range(N):\n print(i)\n if i != N-1:\n while t[i] != t[i+1]:\n if t[i] < t[i+1]:\n t[i] = t[i] + T[i]\n elif t[i] > t[i+1]:\n t[i+1] = t[i+1]... | ['Wrong Answer', 'Accepted'] | ['s903992671', 's261884444'] | [3444.0, 2940.0] | [2104.0, 17.0] | [348, 231] |
p03633 | u676264453 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['from functools import reduce\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\ndef lcm(a, b):\n return a * b / gcd(a,b)\n\nN = int(input())\nTs = []\nfor i in range(N):\n Ts.append(int(input()))\n\nc = 1\nfor T in Ts:\n c = lcm(c, T)\n\nprint(c)\n', 'from functools import reduce\n\nde... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s096726500', 's243648835', 's796184251', 's167329320'] | [3572.0, 3572.0, 2940.0, 3060.0] | [2104.0, 2104.0, 17.0, 17.0] | [260, 256, 280, 271] |
p03633 | u677121387 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(x,y):\n if y == 0:\n return x\n else:\n return gcd(y,x%y)\n\nn = int(input())\nt = [int(input()) for i in range(n)]\n\nif n == 1:\n ans = t[0]\nelse:\n lcd = t[0]*t[1]/gcd(t[0],t[1])\n for i in range(2,n):\n lcd = lcd*t[i]/gcd(lcd,t[i])\n ans = lcd\n \nprint(ans)', 'd... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s168545340', 's431551710', 's822664190'] | [4068.0, 3952.0, 3060.0] | [72.0, 75.0, 18.0] | [296, 234, 245] |
p03633 | u692515710 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import sys\nimport fractions\nsys.setrecursionlimit(200000000)\n\nN = int(input())\nNUMS = [int(input()) for _ in range(N)]\nNUMS = list(set(NUMS))\n\ndef gcd(num1, num2):\n if num2 == 0:\n return num1\n else:\n return gcd(num2, num1 % num2)\n\n\nres = NUMS[0]\nfor num in NUMS[1:]:\n res = res ... | ['Wrong Answer', 'Accepted'] | ['s672720024', 's409814548'] | [5048.0, 3188.0] | [2104.0, 19.0] | [357, 323] |
p03633 | u695079172 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['from functools import reduce\ndef gcd(a,b):\n while b!=0:\n a,b=b,a%b\n return a\n\n\n\ndef lcm(a,b):\n return a * b//gcd(a,b) a\n\n\nif __name__ == "__main__":\n n = int(input())\n lst = []\n for i in range(n):\n lst.append(int(input()))\n print(reduce(lcm,lst))\n\n\n\n', 'from functools imp... | ['Runtime Error', 'Accepted'] | ['s079217628', 's595602439'] | [2940.0, 3572.0] | [17.0, 23.0] | [291, 289] |
p03633 | u696449926 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\nT = [0]*N\n\nfor i in range(N):\n\tT[i] = int(input())\n\n\n\ndef gcd(a, b):\n\tr = max(a, b) % min(a, b)\n\t\n\n\n\tif (r == 0):\n\t\treturn max(a, b)\n\n\telse:\n\t\treturn r * min(a, b) // gcd(r, min(a, b))\n\n\n\n\ndef GCD(T):\n\tl = len(T)\n\n\n\n\tif(l == 1):\n\t\treturn T[0]\n\n\telif(l == 2)... | ['Wrong Answer', 'Accepted'] | ['s734084917', 's674352757'] | [3064.0, 3064.0] | [18.0, 18.0] | [471, 647] |
p03633 | u705974985 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import functools\nN = int(input())\nT = []\nfor i in range(N):\n T.append(int(input()))\n\ndef gcd(a, b):\n if a < b:\n a, b = b, a\n if b == 0:\n return a\n return gcd(b, b % a)\n \ndef lcm(A, B):\n return A * (B // gcd(A, B))\n \nprint(functools.reduce(lcm, T))\n', 'import functools\nN = int(input())\nT ... | ['Wrong Answer', 'Accepted'] | ['s285186412', 's163336785'] | [3572.0, 3572.0] | [22.0, 23.0] | [259, 257] |
p03633 | u711539583 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n = int(input())\ndef gcd(a, b):\n if not b:\n return a\n else:\n return gcd(b, a % b)\ndef lcm(a, b):\n return a * b / gcd(a, b)\nans = 1\nfor _ in range(n):\n c = int(input())\n ans = lcm(ans, c)\nprint(ans)', 'n = int(input())\ndef gcd(a, b):\n if not b:\n return a\n else:\n return gcd(b, a % b)... | ['Runtime Error', 'Accepted'] | ['s078986646', 's488699762'] | [3948.0, 2940.0] | [74.0, 18.0] | [208, 210] |
p03633 | u728566015 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import math\nfrom fractions import gcd\nfrom functools import reduce\n\nN = int(input())\nT = [int(input()) for i in range(N)]\n\n\ndef gcd(numbers): # "numbers" is list\n return reduce(gcd, numbers, 1)\n\n\ndef lcm_base(x, y):\n return (x * y) // gcd(x, y)\n\n\ndef lcm(numbers): # "numbers" is list\n retu... | ['Runtime Error', 'Accepted'] | ['s192687413', 's074412465'] | [5076.0, 3700.0] | [38.0, 25.0] | [417, 437] |
p03633 | u763881112 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['\n\nimport numpy as np\nimport fractions as fra\n\nt=int(input())\nans=1\nfor _ in range(t):\n ans=ans*int(input())/fra.gcd(ans,int(input()))\nprint(ans)', '\n\nimport numpy as np\n\ndef gcd(a,b):\n if(a>b):\n a,b=b,a\n if(a==0):return b\n return gcd(b%a,a)\n\nt=int(input())\nans=1\nfor _ in range(... | ['Runtime Error', 'Accepted'] | ['s515811032', 's826181012'] | [15156.0, 14532.0] | [2108.0, 151.0] | [147, 205] |
p03633 | u785205215 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['from sys import stdin, stdout\nfrom collections import defaultdict\ndef readLine_int_list(): return list(map(int, stdin.readline().split()))\ndef readAll_int(): return list(map(int, stdin))\n\ndef gcd(a, b):\n\twhile b:\n\t a, b = b, a % b\n\treturn a\n\t\ndef lcm(a, b):\n return a * b // gcd (a, b)\n\ndef main... | ['Wrong Answer', 'Accepted'] | ['s770948702', 's157620320'] | [3316.0, 3064.0] | [21.0, 18.0] | [567, 443] |
p03633 | u785578220 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import math\na = int(input())\ns = 1\nfor i in range(a):\n t= int(input())\n s = (t*s)//gcd(t,s)\nprint(s)\n ', '\ndef gcd(x,y):\n if x==0:return y\n else:return gcd(y%x,x)\na = int(input())\ns = 1\nfor i in range(a):\n t= int(input())\n s = (t*s)//gcd(t,s)\nprint(s)'] | ['Runtime Error', 'Accepted'] | ['s534285116', 's155818837'] | [2940.0, 3064.0] | [17.0, 19.0] | [111, 157] |
p03633 | u795630164 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\nT = [int(input()) for i in range(N)]\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\ndef lcm(a, b):\n return a * b / gcd(a, b)\n\nnow = lcm(T[0], T[1])\nfor i in range(1, N):\n now = lcm(now, T[i])\n\nprint(now)\n', 'N = int(input())\nT = [int(input()) for i in range(... | ['Runtime Error', 'Accepted'] | ['s495697256', 's471370406'] | [3060.0, 3064.0] | [2103.0, 18.0] | [247, 290] |
p03633 | u824237520 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n = int(input())\nt = [int(input()) for _ in range(n)]\n\ndef gcd(m, n):\n x = max(m, n)\n y = min(m, n)\n if x%y == 0:\n return y\n else:\n while x%y != 0:\n z = x%y\n x = y\n y = z\n else:\n return z\n\ndef lcm(m, n):\n return m * n//gc... | ['Wrong Answer', 'Accepted'] | ['s379709599', 's051989126'] | [3064.0, 3064.0] | [18.0, 18.0] | [542, 529] |
p03633 | u838194315 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import math\nimport functools\nN = int(input())\nT = []\nfor i in range(N):\n T.append(int(input()))\ndef gcd(A, B):\n while(True):\n if A and B:\n if A > B:\n A = A % B\n else:\n B = B % A\n else:\n return max(A, B)\n \ndef lcm(A, B):\n return (A * // gcd(A, B)) * b\n\nprint(fun... | ['Runtime Error', 'Accepted'] | ['s965376078', 's220469551'] | [2940.0, 3572.0] | [17.0, 24.0] | [343, 341] |
p03633 | u859897687 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['N = int(input())\nT = [int(input() for _ in range(N))]\n\ndef gcd(a,b):\n while b:\n a,b=b,a%b\n return a\n\ndef lcm(a,b):\n return a*b//gcd(a,b)\n\nans=1\nfor i in range(T):\n ans = lcm(ans,i)\n\nprint(ans)\n', 'N = int(input())\nT = [int(input()) for _ in range(N)]\ndef gcd(a, b):\n\twhile b:\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s595316881', 's694367597', 's786700383', 's181093261'] | [3060.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 17.0] | [212, 200, 216, 205] |
p03633 | u863370423 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a, b):\n\tif a == 0:\n\t\treturn b\n\treturn gcd(b % a, a)\nn = (input())\nres = (input())\nwhile n > 1:\n\tx = (input())\n\tres = (res * x) // gcd(res, x);\n\tn -= 1\nprint(res)', 'def gcd(a, b):\n\treturn gcd(b, a % b) if b else a\n\nn = int(input())\nans = 1\nfor i in range(n):\n\tx = int(input())\n\tans =... | ['Runtime Error', 'Accepted'] | ['s985745167', 's655226333'] | [9056.0, 2940.0] | [29.0, 20.0] | [169, 152] |
p03633 | u868040597 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['# coding: utf-8\n\nn = int(input()) \nt = sorted([int(input()) for i in range(n)])\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\t\ndef lcm(a, b):\n return a * b // gcd(a, b)\n\t\ndef nlcm(list):\n lcm_num = lcm(list[0], list[1])\n for i in range(2, len(list)):\n lcm_num = lcm(lcm_num, list[i... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s170011288', 's393336599', 's596083083', 's669962783', 's726692807', 's846000331', 's345939735'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0] | [320, 321, 317, 439, 439, 321, 445] |
p03633 | u875361824 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ["def main():\n N = int(input().strip())\n res = int(input().strip())\n if N == 1:\n print(res)\n return\n for _ in range(1, N):\n t = int(input().strip())\n res = lcm(res, t)\n print(res)\n\n\ndef lcm(a, b):\n return (a * b) / gcd(a, b)\n\n\ndef gcd(a, b):\n if b == 0:\... | ['Runtime Error', 'Accepted'] | ['s685597497', 's815885621'] | [3940.0, 3064.0] | [76.0, 17.0] | [467, 468] |
p03633 | u882620594 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a, b):\n if b == 1:\n return 1\n r = a % b\n if r == 0:\n return b\n else:\n return gcd(b, r)\n\ndef lcm(A, n):\n if n == 2:\n return A[0]*A[1] // gcd(A[0], A[1])\n \n a = lcm(A, n-1)\n return a* A[n-1] // gcd(a, A[n-1])\n\nn = int(input())\na = []\nfor i in... | ['Runtime Error', 'Accepted'] | ['s504637745', 's352954827'] | [3948.0, 3064.0] | [77.0, 18.0] | [455, 518] |
p03633 | u889695981 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a,b):\n x=min(a,b)\n y=max(a,b)\n if x==0:\n return y\n else:\n return gcd(y,y%x)\nn=int(input())\nl=[]\nfor i in range(n):\n l.append(int(input()))\n#print(l)\nans=1\nfor i in range(n):\n ans=gcd(l[i],ans)\nprint(ans)', 'def gcd( a , b ):\n if a == 0 :\n return b \n ... | ['Wrong Answer', 'Accepted'] | ['s687731625', 's959042632'] | [3064.0, 3316.0] | [17.0, 20.0] | [243, 247] |
p03633 | u896741788 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n=int(input())\nl=list(set([int(input()) for d in range(n)])) \na=l[0]\nsd=0\nfor i in l[1:]:\n for h in range(min(i,a)+1)[:0:-1]:\n if (a%h,i%h)==(0,0):sd=h,break\n a=a*i//sd\nprint(a)', 'n=int(input())\nl=list(set([int(input()) for d in range(n)])) \na=l[0]\ndef gcd(a,s):\n a,s=min(a,s),max(a,s)\n if a==0:... | ['Runtime Error', 'Accepted'] | ['s003086009', 's385102764'] | [2940.0, 3060.0] | [18.0, 18.0] | [183, 195] |
p03633 | u905510147 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import sys\nsys.setrecursionlimit(100000)\n\nN = int(input())\nT = []\nfor i in range(N):\n T.append(int(input()))\n\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\nlcm = 1\nfor i in T:\n lcm = lcm * i / gcd(lcm, i)\n\nprint(lcm)', 'import sys\nsys.setrecursionlimit(100000)\n\nN = int(in... | ['Wrong Answer', 'Accepted'] | ['s242129472', 's133329058'] | [3060.0, 3060.0] | [2104.0, 17.0] | [242, 248] |
p03633 | u905715926 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a,b):\n r = a%b\n while(r==0):\n a=b\n b=r\n r=a%b\n return b\nn = int(input())\nans = int(input())\nfor i in range(n-1):\n num = int(input())\n ans = gcd(max(ans,num),min(ans,num))\nprint(ans)', 'def gcd(a,b):\n r = (int)(a%b)\n while(r!=0):\n a=(int)b\n b=(int)r\n r=(int)a%b\n retu... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s140075813', 's919299762', 's142589189'] | [3060.0, 2940.0, 3064.0] | [18.0, 17.0, 19.0] | [203, 271, 309] |
p03633 | u934868410 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['n = int(input())\nt = [int(input()) for _ in range(n)]\n\ndef gcd(x,y):\n if x % y == 0:\n return y\n return gcd(y, x % y)\n\nfor i in range(n):\n for j in range(i+1, n):\n if t[i] == 1:\n break\n t[i] //= gcd(t[i], t[j])\n\nans = 1\n[ans *= x for x in t]\nprint(ans)', 'n = int(input())\nt = [int(inp... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s141501840', 's337916857', 's236367763'] | [3064.0, 3060.0, 3060.0] | [17.0, 18.0, 17.0] | [268, 195, 189] |
p03633 | u941753895 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy\n\nsys.setrecursionlimit(10**7)\ninf=10**20\nmod=10**9+7\ndd=[(-1,0),(0,1),(1,0),(0,-1)]\nddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]\n\ndef LI(): return [int(x) for x in sys.stdin.readline().split()]\n... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s627694230', 's697974269', 's926076616'] | [6228.0, 5092.0, 5168.0] | [57.0, 2104.0, 38.0] | [852, 165, 773] |
p03633 | u941884460 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['# coding: utf-8\nN = int(input().rstrip())\nlist =[]\nfor i in range(N):\n tmp = int(input())\n if tmp > 1:\n list.append(tmp)\nlist.sort()\n\nitemList ={}\nwhile len(list) > 0:\n print(list)\n work = list[0]\n if str(work) in itemList:\n itemList[(str(work))] += 1\n else:\n ite... | ['Wrong Answer', 'Accepted'] | ['s748040216', 's919993718'] | [3064.0, 3064.0] | [19.0, 18.0] | [720, 322] |
p03633 | u960080897 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a, b):\n if a % b == 0:\n return b\n return gcd(b, a % b)\n\ndef lcm(a, b):\n return a * b / gcd(a, b)\n\nn = int(input())\nans = 1\nfor i in range(n):\n t = int(input())\n ans = lcm(ans, t)\n\nprint(ans)', 'def gcd(a, b):\n if a % b == 0:\n return b\n return gcd(b, a % b)\n... | ['Runtime Error', 'Accepted'] | ['s390342450', 's662465936'] | [3948.0, 3060.0] | [74.0, 18.0] | [220, 226] |
p03633 | u963316883 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import fraction\n\ndef lcm(x, y):\n return (x * y) // fraction.gcd(x, y)\n\nN = int(input())\nT = [int(input()) for i in range(N)]\n\nans = 1\nfor value in range(0, N):\n ans = lcm(ans, T[value])\n\nprint(ans)', 'def gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\ndef lcm(x, y):\n return (... | ['Runtime Error', 'Accepted'] | ['s637721587', 's904582757'] | [3060.0, 3060.0] | [17.0, 17.0] | [203, 243] |
p03633 | u966695411 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['#! /usr/bin/env python3\nimport math\n\nN = int(input())\nT = sorted(set([int(input()) for x in range(N)]))\ns = set()\nfor i in T : s = s.union(set(primefactor(i)))\na = 1\nfor i in T[:-1] : a *= i\n\nprint((a * T[-1]) // math.gcd(a, T[-1]))', "#! /usr/bin/env python3\n\ndef f(diu, n):\n r = []\n try:\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s203158497', 's852571534', 's143468484'] | [3064.0, 3444.0, 3060.0] | [17.0, 21.0, 17.0] | [232, 842, 283] |
p03633 | u981931040 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['import math\ndef gcd(a, b):\n while b:\n a, b = b, a % b\n return a\ndef lcm(x, y):\n return (x * y) // gcd(x, y)\n \nN = int(input())\nT = [int(input()) for _ in range(N)]\nif N == 1:\n print(T[0])\n exit()\n \nans = lcm(T[0] , T[1])', 'import math\ndef gcd(a, b):\n while b:\n a, b = ... | ['Wrong Answer', 'Accepted'] | ['s866285256', 's569852702'] | [9140.0, 9192.0] | [24.0, 29.0] | [242, 301] |
p03633 | u994988729 | 2,000 | 262,144 | We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again? | ['def gcd(a,b):\n if b==0:\n return a\n return gcd(b, a%b)\n\nfrom itertools import accumulate\nN = int(input())\nT = [int(input()) for _ in range(N)]\nans = list(accumulate(T, func=gcd))[-1]\nprint(ans)\n', 'def GCD(x, y):\n if y == 0:\n return x\n return GCD(y, x % y)\n\n\nN = int(input())\nans = 1\... | ['Wrong Answer', 'Accepted'] | ['s485029720', 's069168436'] | [3060.0, 2940.0] | [17.0, 17.0] | [198, 182] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.