s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s771384626
p03633
u137228327
1594302351
Python
Python (3.8.2)
py
Runtime Error
29
9084
239
import math N = int(input()) T = [] for i in range(N): T.append(int(input())) def lcm(x, y): ans = (x * y)//math.gcd(x, y) return ans g = lcm(T[0],T[1]) if len(T) > 2: for i in range(N-1): g = lcm(g,T[i+1]) print(g)
s919724274
p03633
u137228327
1594302301
Python
Python (3.8.2)
py
Runtime Error
28
9136
227
import math N = int(input()) T = [] for i in range(N): T.append(int(input())) def lcm(x, y): return (x * y) // math.gcd(x, y) g = lcm(T[0],T[1]) if len(T) > 2: for i in range(N-1): g = lcm(g,T[i+1]) print(g)
s023815412
p03633
u137228327
1594302238
Python
Python (3.8.2)
py
Runtime Error
26
9036
215
N = int(input()) T = [] for i in range(N): T.append(int(input())) def lcm(x, y): return (x * y) // math.gcd(x, y) g = lcm(T[0],T[1]) if len(T) > 2: for i in range(N-1): g = lcm(g,T[i+1]) print(g)
s730565614
p03633
u164291877
1594202113
Python
Python (3.8.2)
py
Runtime Error
29
9184
246
def gcd(a, b): if(a == 0): return b return gcd(b % a, a) def lcm(a, b): return a / gcd(a, b) * b t = int(input()) ans = 1 while(t != 0): t -= 1 n = int(input()) ans = lcm(ans, n) ans = int(ans) print(int(ans))
s487216234
p03633
u089230684
1594200228
Python
Python (3.8.2)
py
Runtime Error
26
9612
230
def gcd(a, b): if(a == 0): return b return gcd(b % a, a) def lcm(a, b): return (a / gcd(a, b)) * b t = int(input()) ans = 1 while(t != 0): t -= 1 n = int(input()) ans = lcm(ans, n) print(int(ans))
s901857940
p03633
u816631826
1594194948
Python
Python (3.8.2)
py
Runtime Error
27
9088
212
def gcd(a,b): while b > 0: a, b = b, a % b return a def lcm(a, b): return a * b / gcd(a, b) n = int(input()) s = 1 for i in range(n): x = int(input()) s = lcm(s, x) print(int(s))
s985745167
p03633
u863370423
1594192579
Python
Python (3.8.2)
py
Runtime Error
29
9056
169
def gcd(a, b): if a == 0: return b return gcd(b % a, a) n = (input()) res = (input()) while n > 1: x = (input()) res = (res * x) // gcd(res, x); n -= 1 print(res)
s367527646
p03633
u164291877
1594190532
Python
Python (3.8.2)
py
Runtime Error
27
9744
230
def gcd(a, b): if(a == 0): return b return gcd(b % a, a) def lcm(a, b): return (a * b) / gcd(a, b) t = int(input()) ans = 1 while(t != 0): t -= 1 n = int(input()) ans = lcm(ans, n) print(int(ans))
s475048776
p03633
u816631826
1594190178
Python
Python (3.8.2)
py
Runtime Error
31
9664
230
def gcd(a, b): if(a == 0): return b return gcd(b % a, a) def lcm(a, b): return (a * b) / gcd(a, b) t = int(input()) ans = 1 while(t != 0): t -= 1 n = int(input()) ans = lcm(ans, n) print(int(ans))
s941054516
p03633
u018679195
1594189111
Python
Python (3.8.2)
py
Runtime Error
26
8996
168
def gcd(a, b): if a == 0: return b return gcd(b % a, a) n = (input()) res = (input()) while n > 1: x = (input()) res = (res * x) / gcd(res, x); n -= 1 print(res)
s989132632
p03633
u089230684
1594189026
Python
PyPy3 (7.3.0)
py
Runtime Error
100
76708
177
def gcd(a, b): if a == 0: return b return gcd(b % a, a) n = int(input()) res = int(input()) while n > 1: x = int(input()) res = (res * x) / gcd(res, x); n -= 1 print(res)
s020986559
p03633
u000022466
1593926538
Python
Python (3.8.2)
py
Runtime Error
284
108140
526
import heapq from collections import deque from enum import Enum import sys import math from _heapq import heappush, heappop import copy from test.support import _MemoryWatchdog BIG_NUM = 2000000000 HUGE_NUM = 99999999999999999 MOD = 1000000007 EPS = 0.000000001 sys.setrecursionlimit(100000) def gcd(x,y): if y =...
s143664942
p03633
u349444371
1593449102
Python
Python (3.8.2)
py
Runtime Error
28
9188
222
import math n=int(input()) t=[int(input()) for _ in range(n)] #print(t) for i in range(n-1): if i==0: lcm=(t[i]*t[i+1])//math.gcd(t[i],t[i+1]) else: lcm=(lcm*t[i+1])//math.gcd(lcm,t[i+1]) print(lcm)
s519921306
p03633
u163501259
1592964405
Python
Python (3.8.2)
py
Runtime Error
33
9100
477
import sys sys.setrecursionlimit(10**9) input = sys.stdin.readline def gdc(a, b): if b == 0: return a return gdc(b, a%b) def lcm(a,b): return a*b//gdc(a,b) def main(): N = int(input()) T = [int(input()) for i in range(N)] ans = lcm(max(T[0], T[1]), min(T[0], T[1])) if N == 2: ...
s505710034
p03633
u163501259
1592964283
Python
Python (3.8.2)
py
Runtime Error
29
9064
447
import sys input = sys.stdin.readline def gdc(a, b): if b == 0: return a return gdc(b, a%b) def lcm(a,b): return a*b//gdc(a,b) def main(): N = int(input()) T = [int(input()) for i in range(N)] ans = lcm(max(T[0], T[1]), min(T[0], T[1])) if N == 2: print(ans) return ...
s651697926
p03633
u228232845
1592773288
Python
Python (3.8.2)
py
Runtime Error
35
9952
545
import decimal import math import sys def input(): return sys.stdin.readline().strip() def I(): return int(input()) def LI(): return list(map(int, input().split())) def IR(n): return [I() for i in range(n)] def LIR(n): return [LI() for i in range(n)] def SR(n): return [S() for i in range(n)] def S(): return input() d...
s317256283
p03633
u228232845
1592772996
Python
Python (3.8.2)
py
Runtime Error
31
10088
570
import decimal import math import sys def input(): return sys.stdin.readline().strip() def I(): return int(input()) def LI(): return list(map(int, input().split())) def IR(n): return [I() for i in range(n)] def LIR(n): return [LI() for i in range(n)] def SR(n): return [S() for i in range(n)] def S(): return input() d...
s876997475
p03633
u443736699
1592416329
Python
Python (3.4.3)
py
Runtime Error
76
3952
295
n = int(input()) a = [int(input()) for i in range(n)] def minkou(a1,a2): mod = a1 % a2 if mod == 0: return a2 else: return(minkou(a2,mod)) a1 = a[0] if len(a) == 1: print(a[0]) exit() else: for i in a[1:]: maxkou = a1*i / minkou(a1,i) a1 = maxkou print(int(maxkou))
s683303534
p03633
u443736699
1592416122
Python
Python (3.4.3)
py
Runtime Error
74
3948
249
n = int(input()) a = [int(input()) for i in range(n)] def minkou(a1,a2): mod = a1 % a2 if mod == 0: return a2 else: return(minkou(a2,mod)) a1 = a[0] for i in a[1:]: maxkou = a1*i / minkou(a1,i) a1 = maxkou print(int(maxkou))
s006383086
p03633
u013513417
1592268901
Python
Python (3.4.3)
py
Runtime Error
36
5048
256
import fractions N=int(input()) S=[] for i in range(N): S.append(int(input())) def koubaisu(a,b): return a*b//fractions.gcd(a,b) ans=koubaisu(S[0],S[1]) if N>2: for i in range(N-2): ans=koubaisu(ans,S[i+2]) else: pass print(ans)
s606602325
p03633
u670961163
1592227633
Python
PyPy3 (2.4.0)
py
Runtime Error
164
38640
311
def main(): import math n = int(input()) inlis = [] for _ in range(n): a = int(input()) inlis.append(a) ans = inlis[0] for i in range(1, n): ans = ans * inlis[i] // math.gcd(ans, inlis[i]) print(ans) if __name__ == "__main__": main()
s382237620
p03633
u540290227
1592175186
Python
Python (3.4.3)
py
Runtime Error
38
5304
216
from fractions import gcd n = int(input()) t = [int(input()) for _ in range(n)] cm = [] t.sort() def lcm(x, y): return (x * y) // gcd(x, y) for i in range(n-1): cm.append(lcm(t[i], t[i+1])) print(max(cm))
s281268492
p03633
u540290227
1592174133
Python
Python (3.4.3)
py
Runtime Error
18
3064
206
import math n = int(input()) t = [int(input()) for _ in range(n)] cm = [] t.sort() def lcm(x, y): return (x * y) // math.gcd(x, y) for i in range(n-1): cm.append(lcm(t[i], t[i+1])) print(max(cm))
s141069522
p03633
u614181788
1592075440
Python
Python (3.4.3)
py
Runtime Error
17
3064
310
def lcm(a, b): #lcm(int, int) if a<b: a,b = b,a x = a*b r = a%b while r != 0: a = b b = r r = a % b return x//b n = int(input()) t = [0]*n for i in range(n): t[i] = int(input()) ans = lcm(t[0],t[1]) for i in range(2,n): ans = lcm(ans,t[i]) print(ans)
s055735575
p03633
u119148115
1592061501
Python
PyPy3 (2.4.0)
py
Runtime Error
164
38256
206
import sys def I(): return int(sys.stdin.readline().rstrip()) N = I() T = [I() for _ in range(N)] from math import gcd ans = T[0] for i in range(N-1): ans = (ans*T[i+1])//gcd(ans,T[i+1]) print(ans)
s550176857
p03633
u515052479
1592019252
Python
Python (3.4.3)
py
Runtime Error
23
3688
284
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) n = int(input()) base = [0]*n for i in range(n): base[i] = int(input()) base = list(set(base)) print(lcm_list(base))
s158491997
p03633
u767545760
1591931305
Python
Python (3.4.3)
py
Runtime Error
17
3060
173
import math N = int(input()) T = [int(input()) for i in range(N)] product = T[0] for i in range(1, N): product = product * T[i] // math.gcd(T[i], product) print(product)
s985304073
p03633
u767545760
1591931220
Python
Python (3.4.3)
py
Runtime Error
17
3060
173
import math N = int(input()) T = [int(input()) for i in range(N)] product = T[0] for i in range(1, N): product = product * T[i] // math.gcd(T[i], product) print(product)
s872484931
p03633
u555767343
1591667519
Python
PyPy3 (2.4.0)
py
Runtime Error
271
64108
242
N = int(input()) T = [int(input()) for _ in range(N)] import fractions from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) print(lcm_list(T))
s483844802
p03633
u015593272
1591665041
Python
Python (3.4.3)
py
Runtime Error
18
3060
180
import math N = int(input()) times = [int(input()) for i in range(N)] gcdd = 1 for i in range(N): num = times[i] gcdd = gcdd * num // (math.gcd(gcdd, num)) print(gcdd)
s421998529
p03633
u212328220
1591651008
Python
Python (3.4.3)
py
Runtime Error
18
3060
180
import math N = int(input()) lst = [] for _ in range(N): lst.append(int(input())) ans = lst[0] for i in range(1, N): ans = ans * lst[i] // math.gcd(ans, lst[i]) print(ans)
s632458952
p03633
u663767599
1591590783
Python
Python (3.4.3)
py
Runtime Error
17
2940
182
from math import gcd from functools import reduce def lcm(a, b): return (a * b) // gcd(a, b) N = int(input()) T = list(int(input()) for _ in range(N)) print(reduce(lcm, T))
s210059485
p03633
u494058663
1591556470
Python
Python (3.4.3)
py
Runtime Error
363
21140
123
import numpy as np n = int(input()) T = [int(input()) for i in range(n)] T_list = np.array(T) print(np.lcm.reduce(T_list))
s551781414
p03633
u146597538
1591481057
Python
Python (3.4.3)
py
Runtime Error
18
3064
291
n = int(input()) t = [int(input()) for _ in range(n)] def gcd(a,b): if b == 0: return a return gcd (b, a%b) #2数の積/最大公約数=最小公倍数 def lcm(a,b): return a*b//gcd(a,b) ans = lcm(t[0],t[1]) for i in range(1, n-1): ans = lcm(ans,t[i+1]) print(ans)
s261957583
p03633
u618002097
1591469635
Python
PyPy3 (2.4.0)
py
Runtime Error
172
38512
296
N = int(input()) T = [int(input()) for i in range(N)] import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) print(lcm_list(T))
s389056683
p03633
u488884575
1591412742
Python
Python (3.4.3)
py
Runtime Error
17
3060
148
import math n = int(input()) T = [] ans = 1 for i in range(n): t = int(input()) T.append(t) ans = ans * t // math.gcd(ans, t) print(ans)
s124949853
p03633
u687574784
1591399381
Python
Python (3.4.3)
py
Runtime Error
18
3064
148
n = int(input()) t = [int(input()) for _ in range(n)] import math n = t[0] for a,b in zip(t, t[1:]): g = math.gcd(n, b) n = a*b//g print(n)
s929227654
p03633
u823885866
1591398480
Python
Python (3.4.3)
py
Runtime Error
156
13504
542
import sys import math import itertools import collections import heapq import re import numpy as np import fractions from functools import reduce rr = lambda: sys.stdin.buffer.readline().rstrip() rs = lambda: sys.stdin.buffer.readline().split() ri = lambda: int(sys.stdin.buffer.readline()) rm = lambda: map(int, sys.s...
s514781950
p03633
u760569096
1591246590
Python
Python (3.4.3)
py
Runtime Error
17
2940
132
n =int(input()) import fraction ans = 1 for _ in range(n): t = int(input()) ans = ans * t // fraction.gcd(ans, t) print(ans)
s778191925
p03633
u760569096
1591246543
Python
Python (3.4.3)
py
Runtime Error
17
3060
157
import math N = int(input()) T = list(int(input()) for _ in range(N)) ans = T[0] for i in range(1, N): ans = ans * T[i] // math.gcd(ans, T[i]) print(ans)
s453991812
p03633
u760569096
1591246450
Python
Python (3.4.3)
py
Runtime Error
17
2940
125
n =int(input()) import math ans = 1 for _ in range(n): t = int(input()) ans = ans * t // math.gcd(ans, t) print(ans)
s108817138
p03633
u760569096
1591246362
Python
Python (3.4.3)
py
Runtime Error
17
3060
124
n =int(input()) import math ans = 1 for _ in range(n): t = int(input()) ans = ans * t // math.gcd(ans, t) print(ans)
s661052378
p03633
u784022244
1591235836
Python
Python (3.4.3)
py
Runtime Error
21
3316
191
from collections import gcd N=int(input()) def lcm(a,b): return a//gcd(a,b)*b T=[] for i in range(N): t=int(input()) T.append(t) a=1 for i in range(N): a=lcm(a,T[i]) print(a)
s331021080
p03633
u784022244
1591235818
Python
Python (3.4.3)
py
Runtime Error
18
3060
184
from math import gcd N=int(input()) def lcm(a,b): return a//gcd(a,b)*b T=[] for i in range(N): t=int(input()) T.append(t) a=1 for i in range(N): a=lcm(a,T[i]) print(a)
s172145776
p03633
u699089116
1591233688
Python
Python (3.4.3)
py
Runtime Error
160
13116
102
import numpy as np n = int(input()) t = list(int(input()) for _ in range(n)) print(np.lcm.reduce(t))
s480130682
p03633
u057964173
1591232850
Python
PyPy3 (2.4.0)
py
Runtime Error
166
38384
307
import sys def input(): return sys.stdin.readline().strip() def resolve(): n=int(input()) S=[] for i in range(n): S.append(int(input())) from functools import reduce from math import gcd def lcm(A, B): return A * B // gcd(A, B) print(reduce(lcm, S)) resolve()
s260134190
p03633
u942388574
1590803020
Python
Python (3.4.3)
py
Runtime Error
18
3064
335
# -*- coding: utf-8 -*- """ Created on Fri May 29 21:29:28 2020 @author: naoki """ import math N = int(input()) # 時計の個数 T = [int(input()) for i in range(N)] # 時計の針が一周する時間 T.sort() # 小さい順番にソートする lcm = T[0] for i in range(1,N): lcm = lcm*T[i]// math.gcd(lcm,T[i]) print(lcm)
s746634506
p03633
u113971909
1590768881
Python
Python (3.4.3)
py
Runtime Error
17
2940
193
from math import gcd from math import reduce from fractions import gcd from functools import reduce def Gcd(list): gcd = 1 G = reduce(gcd, list) return G A = [2,6,8] print(Gcd(A))
s574605242
p03633
u557659226
1590751329
Python
Python (3.4.3)
py
Runtime Error
20
3064
338
n = int(input().rstrip()) seconds = [int(input().rstrip()) for _ in range(n)] seconds = set(seconds) def gcd(a,b): if b == 0: return a return gcd(b,a%b) def lcm(a,b): g = gcd(a,b) if a > b: return int(a/g*b) else: return int(a*b/g) ans = 1 for num in seconds: ans = lcm(a...
s717967950
p03633
u599114793
1590705857
Python
Python (3.4.3)
py
Runtime Error
23
3700
319
n = int(input()) import functools from functools import reduce def gcd(numbers): return reduce(functools.gcd, numbers) def lcm_base(x, y): return x // functools.gcd(x, y) * y def lcm(numbers): return reduce(lcm_base, numbers, 1) num = [] for i in range(n): num.append(int(input())) print(lcm(num))
s112796238
p03633
u599114793
1590705817
Python
PyPy3 (2.4.0)
py
Runtime Error
169
38640
319
n = int(input()) import functools from functools import reduce def gcd(numbers): return reduce(functools.gcd, numbers) def lcm_base(x, y): return x // functools.gcd(x, y) * y def lcm(numbers): return reduce(lcm_base, numbers, 1) num = [] for i in range(n): num.append(int(input())) print(lcm(num))
s022269060
p03633
u599114793
1590705729
Python
PyPy3 (2.4.0)
py
Runtime Error
167
38384
319
n = int(input()) import functools from functools import reduce def gcd(numbers): return reduce(functools.gcd, numbers) def lcm_base(x, y): return x // functools.gcd(x, y) * y def lcm(numbers): return reduce(lcm_base, numbers, 1) num = [] for i in range(n): num.append(int(input())) print(lcm(num))
s203820314
p03633
u599114793
1590705677
Python
PyPy3 (2.4.0)
py
Runtime Error
163
38256
304
n = int(input()) import math from functools import reduce def gcd(numbers): return reduce(math.gcd, numbers) def lcm_base(x, y): return x // math.gcd(x, y) * y def lcm(numbers): return reduce(lcm_base, numbers, 1) num = [] for i in range(n): num.append(int(input())) print(lcm(num))
s808188016
p03633
u496687522
1590686886
Python
Python (3.4.3)
py
Runtime Error
18
3060
156
import math N = int(input()) T = [int(input()) for _ in range(N)] ans = T[0] for i in range(1, N): ans = (ans * T[i]) // math.gcd(ans, T[i]) print(ans)
s061502568
p03633
u496687522
1590686433
Python
Python (3.4.3)
py
Runtime Error
18
3060
154
import math N = int(input()) T = [int(input()) for _ in range(N)] ans = T[0] for i in range(1, N): ans = ans * T[i] // math.gcd(ans, T[i]) print(ans)
s812785609
p03633
u935558307
1590630312
Python
PyPy3 (2.4.0)
py
Runtime Error
166
38512
251
N = int(input()) T = [int(input()) for _ in range(N)] def gcd(a,b): if b: return gcd(b,a%b) else: return a def lcm(a,b): g = gcd(a,b) return a*b//g l = lcm(T[0],T[1]) for i in range(2,N): l = lcm(l,T[i]) print(l)
s024189867
p03633
u371686382
1590545528
Python
Python (3.4.3)
py
Runtime Error
18
3060
205
from math import gcd # def lcm(a,b): return a*b//gcd(a,b) def lcm(a, b): return (a * b) // gcd(a, b) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s856820580
p03633
u371686382
1590545464
Python
Python (3.4.3)
py
Runtime Error
36
5048
212
from fractions import gcd # def lcm(a,b): return a*b//gcd(a,b) def lcm(a, b): return int(a * b) / gcd(a, b) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s952095639
p03633
u371686382
1590545215
Python
Python (3.4.3)
py
Runtime Error
36
5048
214
from fractions import gcd # def lcm(a,b): return a*b//gcd(a,b) def lcm(a, b): return int((a * b) / gcd(a, b)) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s598427636
p03633
u371686382
1590545178
Python
Python (3.4.3)
py
Runtime Error
36
5048
230
from fractions import gcd # def lcm(a,b): return a*b//gcd(a,b) def lcm(a, b): _gcd = gcd(a, b) return int((a * b) / _gcd) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s843628972
p03633
u371686382
1590545152
Python
Python (3.4.3)
py
Runtime Error
36
5048
231
from fractions import gcd # def lcm(a,b): return a*b//gcd(a,b) def _lcm(a, b): _gcd = gcd(a, b) return int((a * b) / _gcd) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s662364923
p03633
u371686382
1590544998
Python
Python (3.4.3)
py
Runtime Error
18
3060
193
from math import gcd def lcm(a,b): return a*b//gcd(a,b) # def lcm(a,b): return a*b//gcd(a,b) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s813175715
p03633
u371686382
1590544965
Python
Python (3.4.3)
py
Runtime Error
17
3060
198
from math import gcd # def lcm(a,b): return a*b//gcd(a,b) def lcm(a,b): return a*b//gcd(a, b) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s865434498
p03633
u371686382
1590544910
Python
Python (3.4.3)
py
Runtime Error
17
3060
205
from math import gcd # def lcm(a,b): return a*b//gcd(a,b) def lcm(a, b): return (a * b) // gcd(a, b) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s570272870
p03633
u371686382
1590544897
Python
Python (3.4.3)
py
Runtime Error
17
3060
221
from math import gcd # def lcm(a,b): return a*b//gcd(a,b) def lcm(a, b): _gcd = gcd(a, b) return (a * b) // _gcd n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s135805118
p03633
u371686382
1590544848
Python
Python (3.4.3)
py
Runtime Error
17
3060
221
from math import gcd # def lcm(a,b): return a*b//gcd(a,b) def lcm(a, b): _gcd = gcd(a, b) return (a * b) // _gcd n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s956447632
p03633
u371686382
1590544798
Python
Python (3.4.3)
py
Runtime Error
18
3060
225
from math import gcd # def lcm(a,b): return a*b//gcd(a,b) def lcm(a, b): _gcd = gcd(a, b) return int((a * b) / _gcd) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s319942960
p03633
u371686382
1590544787
Python
Python (3.4.3)
py
Runtime Error
17
3060
225
from math import gcd # def lcm(a,b): return a*b//gcd(a,b) def lcm(a, b): _gcd = gcd(a, b) return int((a * b) / _gcd) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s306224284
p03633
u371686382
1590544282
Python
Python (3.4.3)
py
Runtime Error
35
5048
193
from fractions import gcd def lcm(a, b): _gcd = gcd(a, b) return int((a * b) / _gcd) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t, ans) print(ans)
s463826241
p03633
u371686382
1590544112
Python
Python (3.4.3)
py
Runtime Error
18
3060
309
def gcd(a, b): md = a % b if md == 0: return b return gcd(b, md) def lcm(a, b): _gcd = gcd(a, b) return int((a * b) / _gcd) n = int(input()) ans = 1 for i in range(n): t = int(input()) if t >= ans: ans = lcm(t, ans) else: ans = lcm(ans, t) print(ans)
s004174245
p03633
u371686382
1590543603
Python
Python (3.4.3)
py
Runtime Error
17
3064
290
def gcd(a, b): md = a % b if md == 0: return b return gcd(b, md) def lcm(a, b): _gcd = gcd(a, b) return int((a * b) / _gcd) n = int(input()) ans = 1 for i in range(n): t = int(input()) a = max(ans, t) b = min(ans, t) ans = lcm(a, b) print(ans)
s759272914
p03633
u371686382
1590543387
Python
Python (3.4.3)
py
Runtime Error
20
3096
401
def gcd(a, b): md = a % b if md == 0: return b return gcd(b, md) def lcm(a, b): _gcd = gcd(a, b) return int((a * b) / _gcd) def lcm_mlt(a, num_list): if len(num_list) == 0: return a n = num_list.pop() a = max(a, n) b = min(a, n) return lcm_mlt(lcm(a, b), num_lis...
s944967570
p03633
u371686382
1590542721
Python
Python (3.4.3)
py
Runtime Error
20
3096
412
def gcd(a, b): md = a % b if md == 0: return b return gcd(b, md) def lcm(a, b): _gcd = gcd(a, b) return int((a * b) / _gcd) def lcm_mlt(a, num_list): if len(num_list) == 0: return a n = num_list.pop() a = max(a, n) b = min(a, n) return lcm_mlt(lcm(a, b), num_lis...
s186854664
p03633
u338824669
1590534735
Python
Python (3.4.3)
py
Runtime Error
18
3060
137
import math N=int(input()) T=[int(input()) for _ in range(N)] ans=1 for i in range(N): ans=ans*T[i]//(math.gcd(ans,T[i])) print(ans)
s810655553
p03633
u338824669
1590534631
Python
Python (3.4.3)
py
Runtime Error
17
3060
140
import math N=int(input()) T=[int(input()) for _ in range(N)] ans=T[0] for i in range(N): ans=ans*T[i]//(math.gcd(ans,T[i])) print(ans)
s310483945
p03633
u189487046
1590406661
Python
Python (3.4.3)
py
Runtime Error
36
5048
260
import sys import fractions def input(): return sys.stdin.readline()[:-1] N = int(input()) ans = 0 for _ in range(N): if ans == 0: ans = int(input()) else: t = int(input()) ans = (ans * t) // math.gcd(ans, t) print(ans)
s459664862
p03633
u902151549
1590398579
Python
Python (3.4.3)
py
Runtime Error
42
5812
4112
# coding: utf-8 import re import math from collections import defaultdict from collections import deque import collections from fractions import Fraction import itertools from copy import deepcopy import random import time import os import queue import sys import datetime from functools import lru_cache #@lru_cache(max...
s000575069
p03633
u902151549
1590398411
Python
Python (3.4.3)
py
Runtime Error
73
7212
4071
# coding: utf-8 import re import math from collections import defaultdict from collections import deque import collections from fractions import Fraction import itertools from copy import deepcopy import random import time import os import queue import sys import datetime from functools import lru_cache #@lru_cache(max...
s351789284
p03633
u902151549
1590398334
Python
Python (3.4.3)
py
Runtime Error
56
6320
4032
# coding: utf-8 import re import math from collections import defaultdict from collections import deque import collections from fractions import Fraction import itertools from copy import deepcopy import random import time import os import queue import sys import datetime from functools import lru_cache #@lru_cache(max...
s062897934
p03633
u587589241
1590360195
Python
Python (3.4.3)
py
Runtime Error
18
3060
143
import math n=int(input()) t=list(int(input()) for i in range(n)) ans=t[0] for i in range(1,n): ans=ans*t[i]//math.gcd(ans,t[i]) print(ans)
s989771280
p03633
u587589241
1590359999
Python
Python (3.4.3)
py
Runtime Error
18
3060
139
import math n=int(input()) t=[int(input()) for i in range(n)] ans=t[0] for i in range(1,n): ans=ans*t[i]//math.gcd(ans,t[i]) print(ans)
s634483921
p03633
u587589241
1590359680
Python
Python (3.4.3)
py
Runtime Error
23
3692
221
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(numbers): return reduce(lcm_base, numbers, 1) n=int(input()) t=[int(input()) for i in range(n)] print(lcm(t))
s029169478
p03633
u134019875
1590358564
Python
Python (3.4.3)
py
Runtime Error
18
3060
280
def gcd(a, b): if a < b: a, b = b, a while a % b != 0: a, b = b, a % b return b def lcm(a, b): return a * b // gcd(a, b) n = int(input()) t = [int(input()) for _ in range(n)] l = lcm(t[0], t[1]) for i in range(1, n): l = lcm(l, t[i]) print(l)
s794860115
p03633
u991134049
1590348118
Python
PyPy3 (2.4.0)
py
Runtime Error
290
64620
209
from fractions import gcd N = int(input()) A = [int(input()) for _ in range(N)] B = [0]*(N-1) B[0] = (A[0]*A[1])//gcd(A[0], A[1]) for i in range(N-2): B[i+1] = (A[i+2]*B[i])//gcd(A[i+2], B[i]) print(B[N-2])
s197019355
p03633
u991134049
1590347461
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38640
205
import math N = int(input()) A = [int(input()) for _ in range(N)] B = [0]*(N-1) B[0] = (A[0]*A[1])//math.gcd(A[0], A[1]) for i in range(N-2): B[i+1] = (A[i+2]*B[i])//math.gcd(A[i+2], B[i]) print(B[N-2])
s360144742
p03633
u991134049
1590347368
Python
PyPy3 (2.4.0)
py
Runtime Error
165
38256
204
from math import gcd N = int(input()) A = [int(input()) for _ in range(N)] B = [0]*(N-1) B[0] = (A[0]*A[1])//gcd(A[0], A[1]) for i in range(N-2): B[i+1] = (A[i+2]*B[i])//gcd(A[i+2], B[i]) print(B[N-2])
s932763519
p03633
u991134049
1590347310
Python
PyPy3 (2.4.0)
py
Runtime Error
179
38256
204
from math import gcd N = int(input()) A = [int(input()) for _ in range(N)] B = [0]*(N-1) B[0] = (A[0]*A[1])//gcd(A[0], A[1]) for i in range(N-2): B[i+1] = (A[i+2]*B[i])//gcd(A[i+2], B[i]) print(B[N-2])
s447104319
p03633
u991134049
1590347298
Python
PyPy3 (2.4.0)
py
Runtime Error
174
38384
203
from math import gcd N = int(input()) A = [int(input()) for _ in range(N)] B = [0]*(N-1) B[0] = (A[0]*A[1])//gcd(A[0], A[1]) for i in range(N-2): B[i+1] = (A[i+2]*B[i])//gcd(A[i+2], B[i]) print(B[N-1])
s256483981
p03633
u329407311
1590343979
Python
Python (3.4.3)
py
Runtime Error
23
3700
235
N = int(input()) arr = [int(input()) for i in range(N) ] import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) print(lcm(arr))
s414875202
p03633
u629350026
1590257211
Python
Python (3.4.3)
py
Runtime Error
37
5176
134
from fractions import gcd n=int(input()) ans=int(input()) for i in range(1,n): t=int(input()) ans=int(ans*t/gcd(ans,t)) print(ans)
s656341291
p03633
u629350026
1590256687
Python
Python (3.4.3)
py
Runtime Error
36
5048
142
from fractions import gcd n=int(input()) t=[0]*n ans=int(input()) for i in range(1,n): t=int(input()) ans=int(ans*t/gcd(ans,t)) print(ans)
s673396706
p03633
u960080897
1590156796
Python
Python (3.4.3)
py
Runtime Error
75
4008
225
def gcd(a, b): if a % b == 0: return b return gcd(b, a % b) def lcm(a, b): return a / gcd(a, b) * b n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(ans, t) print(int(ans))
s312575382
p03633
u960080897
1590156614
Python
Python (3.4.3)
py
Runtime Error
74
4064
224
def gcd(a, b): if a % b == 0: return b return gcd(b, a % b) def lcm(a, b): return a / gcd(a, b) * b n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t,ans) print(int(ans))
s558090065
p03633
u960080897
1590156171
Python
Python (3.4.3)
py
Runtime Error
75
3948
224
def gcd(a, b): if a % b == 0: return b return gcd(b, a % b) def lcm(a, b): return a * b / gcd(a, b) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(t,ans) print(int(ans))
s390342450
p03633
u960080897
1590155935
Python
Python (3.4.3)
py
Runtime Error
74
3948
220
def gcd(a, b): if a % b == 0: return b return gcd(b, a % b) def lcm(a, b): return a * b / gcd(a, b) n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(ans, t) print(ans)
s925715826
p03633
u369502636
1590109513
Python
Python (3.4.3)
py
Runtime Error
17
2940
111
import math n = int(input()) p = 1 for i in range(n) : t = int(input()) p = p*t//math.gcd(p,t) print(p)
s193754752
p03633
u121698457
1590093914
Python
Python (3.4.3)
py
Runtime Error
17
3060
129
import math N = int(input()) G = 1 for i in range(N): D = int(input()) lcm = math.gcd(G, D) G = G * D // lcm print(G)
s695456450
p03633
u121698457
1590093869
Python
Python (3.4.3)
py
Runtime Error
17
2940
141
import math N = int(input()) G = 1 for i in range(N): D = int(input()) lcm = math.floor(math.gcd(G, D)) G = G * D // lcm print(G)
s531907784
p03633
u694649864
1590034383
Python
Python (3.4.3)
py
Runtime Error
24
3692
275
#5問目 import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input()) T = [] for i in range(N): t = int(input()) T.append(t) print(lcm_list(T))
s431853509
p03633
u056358163
1590019597
Python
Python (3.4.3)
py
Runtime Error
18
3060
331
from fraction import gcd from functools import reduce def lcm_base(x, y): return (x * y) // gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input()) T = [] for _ in range(N): T.append(int(input())) ans = lcm_list(T)...