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
s647234922
p03633
u948524308
1567885240
Python
Python (3.4.3)
py
Runtime Error
35
5048
144
import fractions N=int(input()) T0=int(input()) for i in range(1,N): T=int(input()) ans=(T0*T)//fractions.gcd(T0,T) T0=T print(ans)
s542189723
p03633
u948524308
1567884954
Python
Python (3.4.3)
py
Runtime Error
37
5176
142
import fractions N=int(input()) T0=int(input()) for i in range(1,N): T=int(input()) ans=T0*T//fractions.gcd(T0,T) T0=T print(ans)
s420407450
p03633
u598229387
1567877873
Python
Python (3.4.3)
py
Runtime Error
35
5048
188
import fractions n=int(input()) t=[int(input()) for i in range(n)] t.sort() check=t[0] for i in range(n-1): f1=fractions.gcd(t[i],t[i+1]) f2=check*t[i+1]//f1 check=f2 print(f2)
s564514177
p03633
u598229387
1567877779
Python
Python (3.4.3)
py
Runtime Error
35
5048
187
import fractions n=int(input()) t=[int(input()) for i in range(n)] t.sort() check=t[0] for i in range(n-1): f1=fractions.gcd(t[i],t[i+1]) f2=t[i]*t[i+1]//f1 check=f2 print(f2)
s019071493
p03633
u598229387
1567876265
Python
Python (3.4.3)
py
Runtime Error
38
5304
163
import fractions n=int(input()) t=[int(input()) for i in range(n)] t.sort() for i in range(n-1): f1=fractions.gcd(t[i],t[i+1]) f2=t[i]*t[i+1]//f1 print(f2)
s510400257
p03633
u598229387
1567876233
Python
Python (3.4.3)
py
Runtime Error
18
3060
153
import math n=int(input()) t=[int(input()) for i in range(n)] t.sort() for i in range(n-1): f1=math.gcd(t[i],t[i+1]) f2=t[i]*t[i+1]//f1 print(f2)
s443781326
p03633
u881816188
1567609968
Python
Python (3.4.3)
py
Runtime Error
24
3688
230
import math from functools import reduce n=int(input()) a=[int(input()) for i in range(n)] 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(a))
s997013204
p03633
u798316285
1567437493
Python
Python (3.4.3)
py
Runtime Error
37
5108
193
from functools import reduce from fractions import gcd def lcms(a,b): return a*b//gcd(a,b) def lcmm(l): return reduce(lcm,l) n=int(input()) l=[int(input()) for i in range(n)] print(lcmm(l))
s199465713
p03633
u325227960
1567340142
Python
PyPy3 (2.4.0)
py
Runtime Error
281
59884
355
from decimal import * n = int(input()) T = [int(input()) for i in range(n)] for i in range(n): T[i] = Decimal(T[i]) def gcd(x, y): while x != 0 and y != 0: x, y = max(x, y), min(x, y) x %= y return max(x, y) ans = Decimal(1) for i in range(n): ans = ans * T[i] / gcd(ans, T[i]) #a...
s010908133
p03633
u325227960
1567340102
Python
PyPy3 (2.4.0)
py
Runtime Error
282
59884
350
from decimal import * n = int(input()) T = [int(input()) for i in range(n)] for i in range(n): T[i] = Decimal(T[i]) def gcd(x, y): while x != 0 and y != 0: x, y = max(x, y), min(x, y) x %= y return max(x, y) ans = Decimal(1) for i in range(n): ans = ans * T[i] / gcd(ans, T[i]) #a...
s196065761
p03633
u325227960
1567340056
Python
PyPy3 (2.4.0)
py
Runtime Error
285
60012
377
from decimal import * n = int(input()) T = [int(input()) for i in range(n)] for i in range(n): T[i] = Decimal(T[i]) def gcd(x, y): while x != 0 and y != 0: x, y = max(x, y), min(x, y) x %= y return max(x, y) ans = Decimal(1) for i in range(n): ans = Decimal(ans * T[i] / Decimal(gcd(a...
s201854679
p03633
u325227960
1567340011
Python
PyPy3 (2.4.0)
py
Runtime Error
311
62188
368
from decimal import * n = int(input()) T = [int(input()) for i in range(n)] for i in range(n): T[i] = Decimal(T[i]) def gcd(x, y): while x != 0 and y != 0: x, y = max(x, y), min(x, y) x %= y return max(x, y) ans = Decimal(1) for i in range(n): ans = Decimal(ans * T[i] / gcd(ans, T[i]...
s448862180
p03633
u325227960
1567339620
Python
PyPy3 (2.4.0)
py
Runtime Error
288
61420
355
from decimal import * n = int(input()) T = [int(input()) for i in range(n)] for i in range(n): T[i] = Decimal(T[i]) def gcd(x, y): while x != 0 and y != 0: x, y = max(x, y), min(x, y) x %= y return max(x, y) ans = Decimal(1) for i in range(n): ans = ans * T[i] / gcd(ans, T[i]) #a...
s249934633
p03633
u325227960
1567301489
Python
Python (3.4.3)
py
Runtime Error
18
3064
277
n = int(input()) T = [int(input()) for i in range(n)] def gcd(x, y): while x != 0 and y != 0: x, y = max(x, y), min(x, y) x %= y return max(x, y) ans = 1 for i in range(n): ans = ans * T[i] / gcd(ans, T[i]) ans = int(ans + 0.1) print(int(ans))
s929269121
p03633
u344959886
1567110935
Python
Python (3.4.3)
py
Runtime Error
48
5688
220
import fractions n=int(input()) t=[] for i in range(n): t.append(int(input())) if n == 1: ans=1 if n > 1: ans=t[0] for j in range(1,n): ans=int(ans*t[j]/fractions.gcd(ans,t[j])) print(ans)
s981621856
p03633
u344959886
1567110300
Python
Python (3.4.3)
py
Runtime Error
17
3064
194
import math n=int(input()) t=[] for i in range(n): t.append(int(input())) if n == 1: ans=1 if n > 1: ans=t[0] for j in range(1,n): ans=int(ans*t[j]/math.gcd(ans,t[j]))
s741792892
p03633
u344959886
1567109461
Python
Python (3.4.3)
py
Runtime Error
17
3064
263
import math n=int(input()) t=[] for i in range(n): t.append(int(input())) if n == 1: ans=1 else: ans=math.gcd(t[0],t[1]) if n > 2: for j in range(2,n): ans=math.gcd(ans,t[j]) seki=1 for i in t: seki=seki*i print(int(seki/ans))
s146765035
p03633
u344959886
1567109354
Python
Python (3.4.3)
py
Runtime Error
17
3064
258
import math n=int(input()) t=[] for i in range(n): t.append(int(input())) if n == 1: ans=1 else: ans=math.gcd(t[0],t[1]) if n > 2: for j in range(2,n): ans=gcd(ans,t[j]) seki=1 for i in t: seki=seki*i print(int(seki/ans))
s757490581
p03633
u816631826
1567020567
Python
Python (3.4.3)
py
Runtime Error
17
3064
160
import math n=int(input()) ar=[] for i in range(0,n): k=int(input()) ar.append(k) an=ar[0] for x in range(1,n): an=(an*ar[x])/math.gcd(an,ar[x]); print(an)
s958464371
p03633
u018679195
1567014185
Python
Python (3.4.3)
py
Runtime Error
18
2940
137
import math n=int(input()) ar=list(map(int,input().split())) an=ar[0] for x in range(1,n): an=(an*ar[x])/math.gcd(an,ar[x]); print(an)
s754774882
p03633
u089230684
1567014000
Python
Python (2.7.6)
py
Runtime Error
15
2824
142
import math n=int(input()) ar=list(map(int,input().split())) an=ar[0] for x in range(1,len(ar)): an=(an*ar[x])/math.gcd(an,ar[x]); print(an)
s195914245
p03633
u970899068
1566956204
Python
Python (3.4.3)
py
Runtime Error
36
5052
166
import fractions n=int(input()) t=list(int(input()) for i in range(n)) for i in range(n-1): ans=t[i]*t[i+1]//fractions.gcd(t[i],t[i+1]) print(ans)
s755199221
p03633
u994988729
1566903444
Python
Python (3.4.3)
py
Runtime Error
18
3064
272
n=int(input()) T=[int(input()) for _ in range(n)] T.sort(reverse=True) def gcd(x,y): if x<y: x,y=y,x if y==0: return x return gcd(y, x%y) ans=int(T[0]/gcd(T[0], T[1]))*T[1] for i in range(2, n): ans=int(T[i]/gcd(ans,T[i]))*ans print(ans)
s215280553
p03633
u994988729
1566903214
Python
Python (3.4.3)
py
Runtime Error
18
3064
272
n=int(input()) T=[int(input()) for _ in range(n)] T.sort(reverse=True) def gcd(x,y): if x<y: x,y=y,x if y==0: return x return gcd(y, x%y) ans=int(T[0]/gcd(T[0], T[1]))*T[1] for i in range(2, n): ans=int(T[i]/gcd(ans,T[i]))*ans print(ans)
s972147890
p03633
u994988729
1566902953
Python
Python (3.4.3)
py
Runtime Error
18
3064
215
n=int(input()) T=[int(input()) for _ in range(n)] def gcd(x,y): if x<y: x,y=y,x if y==0: return x return gcd(y, x%y) ans=1 for t in T: g=gcd(ans, t) ans=int(ans*t/g) print(ans)
s591132915
p03633
u228223940
1566755337
Python
Python (3.4.3)
py
Runtime Error
51
5560
210
import fractions n = int(input()) a = [int(input()) for i in range(n)] ans = a[0] * a[1] // fractions.gcd(a[0],a[1]) for i in range(1,n-1): ans = ans * a[i+1] // fractions.gcd(ans,a[i+1]) print(ans)
s024903968
p03633
u187516587
1566744911
Python
Python (3.4.3)
py
Runtime Error
36
5048
258
import fractions def lcm(a, b): y = a*b / fractions.gcd(a, b) return int(y) N=int(input()) T = [int(input()) for i in range(N)] if N==1: t=T[0] else: t=lcm(T[0],T[1]) if N>2: for i in range(1,N): t=lcm(t,T[i]) print(t)
s916157466
p03633
u187516587
1566744637
Python
Python (3.4.3)
py
Runtime Error
50
5692
200
import fractions def lcm(a, b): y = a*b / fractions.gcd(a, b) return int(y) N=int(input()) T = [int(input()) for i in range(N)] t=lcm(T[0],T[1]) for i in range(1,N): t=lcm(t,T[i]) print(t)
s326109969
p03633
u706929073
1566703210
Python
Python (3.4.3)
py
Runtime Error
18
3060
326
def gcd(a, b): if 0 == b: return a return gcd(b, a % b) def lcm(a, b): return int(a * b / gcd(a, b)) def lcm_arr(arr): ans = arr[0] for i in range(1, n): ans = lcm(ans, arr[i]) return ans n = int(input()) ans = lcm_arr([int(input()) for _ in range(n)]) print(min(ans, 10 **...
s225176741
p03633
u706929073
1566703176
Python
Python (3.4.3)
py
Runtime Error
18
3060
336
def gcd(a, b): r = a % b if 0 == r: return b return gcd(b, r) def lcm(a, b): return int(a * b / gcd(a, b)) def lcm_arr(arr): ans = arr[0] for i in range(1, n): ans = lcm(ans, arr[i]) return ans n = int(input()) ans = lcm_arr([int(input()) for _ in range(n)]) print(min(...
s839171338
p03633
u706929073
1566702897
Python
Python (3.4.3)
py
Runtime Error
19
3064
521
def euclid(a, b): r = a % b if 0 == r: return b return max(1, euclid(b, r)) def greatest_common_divisor(a, b): return int(a * b / euclid(a, b)) def greatest_common_divisor_arr(arr): if 1 == n: return arr[0] else: d = greatest_common_divisor(arr[0], arr[1]) fo...
s044142747
p03633
u706929073
1566702839
Python
Python (3.4.3)
py
Runtime Error
18
3064
513
def euclid(a, b): r = a % b if 0 == r: return b return euclid(b, r) def greatest_common_divisor(a, b): return int(a * b / euclid(a, b)) def greatest_common_divisor_arr(arr): if 1 == n: return arr[0] else: d = greatest_common_divisor(arr[0], arr[1]) for i in r...
s113567716
p03633
u706929073
1566702544
Python
Python (3.4.3)
py
Runtime Error
17
3064
441
def euclid(a, b): r = a % b if 0 == r: return b return euclid(b, r) def greatest_common_divisor(a, b): return int(a * b / euclid(a, b)) n = int(input()) t = [int(input()) for _ in range(n)] if 1 == n: print(t[0]) elif 2 == n: print(greatest_common_divisor(t[0], t[1])) else: d =...
s599981173
p03633
u706929073
1566702442
Python
Python (3.4.3)
py
Runtime Error
18
3064
446
def euclid(a, b): r = a % b if 0 == r: return b return euclid(b, r) def greatest_common_divisor(a, b): return int(a * b / euclid(a, b)) n = int(input()) t = [int(input()) for _ in range(n)] if 1 == n: print(t[0]) elif 2 == n: print(greatest_common_divisor(t[0], t[1])) else: d =...
s144120592
p03633
u706929073
1566702331
Python
Python (3.4.3)
py
Runtime Error
18
3060
386
def euclid(a, b): r = a % b if 0 == r: return b return euclid(b, r) def greatest_common_divisor(a, b): return int(a * b / euclid(a, b)) n = int(input()) t = [int(input()) for _ in range(n)] if 1 == n: print(t[0]) else: d = greatest_common_divisor(t[0], t[1]) for i in range(2, l...
s630936762
p03633
u238510421
1566447931
Python
Python (3.4.3)
py
Runtime Error
18
3060
272
import sys sys.setrecursionlimit(10**7) N = int(input()) ts = [int(input()) for _ in range(N)] def gcd(a,b): if b == 0: return a return gcd(b,a%b) def lcm(a,b): g = gcd(a,b) return int(a * b / g) l = 1 for t in ts: l = lcm(l,t) print(l)
s859920958
p03633
u238510421
1566447361
Python
Python (3.4.3)
py
Runtime Error
1318
683764
263
import sys sys.setrecursionlimit(10**7) N = int(input()) ts = [int(input()) for _ in range(N)] def gcd(a,b): if b == 0: return a return gcd(b,a%b) def lcm(a,b): g = gcd(a,b) return a/g*b l = 1 for t in ts: l = lcm(l,t) print(l)
s567132612
p03633
u238510421
1566446885
Python
Python (3.4.3)
py
Runtime Error
18
3060
268
import sys sys.setrecursionlimit(10**7) N = int(input()) ts = [int(input()) for _ in range(N)] def gcd(a,b): if b == 0: return a return gcd(b,a%b) def lcm(a,b): g = gcd(a,b) return int(a/g*b) l = 1 for t in ts: l = lcm(l,t) print(l)
s741111012
p03633
u238510421
1566446767
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38512
258
import sys sys.setrecursionlimit(10**7) N = int(input()) ts = [int(input()) for _ in range(N)] def gcd(a,b): if b == 0: return a return gcd(b,a%b) def lcm(a,b): return int(a/gcd(a,b)*b) l = 1 for t in ts: l = lcm(l,t) print(l)
s608009224
p03633
u238510421
1566446450
Python
PyPy3 (2.4.0)
py
Runtime Error
186
38384
258
import sys sys.setrecursionlimit(10**7) N = int(input()) ts = [int(input()) for _ in range(N)] def gcd(a,b): if b == 0: return a return gcd(b,a%b) def lcm(a,b): return int(a*b/gcd(a,b)) l = 1 for t in ts: l = lcm(l,t) print(l)
s476705349
p03633
u238510421
1566444216
Python
PyPy3 (2.4.0)
py
Runtime Error
175
38256
218
N = int(input()) ts = [int(input()) for _ in range(N)] def gcd(a,b): if b == 0: return a return gcd(b,a%b) def lcm(a,b): return int(a*b/gcd(a,b)) l = 1 for t in ts: l = lcm(l,t) print(l)
s805816982
p03633
u614734359
1566410433
Python
Python (3.4.3)
py
Runtime Error
18
3060
188
import math n = int(input()) T = [int(input()) for _ in range(n)] def lcm(x, y): return (x * y) // math.gcd(x, y) T.sort() ans = T.pop(0) for t in T: ans = lcm(ans,t) print(ans)
s456089718
p03633
u609738635
1566333471
Python
Python (3.4.3)
py
Runtime Error
18
3060
310
# -*- coding: utf-8 -*- import math def lcm(a,b): return (a * b) // math.gcd(a, b) def main(N,T): ans = 1 for t in T: ans = lcm(ans, t) print(ans) if __name__ == '__main__': N = int(input()) T = [] for i in range(N): T.append(int(input())) main(N,T)
s709325378
p03633
u353241315
1566252153
Python
Python (3.4.3)
py
Runtime Error
18
3064
377
import sys sys.setrecursionlimit = 100000 def get_gcd(A, B): r = A%B if r == 0: return B else: return get_gcd(B, r) if __name__ == '__main__': N = int(input()) T = [int(input()) for _ in range(N)] for n in range(N-1): gcd = get_gcd(T[n], T[n+1]) ...
s114973457
p03633
u353241315
1566251684
Python
Python (3.4.3)
py
Runtime Error
18
3060
334
def get_gcd(A, B): r = A%B if r == 0: return B else: return get_gcd(B, r) if __name__ == '__main__': N = int(input()) T = [int(input()) for _ in range(N)] for n in range(N-1): gcd = get_gcd(T[n], T[n+1]) T[n+1] = int(T[n]/gcd)*T[n+1] ...
s325299639
p03633
u338929851
1566154841
Python
Python (3.4.3)
py
Runtime Error
17
3060
259
# -*- coding: utf-8 -*- import math if __name__ == '__main__': N = int(input()) T = [] for i in range(N): T.append(int(input())) a = T[0] for i in range(1,N): A = math.gcd(a, T[i]) a = a * T[i] // A print(a)
s035652644
p03633
u338929851
1566154433
Python
Python (3.4.3)
py
Runtime Error
18
3060
283
# -*- coding: utf-8 -*- import math if __name__ == '__main__': N = int(input()) T = [] for i in range(N): T.append(int(input())) a = T[0] for i in range(1,len(T)): A = int(math.gcd(int(a), int(T[i]))) a = a * T[i] / A print(int(a))
s198661797
p03633
u338929851
1566154317
Python
Python (3.4.3)
py
Runtime Error
18
3060
278
# -*- coding: utf-8 -*- import math if __name__ == '__main__': N = int(input()) T = [] for i in range(N): T.append(int(input())) a = T[0] for i in range(1,len(T)): A = math.gcd(int(a), int(T[i])) a = a * T[i] / A print(int(a))
s829353120
p03633
u338929851
1566154272
Python
Python (3.4.3)
py
Runtime Error
18
3064
280
# -*- coding: utf-8 -*- import math if __name__ == '__main__': N = int(input()) T = [] for i in range(N): T.append(int(input())) a = T[0] for i in range(1,len(T)-1): A = math.gcd(int(a), int(T[i])) a = a * T[i] / A print(int(a))
s029699096
p03633
u096616343
1566079464
Python
Python (3.4.3)
py
Runtime Error
75
3948
245
def gcd(a,b): if b > a: return gcd(b,a) if b == 0: return a c = a % b return gcd(b,c) N = int(input()) ans = int(input()) for i in range(N - 1): a = int(input()) ans = ans * a / gcd(ans,a) print(int(ans))
s422071982
p03633
u096616343
1566079033
Python
Python (3.4.3)
py
Runtime Error
74
3996
245
def gcd(a,b): if b > a: return gcd(b,a) if b == 0: return a c = a % b return gcd(b,c) N = int(input()) ans = int(input()) for i in range(N - 1): a = int(input()) ans = ans * a / gcd(ans,a) print(int(ans))
s556211140
p03633
u918009437
1566002586
Python
Python (3.4.3)
py
Runtime Error
23
3688
248
import math from functools import reduce def lcm(a,b): return (a*b)//math.gcd(a,b) def lcm_list(a): return reduce(lcm,a) if __name__ == '__main__': n = int(input()) t = [int(input()) for i in range(n)] print(lcm_list(t))
s285105343
p03633
u219086885
1565914624
Python
Python (3.4.3)
py
Runtime Error
20
3064
176
from math import gcd n = int(input()) tn = [int(input()) for _ in range(n)] answer = tn[0] for i in range(1,n): answer = answer * tn[i] // gcd(answer,tn[i]) print(answer)
s375944951
p03633
u533039576
1565622656
Python
Python (3.4.3)
py
Runtime Error
18
3060
274
def GCD(a:int , b: int) -> int: return a if b == 0 else GCD(b, a % b) def LCM(a: int, b: int) -> int: return a // GCD(a, b) * b n = int(input()) t = [int(input()) for _ in range(n)] ans = LCM(t[0], t[1]) for i in range(2, n): ans = LCM(ans, t[i]) print(ans)
s922733020
p03633
u533039576
1565622593
Python
Python (3.4.3)
py
Runtime Error
17
3060
273
def GCD(a:int , b: int) -> int: return a if b == 0 else GCD(b, a % b) def LCM(a: int, b: int) -> int: return a * b // GCD(a, b) n = int(input()) t = [int(input()) for _ in range(n)] ans = LCM(t[0], t[1]) for i in range(2, n): ans = LCM(ans, t[i]) print(ans)
s933024170
p03633
u830054172
1565321047
Python
Python (3.4.3)
py
Runtime Error
40
5432
241
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) n = int(input()) t = [int(input()) for i in range(n)] print(lcm_list(t))
s176411521
p03633
u830054172
1565320963
Python
Python (3.4.3)
py
Runtime Error
25
3692
236
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 = [int(input()) for i in range(n)] print(lcm_list(t))
s619730740
p03633
u736729525
1565031908
Python
Python (3.4.3)
py
Runtime Error
18
3060
238
N = int(input()) T = [0]*N for i in range(N): T[i] = int(input()) # N < 100 # gcd(a,b) lcd(a,b) = ab from math import gcd def lcd(a, b): return a*b//gcd(a,b) l = 1 g = 0 for t in T: l = lcd(l, t) g = gcd(g, t) print(l)
s381049668
p03633
u245870380
1564929057
Python
Python (3.4.3)
py
Runtime Error
18
3060
154
import math N = int(input()) T = [int(input()) for _ in range(N)] for i in range(N-1): T[i+1] = (T[i] * T[i+1]) // math.gcd(T[i], T[i+1]) print(T[-1])
s304119824
p03633
u251945221
1564770689
Python
PyPy3 (2.4.0)
py
Runtime Error
177
38384
204
import math def lcm(x, y): return (x * y) // math.gcd(x, y) N = int(input()[0]) T = [] for i in range(N): T.append(int(input())) ans = 1 for i in range(N): ans = lcm(ans, T[i]) print(ans)
s099296862
p03633
u251945221
1564770295
Python
Python (3.4.3)
py
Runtime Error
21
3316
204
import math def lcm(x, y): return (x * y) // math.gcd(x, y) N = int(input()[0]) T = [] for i in range(N): T.append(int(input())) ans = 1 for i in range(N): ans = lcm(ans, T[i]) print(ans)
s455707139
p03633
u067983636
1564611449
Python
Python (3.4.3)
py
Runtime Error
17
2940
202
def l(a, b): if a > b: a, b = b, a return l(a, b % a) if b % a else a def g(a, b): return a * b // l(a, b) N = int(input()) res = 1 for n in range(N): res = g(res, int(input()) print(res)
s572143722
p03633
u800258529
1564513497
Python
Python (3.4.3)
py
Runtime Error
17
2940
129
import math n=int(input()) t=[int(input()) for _ in [0]*n] d=t[0] for i in range(1,n): d=(t[i]*d)//math.gcd(t[i],d) print(d)
s769028192
p03633
u800258529
1564513412
Python
Python (3.4.3)
py
Runtime Error
17
3060
142
import math n=int(input()) t=[int(input()) for _ in [0]*n] d=t[0] print(d) for i in range(1,n): d=(t[i]*d)//math.gcd(t[i],d) print(d)
s267226306
p03633
u928784113
1564408124
Python
Python (3.4.3)
py
Runtime Error
37
5172
1671
from collections import deque,defaultdict,Counter from itertools import accumulate import bisect from heapq import heappop,heappush from fractions import gcd from copy import deepcopy import math Mod = 1000000007 def main(): #startline------------------------------------------- N = int(input()) T = [int(inpu...
s184571774
p03633
u707870100
1563837392
Python
Python (3.4.3)
py
Runtime Error
18
3060
372
# -*- coding: utf-8 -*- #ABC070C import math #def lcm(x, y): # ans=((x * y) // math.gcd(x, y)) # return ans n = int(input()) #tmp = input().split() #hoge = list(map(lambda a: int(a), tmp)) t=[] for i in range(0,n): t.append(0) for i in range(0,n): t[i] = int(input()) ans = t[0] for i in range(1,n): j = math.g...
s300110414
p03633
u707870100
1563835560
Python
Python (3.4.3)
py
Runtime Error
18
3060
339
# -*- coding: utf-8 -*- #ABC070C import math def lcm(x, y): ans=((x * y) // math.gcd(x, y)) return ans n = int(input()) #tmp = input().split() #hoge = list(map(lambda a: int(a), tmp)) t=[] for i in range(0,n): t.append(0) for i in range(0,n): t[i] = int(input()) ans = t[0] for i in range(1,n): ans = lcm(ans...
s862162564
p03633
u707870100
1563835369
Python
Python (3.4.3)
py
Runtime Error
18
3060
315
# -*- coding: utf-8 -*- #ABC070C import math def lcm(x, y): ans=((x * y) // math.gcd(x, y)) return ans n = int(input()) #tmp = input().split() #hoge = list(map(lambda a: int(a), tmp)) t=[] for i in range(0,n): t.append(int(input())) #print(t) ans = t[0] for i in range(1,n): ans = lcm(ans,t[i]) print(ans)
s048884538
p03633
u707870100
1563835274
Python
Python (3.4.3)
py
Runtime Error
17
3060
307
# -*- coding: utf-8 -*- #ABC070C import math def lcm(x, y): return (x * y) // math.gcd(x, y) n = int(input()) #tmp = input().split() #hoge = list(map(lambda a: int(a), tmp)) t=[] for i in range(0,n): t.append(int(input())) #print(t) ans = t[0] for i in range(1,n): ans = lcm(ans,t[i]) print(ans)
s428114849
p03633
u707870100
1563834523
Python
Python (3.4.3)
py
Runtime Error
18
3064
306
# -*- coding: utf-8 -*- #ABC070C import math def lcm(x, y): return (x * y) // math.gcd(x, y) n = int(input()) #tmp = input().split() #hoge = list(map(lambda a: int(a), tmp)) t=[] for i in range(0,n): t.append(int(input())) #print(t) ans = t[0] for i in range(1,n): ans = lcm(ans,t[i]) print(ans)
s717013203
p03633
u707870100
1563834356
Python
Python (3.4.3)
py
Runtime Error
18
3060
308
# -*- coding: utf-8 -*- #ABC070C import math def lcm(x, y): return (x * y) // math.gcd(x, y) n = int(input()) #tmp = input().split() #hoge = list(map(lambda a: int(a), tmp)) t=[] for i in range(0,n): t.append(int(input())) #print(t) ans = t[0] for i in range(1,n): ans = lcm(ans,t[i]) print(ans)
s779884650
p03633
u707870100
1563834204
Python
Python (3.4.3)
py
Runtime Error
18
3064
306
# -*- coding: utf-8 -*- #ABC070C import math def lcm(x, y): return (x * y) // math.gcd(x, y) n = int(input()) #tmp = input().split() #hoge = list(map(lambda a: int(a), tmp)) t=[] for i in range(0,n): t.append(int(input())) #print(t) ans = t[0] for i in range(1,n): ans = lcm(ans,t[i]) print(ans)
s720970455
p03633
u647999897
1563667237
Python
Python (3.4.3)
py
Runtime Error
36
5048
285
import math import fractions def main(): N = int(input()) ans = int(input()) for i in range(N-1): T = int(input()) ans = (ans * T) / fractions.gcd(ans, T) # 最小公倍数 ans = int(ans) print(ans) if __name__ == "__main__": main()
s627201941
p03633
u796060588
1563665598
Python
Python (3.4.3)
py
Runtime Error
37
5048
282
import math import fractions def main(): N = int(input()) ans = int(input()) for i in range(N-1): T = int(input()) ans = (ans * T) / fractions.gcd(ans, T) # 最小公倍数 ans = int(ans) print(ans) if __name__ == "__main__": main()
s192687413
p03633
u728566015
1563660375
Python
Python (3.4.3)
py
Runtime Error
38
5076
417
import math from fractions import gcd from functools import reduce N = int(input()) T = [int(input()) for i in range(N)] def gcd(numbers): # "numbers" is list return reduce(gcd, numbers, 1) def lcm_base(x, y): return (x * y) // gcd(x, y) def lcm(numbers): # "numbers" is list return reduce(lcm_base,...
s873060493
p03633
u728566015
1563660243
Python
Python (3.4.3)
py
Runtime Error
24
3688
400
import math from functools import reduce N = int(input()) T = [int(input()) for i in range(N)] def gcd(numbers): # "numbers" is list return reduce(math.gcd, numbers,1) def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(numbers): # "numbers" is list return reduce(lcm_base, numbers, ...
s442891648
p03633
u728566015
1563660133
Python
Python (3.4.3)
py
Runtime Error
23
3700
398
import math from functools import reduce N = int(input()) T = [int(input()) for i in range(N)] def gcd(numbers): # "numbers" is list return reduce(math.gcd, numbers) def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(numbers): # "numbers" is list return reduce(lcm_base, numbers, ...
s282669506
p03633
u089668660
1563413110
Python
Python (3.4.3)
py
Runtime Error
2104
3064
416
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def a(j,k): if j>=k: while k!=0: j,k= k,j%k return j else: while j!=0: k,j =j, k%j return k; def b(s , r): h = a(s,r) return s*r/h n = int(input()) t = [] for i in range(n): t.append(...
s305168950
p03633
u796060588
1563383341
Python
Python (3.4.3)
py
Runtime Error
38
5304
250
import fractions def main(): N = int(input()) ans = int(input()) for i in range(N-1): T = int(input()) ans = (ans * T) / fractions.gcd(ans, T) ans = int(ans) print(ans) if __name__ == "__main__": main()
s118229571
p03633
u745561510
1563381332
Python
Python (3.4.3)
py
Runtime Error
18
3064
291
import sys sys.setrecursionlimit(100000) N = int(input()) T = [int(input()) for i in range(N)] def gcd(a, b): if b == 0: return a return gcd(b, a % b) def lcm(a, b): return int((a * b) / gcd(a, b)) ans = T[0] for i in range(1, N): ans = lcm(ans, T[i]) print(ans)
s541580592
p03633
u745561510
1563380860
Python
Python (3.4.3)
py
Runtime Error
18
3064
296
import sys sys.setrecursionlimit(100000) N = int(input()) T = [int(input()) for i in range(N)] def gcd(a, b): if b == 0: return a return gcd(b, a % b) def lcm(a, b): return int((a * b) / gcd(a, b)) ans = T[0] for i in range(1, len(T)): ans = lcm(ans, T[i]) print(ans)
s125946388
p03633
u745561510
1563380796
Python
Python (3.4.3)
py
Runtime Error
18
3064
254
N = int(input()) T = [int(input()) for i in range(N)] def gcd(a, b): if b == 0: return a return gcd(b, a % b) def lcm(a, b): return int((a * b) / gcd(a, b)) ans = T[0] for i in range(1, len(T)): ans = lcm(ans, T[i]) print(ans)
s209001595
p03633
u188244611
1563199143
Python
Python (3.4.3)
py
Runtime Error
17
3060
202
# ABC 70, C - multiple clock import math n = int(input()) T = [] for i in range(n): T.append(int(input())) ans = T[0] for i in range(1, n): ans = ans * T[i] // math.gcd(ans, T[i]) print(ans)
s897712764
p03633
u693933222
1563034267
Python
Python (3.4.3)
py
Runtime Error
17
3060
229
import math def lcm(x, y): return (x * y) // math.gcd(x, y) n = int(input()) t = int(input()) for i in range(n-1): p = int(input()) if(p%t == 0 and p>=t): t = p else: lcm(t,p) print(t)
s463402413
p03633
u693933222
1562992998
Python
Python (3.4.3)
py
Runtime Error
17
3056
185
import math def lcm(x, y): return (x * y) // math.gcd(x, y) n = int(input()) t = int(input()) for i in range(n-1): p = int(input()) t = lcm(t,p) if(p!=t) else t print(t)
s897163430
p03633
u693933222
1562991549
Python
Python (3.4.3)
py
Runtime Error
17
3056
159
import math def lcm(x, y): return (x * y) // math.gcd(x, y) n = int(input()) t = int(input()) for i in range(n-1): t = lcm(t,int(input())) print(t)
s936925114
p03633
u532966492
1562819356
Python
Python (3.4.3)
py
Runtime Error
35
5048
145
from fractions import gcd N=int(input()) T=[int(input()) for _ in range(N)] for t in T: a=gcd(a,t) ans=a for t in T: ans*=t//a print(ans)
s102561978
p03633
u379959788
1562611092
Python
Python (3.4.3)
py
Runtime Error
23
3572
259
# ABC070-C import math from functools import reduce N = int(input()) T = [] for i in range(N): T.append(int(input())) def lcm_base(x, y): return (x * y ) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers) print(lcm_list(T))
s864216455
p03633
u828766688
1562301132
Python
PyPy3 (2.4.0)
py
Runtime Error
290
60396
201
from decimal import Decimal import fractions N = int(input()) now = Decimal("1") for i in range(N): T = Decimal(input()) now = now * T / fractions.gcd(now,T) print("{:.0f}".format(now))
s792241390
p03633
u828766688
1562300809
Python
PyPy3 (2.4.0)
py
Runtime Error
283
60396
219
from decimal import Decimal import fractions N = int(input()) now = Decimal("1") for i in range(N): T = Decimal(input()) now = now * T / fractions.gcd(now,T) now = int(now) print("{:.100g}".format(now))
s775754027
p03633
u065079240
1561998232
Python
Python (3.4.3)
py
Runtime Error
93
5960
329
import fractions def GCD(a, b): if b == 0: return a else: return GCD(b, a % b) N = int(input()) clock = [0] * N for j in range(N): clock[j] = int(input()) gcd = clock[0] ans = clock[0] for i in range(1, N): gcd = GCD(ans, clock[i]) ans = ans/gcd ans = ans * clock[i] print(i...
s736888900
p03633
u065079240
1561997929
Python
Python (3.4.3)
py
Runtime Error
37
5048
331
import fractions def GCD(a, b): if b == 0: return a else: return GCD(b, a % b) N = int(input()) clock = [0]*N gcd = int(input()) clock[0] += gcd ans = clock[0] for i in range(1, N): clock[i] = int(input()) gcd = GCD(gcd, clock[i]) ans = ans/gcd ans = ans * clock[i] print...
s711167259
p03633
u065079240
1561997492
Python
Python (3.4.3)
py
Runtime Error
92
5956
321
import fractions def GCD(a, b): if b == 0: return a else: return GCD(b, a % b) N = int(input()) clock = [0]*N gcd = int(input()) clock[0] = gcd ans = clock[0] for i in range(1, N): clock[i] = int(input()) gcd = GCD(ans, clock[i]) ans = ans/gcd ans *= clock[i] print(int(ans))...
s597030110
p03633
u065079240
1561997377
Python
Python (3.4.3)
py
Runtime Error
35
5048
311
import fractions def GCD(a, b): if b == 0: return a else: GCD(b, a % b) N = int(input()) clock = [0]*N gcd = int(input()) clock[0] = gcd ans = clock[0] for i in range(1, N): clock[i] = int(input()) gcd = GCD(ans, clock[i]) ans /= gcd ans *= clock[i] print(int(ans))
s580281348
p03633
u968097972
1561840469
Python
Python (3.4.3)
py
Runtime Error
18
3064
447
def gcd(a, b): if b == 0: return a return gcd(b, a%b) def lcm(a,b): return int(a*b / gcd(a,b)) #a, b, c, d = (int(i) for i in input().split()) #W = [int(i) for i in input().split()] #import math #N, K = (int(i) for i in input().split()) #S = input() S_list = [] t_list = [] N = int(input()) fo...
s570678903
p03633
u755830696
1561829733
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38256
282
def gcd(a, b): if b == 0: return a return gcd(b, a % b) def lcm(a, b): return a * b // math.gcd(a, b) N = int(input()) T = [] for i in range(N): t = int(input()) T.append(t) ans = 1 for i in range(N): ans = lcm(ans, T[i]) print(ans)
s787725239
p03633
u755830696
1561829598
Python
PyPy3 (2.4.0)
py
Runtime Error
167
38384
217
import math def lcm(a, b): return a * b // math.gcd(a, b) N = int(input()) T = [] for i in range(N): t = int(input()) T.append(t) ans = 1 for i in range(N): ans = lcm(ans, T[i]) print(ans)
s078986646
p03633
u711539583
1561762865
Python
Python (3.4.3)
py
Runtime Error
74
3948
208
n = int(input()) def gcd(a, b): if not b: return a else: return gcd(b, a % b) def lcm(a, b): return a * b / gcd(a, b) ans = 1 for _ in range(n): c = int(input()) ans = lcm(ans, c) print(ans)
s677933605
p03633
u820047642
1561705930
Python
Python (3.4.3)
py
Runtime Error
35
5048
131
from fractions import gcd def lcm(a,b):return int(a*b/gcd(a,b)) N,x=int(input()),1 for _ in range(N):x=lcm(x,int(input())) print(x)
s257311148
p03633
u462329577
1561429149
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38324
269
import math N = int(input()) T = [] for i in range(N): T.append(int(input())) # output LCM(T1,T2... Tn)=LCM(Tn,LCM(Tn-1,LCM(...))) def lcm(a,b): g = math.gcd(a,b) #print(g) return int(a*b/g) ans = T[0] for i in range(1,len(T)): ans = lcm(ans,T[i]) print(ans)