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
s160978539
p03633
u557437077
1542870741
Python
Python (3.4.3)
py
Runtime Error
18
3064
1800
def gcd(a, b): while b: a, b = b, a % b return a def lcm(a, b): return int(a * b / gcd(a, b)) n = int(input()) # つまり全t[i]で割り切れる値を出せということ # 最小公倍数を出せばよい t = [0 for i in range(n)] for i in range(n): t[i] = int(input()) sum = t[0] for i in range(1, n): # print("sum:{} t:{} lcm:{}".format(sum...
s981844735
p03633
u557437077
1542870453
Python
Python (3.4.3)
py
Runtime Error
17
3064
1966
""" def gcd(m, n): x = max(m, n) y = min(m, n) if x % y == 0: return y else: while x % y != 0: z = x % y x = y y = z else: return z """ def gcd(a, b): while b: a, b = b, a % b return a def lcm(a, b): return i...
s083693521
p03633
u557437077
1542870261
Python
Python (3.4.3)
py
Runtime Error
18
3064
1891
def gcd(m, n): x = max(m, n) y = min(m, n) if x % y == 0: return y else: while x % y != 0: z = x % y x = y y = z else: return z def lcm(m, n): return int(m * n / gcd(m, n)) n = int(input()) # つまり全t[i]で割り切れる値を出せということ # 最小公倍数を...
s742054622
p03633
u272557899
1542769444
Python
Python (3.4.3)
py
Runtime Error
23
3688
448
import math from functools import reduce n = int(input()) d = [] for i in range(n): d.append(input()) # [d1, d2, d3, ..., dN] t = [int(m) for m in d] 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_b...
s373107443
p03633
u411517988
1542599948
Python
Python (3.4.3)
py
Runtime Error
17
3056
152
import math n = int(input()) def lcm(x,y): return (x * y) // math.gcd(x, y) ct = 1 for _ in range(n): t = int(input()) ct = lcm(ct,t) print(ct)
s396159822
p03633
u029329478
1542147204
Python
Python (3.4.3)
py
Runtime Error
18
3060
309
# 最大公約数 def gcd(m, n): while(n != 0): temp = n n = m % n m = temp return m N = int(input()) T = [int(input()) for _ in range(N)] ans = 0 for i in range(len(T)): if ans == 0: ans = T[i] else: ans = int(ans / gcd(ans, T[i])) * T[i] print(ans)
s904095914
p03633
u029329478
1542145654
Python
Python (3.4.3)
py
Runtime Error
18
3064
311
# 最大公約数 def gcd(m, n): while(n != 0): temp = n n = m % n m = temp return m N = int(input()) T = [int(input()) for _ in range(N)] ans = 0 for i in range(len(T)): if ans == 0: ans = T[i] else: ans = int((ans * T[i]) / gcd(ans, T[i])) print(ans)
s789839538
p03633
u029329478
1542144596
Python
Python (3.4.3)
py
Runtime Error
18
3060
328
# 最大公約数 def gcd(m, n): temp = 0 while(m % n != 0): temp = n n = m % n m = temp return n N = int(input()) T = [int(input()) for _ in range(N)] ans = 0 for i in range(len(T)): if ans == 0: ans = T[i] else: ans = int((ans * T[i]) / gcd(ans, T[i])) print(ans)
s137380419
p03633
u236127431
1542087899
Python
Python (3.4.3)
py
Runtime Error
17
3060
198
def gcd(a,b): if a<b: a,b=b,a while b>0: a,b=b,a%b return int(a) def lcm(a,b): return int(a*b/gcd(a,b)) N=int(input()) T=1 for i in range(N): ti=int(input()) T=lcm(T,ti) print(T)
s665044592
p03633
u236127431
1542087807
Python
Python (3.4.3)
py
Runtime Error
18
3056
176
def gcd(a,b): while b>0: a,b=b,a%b return int(a) def lcm(a,b): return int(a*b/gcd(a,b)) N=int(input()) T=1 for i in range(N): ti=int(input()) T=lcm(T,ti) print(T)
s734510810
p03633
u236127431
1542087646
Python
Python (3.4.3)
py
Runtime Error
18
3060
199
def gcd(a,b): while b>0: a,b=b,a%b return int(a) def lcm(a,b): return int(a*b/gcd(a,b)) N=int(input()) List_T=[int(input()) for i in range(N)] T=1 n=1 for i in List_T: T=lcm(T,i) print(T)
s745841586
p03633
u236127431
1542086758
Python
Python (3.4.3)
py
Runtime Error
18
3060
209
def gcd(a,b): while a>=1 and b>=1: a,b=b,a%b return int(a) def lcm(a,b): return int(a*b/gcd(a,b)) N=int(input()) List_T=[int(input()) for i in range(N)] T=1 n=1 for i in List_T: T=lcm(T,i) print(T)
s734946177
p03633
u236127431
1542086109
Python
Python (3.4.3)
py
Runtime Error
17
3064
205
def gcd(a,b): while b>=1: a,b=b,a%b return int(a) def lcm(a,b): return int(a*b/gcd(a,b)) N=int(input()) List_T=[int(input()) for i in range(N)] T=1 n=1 for i in List_T: T=lcm(T,i) print(int(T))
s872008836
p03633
u236127431
1542086021
Python
Python (3.4.3)
py
Runtime Error
18
3060
192
def gcd(a,b): while b>=1: a,b=b,a%b return a def lcm(a,b): return a*b/gcd(a,b) N=int(input()) List_T=[int(input()) for i in range(N)] T=1 for i in List_T: T=lcm(T,i) print(int(T))
s620126039
p03633
u236127431
1542085562
Python
Python (3.4.3)
py
Runtime Error
18
3064
195
def gcd(a,b): while b>=1: a,b=b,a%b return a def lcm(a,b): return a*b/gcd(a,b) N=int(input()) List_T=[int(input()) for i in range(N)] T=1 n=1 for i in List_T: T=lcm(T,i) print(int(T))
s435617204
p03633
u131405882
1542064271
Python
Python (3.4.3)
py
Runtime Error
75
3944
222
def gcd(x, y): if x < y: x, y = y, x if y == 0: return x z = x % y return gcd(y, z) N=int(input()) prenum = 1 for i in range(N): T = int(input()) lcm = prenum / gcd(prenum, T) * T prenum = lcm print(str(lcm))
s390144483
p03633
u131405882
1542064022
Python
Python (3.4.3)
py
Runtime Error
75
3948
224
def gcd(x, y): if x < y: x, y = y, x if y == 0: return x z = x % y return gcd(y, z) N=int(input()) prenum = 1 for i in range(N): T = int(input()) lcm = (prenum / gcd(prenum, T)) * T prenum = lcm print(int(lcm))
s298758409
p03633
u131405882
1542063664
Python
Python (3.4.3)
py
Runtime Error
75
3944
224
def gcd(x, y): if x < y: x, y = y, x if y == 0: return x z = x % y return gcd(y, z) N=int(input()) prenum = 1 for i in range(N): T = int(input()) lcm = (prenum / gcd(T, prenum)) * T prenum = lcm print(int(lcm))
s231465873
p03633
u131405882
1542063400
Python
Python (3.4.3)
py
Runtime Error
74
3948
222
def gcd(x, y): if x < y: x, y = y, x if y == 0: return x z = x % y return gcd(y, z) N=int(input()) prenum = 1 for i in range(N): T = int(input()) lcm = (prenum*T) / gcd(T, prenum) prenum = lcm print(int(lcm))
s058972120
p03633
u179169725
1541948193
Python
Python (3.4.3)
py
Runtime Error
21
3060
308
N = int(input()) T = [] for i in range(N): T.append(int(input())) T.sort() def gcd(a, b): while (b != 0): tmp = a a = b b = tmp % b return a def lcm(a, b): return int(a*b/gcd(a, b)) ans = T[0] for t in T[1:]: ans = lcm(ans, t) # print(ans) print(ans)
s003850421
p03633
u434329006
1541866407
Python
Python (3.4.3)
py
Runtime Error
24
3572
508
import math from functools import reduce def gcd(*numbers): return reduce(math.gcd, numbers) def gcd_list(numbers): return reduce(math.gcd, numbers) 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(l...
s857910498
p03633
u434329006
1541866316
Python
Python (3.4.3)
py
Runtime Error
23
3664
440
import math from functools import reduce def gcd(*numbers): return reduce(math.gcd, numbers) def gcd_list(numbers): return reduce(math.gcd, numbers) 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(...
s464791163
p03633
u620480037
1541826185
Python
Python (3.4.3)
py
Runtime Error
18
3060
383
N=int(input()) T=int(input()) gcd=100000000000000000000000 for i in range(N-1): T1=int(input()) A=max(T,T1) B=min(T,T1) for j in range(1000000000000): if A%B==0: gcd=B break else: C=A%B if C>B: A=C ...
s444010201
p03633
u731028462
1541774977
Python
Python (3.4.3)
py
Runtime Error
18
3064
182
def gcd(a, b): while b: a, b = b, a%b return a N = int(input()) ans = 1 for i in range(0,N): t = int(input()) ans = int((ans / gcd(ans, t) * t)) print(ans)
s528594345
p03633
u731028462
1541774603
Python
Python (3.4.3)
py
Runtime Error
18
3064
261
def gcd(a, b): while b: a, b = b, a%b return a N = int(input()) ans = 1 for i in range(0,N): t = int(input()) if t == 1000000000000000000: ans = 1000000000000000000 break ans = int((ans * t) / gcd(ans, t)) print(ans)
s982672925
p03633
u731028462
1541774498
Python
Python (3.4.3)
py
Runtime Error
18
2940
180
def gcd(a, b): while b: a, b = b, a%b return a N = int(input()) ans = 1 for i in range(0,N): t = int(input()) ans = int(t * (ans / gcd(ans, t))) print(ans)
s569181033
p03633
u731028462
1541774431
Python
Python (3.4.3)
py
Runtime Error
21
3060
180
def gcd(a, b): while b: a, b = b, a%b return a N = int(input()) ans = 1 for i in range(0,N): t = int(input()) ans = int((ans * t) / gcd(ans, t)) print(ans)
s179590326
p03633
u731028462
1541774249
Python
Python (3.4.3)
py
Runtime Error
18
3060
133
import math N = int(input()) ans = 1 for i in range(0,N): t = int(input()) ans = int((ans * t) / math.gcd(ans, t)) print(ans)
s096239887
p03633
u879870653
1541772175
Python
Python (3.4.3)
py
Runtime Error
18
3064
376
N = int(input()) T = [int(input()) for i in range(N)] #P = list(set(T)) def gcd(a,b) : a,b = min(a,b),max(a,b) while b > 0 : a,b = b, a%b return a def lcm(a,b) : return a*b//gcd(a,b) for i in range(len(T)-1) : if i == 0 : ans = lcm(T[i],T[i+1]) else : p = lcm(T[i],T[i+...
s448441090
p03633
u879870653
1541771931
Python
Python (3.4.3)
py
Runtime Error
20
3188
347
N = int(input()) T = [int(input()) for i in range(N)] P = list(set(T)) def gcd(a,b) : while b > 0 : a,b = b, a%b return a def lcm(a,b) : return a*b//gcd(a,b) for i in range(len(P)-1) : if i == 0 : ans = lcm(P[i],P[i+1]) else : p = lcm(P[i],P[i+1]) if p > ans : ...
s417470942
p03633
u136395536
1541770138
Python
Python (3.4.3)
py
Runtime Error
24
3064
337
def euclid(A,B): big = max(A,B) small = min(A,B) r = big % small while r != 0: big = small small = r r = big % small return small def LCM(A,B): return int(A*B/euclid(A,B)) N = int(input()) time = 1 for i in range(N): T = int(input()) time = LCM(tim...
s876596935
p03633
u426108351
1541705107
Python
Python (3.4.3)
py
Runtime Error
18
2940
157
from math import gcd N = int(input()) a = int(input()) for i in range(N-1): b = int(input()) c = a * b / gcd(a, b) a = b b = c print(int(c))
s165247747
p03633
u285022453
1541372740
Python
Python (3.4.3)
py
Runtime Error
21
3316
416
from collections import deque N = int(input()) # 最大公約数 def gcd(a, b): while b > 0: a, b = b, a%b return a # 最小公倍数 def lcm(a, b): return a*b/gcd(a, b) array = deque() for _ in range(N): array.append(int(input())) if len(array) == 1: print(array[0]) while len(array) > 1: a = array....
s181431878
p03633
u200030766
1541372369
Python
Python (3.4.3)
py
Runtime Error
18
3064
243
a=[] N = int(input()) for i in range(N): a.append(int(input().strip())) def gcd(a,b): if b==0: return a return gcd(b,a%b) for i in range(len(a)-1): gcd(a[i],a[i+1]) lcm=(a[i]*a[i+1])//gcd(a[i],a[i+1]) print(lcm)
s686942503
p03633
u285022453
1541372074
Python
Python (3.4.3)
py
Runtime Error
24
3684
453
from functools import lru_cache from collections import deque N = int(input()) # 最大公約数 def gcd(a, b): while b > 0: a, b = b, a%b return a # 最小公倍数 def lcm(a, b): return a*b/gcd(a, b) array = deque() for _ in range(N): array.append(int(input())) #@lru_cache(maxsize = None) #def multi_lcm():...
s279339902
p03633
u883048396
1541172913
Python
Python (3.4.3)
py
Runtime Error
19
3192
345
import sys def 解(): iN = int(sys.stdin.readline()) aT = [int(_) for _ in sys.stdin.readlines()] #公倍数を求めるだけ def fgcd(a,b): while b: a,b = b, a%b return a lcm = aT[0] * aT[1] // fgcd(aT[0],aT[1]) for a in aT[2:]: lcm = lcm * a // fgcd(lcm,a) print(lcm) 解...
s573170793
p03633
u240793404
1541010254
Python
Python (3.4.3)
py
Runtime Error
17
3060
119
import math n = int(input()) lc = 1 for i in range(n): t = int(input()) lc = lc * t // math.gcd(lc,t) print(lc)
s058974201
p03633
u240793404
1541010230
Python
Python (3.4.3)
py
Runtime Error
18
3060
110
import math input() lc = 1 for i in range(n): t = int(input()) lc = lc * t // math.gcd(lc,t) print(lc)
s904194073
p03633
u240793404
1541010175
Python
Python (3.4.3)
py
Runtime Error
17
3060
117
import math input() t = list(map(int,input().split())) lc = 1 for i in t: lc = lc * t // math.gcd(lc,t) print(lc)
s013120480
p03633
u513081876
1541005445
Python
Python (3.4.3)
py
Runtime Error
17
2940
266
= int(input()) T = sorted([int(input()) for i in range(N)]) def gcd(a, b): while b != 0: a, b = b,a%b return a if N == 1: print(T[0]) else: ans = T[0] for i in range(1, N): ans = (ans*T[i])//(gcd(ans, T[i])) print(ans)
s411040224
p03633
u411858517
1540872421
Python
Python (3.4.3)
py
Runtime Error
75
3948
269
N = int(input()) L = [ int(input()) for i in range(N)] L.sort() def gcd(a, b): if b == 0: return a return gcd(b, a % b) def lcm(a, b): return a * b / gcd(a, b) x = L[0] for i in range(len(L)-1): y = lcm(x, L[i+1]) x = y print(int(x))
s536251110
p03633
u411858517
1540872127
Python
Python (3.4.3)
py
Runtime Error
74
3956
260
N = int(input()) L = [ 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 a * b / gcd(a, b) x = L[0] for i in range(len(L)-1): y = lcm(x, L[i+1]) x = y print(int(x))
s187487930
p03633
u943657163
1540855816
Python
Python (3.4.3)
py
Runtime Error
17
2940
133
from math import gcd n = int(input()) ans = 1 for _ in range(n): x = int(input()) ans = ans * x // gcd(ans, x) print(ans)
s911550614
p03633
u368780724
1540824015
Python
Python (3.4.3)
py
Runtime Error
17
3064
306
def gcd(a,b): if a == 1 or b == 1: return 1 if a == b: return a if a > b: a,b = b,a if b%a == 0: return a b = b%a return gcd(a,b) N = int(input()) A = 1 for _ in range(N): B = int(input()) ans = int(A*B/gcd(A,B)) A = ans print(ans)
s478668587
p03633
u294000907
1540699418
Python
Python (3.4.3)
py
Runtime Error
18
3060
244
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import math n=int(input()) l = [] for i in range(0,n): l.append(int(input())) def lcm(x, y): return (x * y) // math.gcd(x, y) res=l[0] for i in range(1,n): res=lcm(res,l[i]) print(res)
s868363276
p03633
u738835924
1540310188
Python
Python (3.4.3)
py
Runtime Error
45
5472
218
#ABC 070: C [beta] from fractions import gcd N = int(input()) clocks = [] for i in range(N): clocks.append(int(input())) a = clocks[0] for i in range(1, N): a = gcd(a, clocks[i]) b = b * clocks[i] / a print(b)
s788234093
p03633
u738835924
1540310110
Python
Python (3.4.3)
py
Runtime Error
53
5600
218
#ABC 070: C [beta] from fractions import gcd N = int(input()) clocks = [] for i in range(N): clocks.append(int(input())) a = clocks[0] for i in range(1, N): a = gcd(a, clocks[i]) b = a * clocks[i] / a print(b)
s741481310
p03633
u738835924
1540310052
Python
Python (3.4.3)
py
Runtime Error
17
2940
217
#ABC 070: C [beta] from fraction import gcd N = int(input()) clocks = [] for i in range(N): clocks.append(int(input())) a = clocks[0] for i in range(1, N): a = gcd(a, clocks[i]) b = a * clocks[i] / a print(b)
s637721587
p03633
u963316883
1539985162
Python
Python (3.4.3)
py
Runtime Error
17
3060
203
import fraction def lcm(x, y): return (x * y) // fraction.gcd(x, y) N = int(input()) T = [int(input()) for i in range(N)] ans = 1 for value in range(0, N): ans = lcm(ans, T[value]) print(ans)
s434222904
p03633
u963316883
1539984966
Python
Python (3.4.3)
py
Runtime Error
18
3064
219
import math def lcm(x, y): return (x * y) // math.gcd(x, y) N = int(input()) T = [] for i in range(0, N): T.append(input()) ans = 1 for value in range(0, N): ans = lcm(ans, int(T[value])) print(str(ans))
s738916757
p03633
u371763408
1539796231
Python
Python (3.4.3)
py
Runtime Error
18
3060
218
n = int(input()) T=[int(input()) for i in range(n)] T = sorted(T,reverse=True) for i in range(2,100): if T[0] % T[1] !=0: if sum(map(lambda x:x/2, T)) !=0: T[0] = T[0]*i else: print(T[0]) exit()
s870133444
p03633
u371763408
1539796195
Python
Python (3.4.3)
py
Runtime Error
18
3060
218
n = int(input()) T=[int(input()) for i in range(n)] T = sorted(T,reverse=True) for i in range(2,100): if T[0] % T[1] !=0: if sum(map(lambda x:T/2, T)) !=0: T[0] = T[0]*i else: print(T[0]) exit()
s695599146
p03633
u371763408
1539795860
Python
Python (3.4.3)
py
Runtime Error
18
3060
177
n = int(input()) T=[int(input()) for i in range(n)] T = sorted(T,reverse=True) for i in range(2,100): if T[0] % T[1] !=0: T[0] = T[0]*i else: print(T[0]) exit()
s307742091
p03633
u334351654
1539654733
Python
Python (3.4.3)
py
Runtime Error
74
3948
250
# coding: utf-8 def gcd (a, b): if b == 0: return a else: return gcd(b, a % b) n = int(input()) t = [int(input()) for i in range(n)] ans = 1 for i in range(n): ans *= t[i] / gcd(ans, t[i]) print("{}".format(int(ans)))
s673574833
p03633
u334351654
1539654297
Python
Python (3.4.3)
py
Runtime Error
75
3948
271
# coding: utf-8 def gcd (a, b): if b == 0: return a else: return gcd(b, a % b) n = int(input()) t = [] for i in range(0, n): t.append(int(input())) ans = 1 for i in range(0, n): ans *= t[i] / gcd(ans, t[i]) print("{}".format(int(ans)))
s086198659
p03633
u334351654
1539653986
Python
Python (3.4.3)
py
Runtime Error
75
3948
278
# coding: utf-8 def gcd (a, b): if b == 0: return a else: return gcd(b, a % b) n = int(input()) t = [] for i in range(0, n): t.append(int(input())) ans = 1 for i in range(0, n): ans = ans * (t[i] / gcd(ans, t[i])) print("{}".format(int(ans)))
s955061220
p03633
u334351654
1539653901
Python
Python (3.4.3)
py
Runtime Error
74
3952
276
# coding: utf-8 def gcd (a, b): if b == 0: return a else: return gcd(b, a % b) n = int(input()) t = [] for i in range(0, n): t.append(int(input())) ans = 1 for i in range(0, n): ans = ans * t[i] / gcd(ans, t[i]) print("{}".format(int(ans)))
s256871404
p03633
u334351654
1539653811
Python
Python (3.4.3)
py
Runtime Error
75
3952
271
# coding: utf-8 def gcd (a, b): if b == 0: return a else: return gcd(b, a % b) n = int(input()) t = [] for i in range(0, n): t.append(int(input())) ans = 1 for i in range(0, n): ans = ans * t[i] / gcd(ans, t[i]) print("{}".format(ans))
s087462306
p03633
u334351654
1539653549
Python
Python (3.4.3)
py
Runtime Error
75
3948
240
def gcd (a, b): if b == 0: return a else: return gcd(b, a % b) n = int(input()) t = [] for i in range(0, n): t.append(int(input())) ans = 1 for i in range(0, n): ans = ans * t[i] / gcd(ans, t[i]) print(ans)
s998215194
p03633
u905510147
1539398154
Python
Python (3.4.3)
py
Runtime Error
17
3064
402
import sys sys.setrecursionlimit(100000) N = int(input()) T = [] for i in range(N): T.append(int(input())) def gcd(a, b): while b: a, b = b, a % b return a def lcm(a, b): return int(a*b//gcd(a,b)) def lcm_li(li): if len(li) == 2: return lcm(li[0], li[1]) else: x = lcm...
s845575736
p03633
u905510147
1539397975
Python
Python (3.4.3)
py
Runtime Error
17
3060
247
import sys sys.setrecursionlimit(100000) N = int(input()) T = [] for i in range(N): T.append(int(input())) def gcd(a, b): while b: a, b = b, a % b return a lcm = 1 for i in T: lcm = int(lcm * i / gcd(lcm, i)) print(lcm)
s783465657
p03633
u905510147
1539397632
Python
Python (3.4.3)
py
Runtime Error
20
3112
401
import sys sys.setrecursionlimit(100000) N = int(input()) T = [] for i in range(N): T.append(int(input())) def gcd(a, b): while b: a, b = b, a % b return a def lcm(a, b): return int(a*b/gcd(a,b)) def lcm_li(li): if len(li) == 2: return lcm(li[0], li[1]) else: x = lcm(...
s095812953
p03633
u905510147
1539397537
Python
Python (3.4.3)
py
Runtime Error
20
3104
359
N = int(input()) T = [] for i in range(N): T.append(int(input())) def gcd(a, b): while b: a, b = b, a % b return a def lcm(a, b): return int(a*b/gcd(a,b)) def lcm_li(li): if len(li) == 2: return lcm(li[0], li[1]) else: x = lcm(li[0], li[1]) x = [x] + li[2:] ...
s653501526
p03633
u905510147
1539397177
Python
Python (3.4.3)
py
Runtime Error
18
3064
310
import math N = int(input()) T = [] for i in range(N): T.append(int(input())) def lcm(a, b): return int(a*b/math.gcd(a,b)) def lcm_li(li): if len(li) == 2: return lcm(li[0], li[1]) else: x = lcm(li[0], li[1]) x = [x] + li[2:] return lcm_li(x) print(lcm_li(T))
s511736864
p03633
u118147328
1539356510
Python
Python (3.4.3)
py
Runtime Error
18
3060
169
import math N = int(input()) T = [int(input()) for i in range(N)] LCM = 1 for i in range(N): lcm = (T[i] * LCM) // (math.gcd(T[i], LCM)) LCM = lcm print(LCM)
s669260041
p03633
u118147328
1539354932
Python
Python (3.4.3)
py
Runtime Error
55
5728
193
import fractions N = int(input()) T = [int(input()) for i in range(N)] LCM = [] for i in range(N-1): lcm = T[i] * T[i+1] // fractions.gcd(T[i], T[i+1]) LCM.append(lcm) print(LCM[-1])
s175984446
p03633
u118147328
1539354468
Python
Python (3.4.3)
py
Runtime Error
17
3060
184
import math N = int(input()) T = [int(input()) for i in range(N)] LCM = [] for i in range(N-1): lcm = T[i] * T[i+1] // math.gcd(T[i], T[i+1]) LCM.append(lcm) print(LCM[-1])
s309038897
p03633
u366644013
1538593332
Python
Python (3.4.3)
py
Runtime Error
19
3060
273
import math from sys import stdin il = lambda func=int: list(map(func, stdin.readline().rstrip().split())) ils = lambda n, s="int(input())": [eval(s) for _ in range(n)] n = int(input()) t = ils(n) ans = t[0] for i in t[1:]: ans = ans * i // math.gcd(ans, i) print(ans)
s422517905
p03633
u711295009
1538439034
Python
Python (3.4.3)
py
Runtime Error
18
3060
189
import math n = int(input()) currentB = 1 index=0 while index < n: t = int(input()) newB = int(t*currentB / math.gcd(t, currentB)) currentB = newB index+=1 print(currentB)
s925114131
p03633
u711295009
1538438850
Python
Python (3.4.3)
py
Runtime Error
17
3060
190
import math n = int(input()) currentB = 1 index=0 while index < n: t = int(input()) newB = t*currentB // int(math.gcd(t, currentB)) currentB = newB index+=1 print(currentB)
s209004737
p03633
u177040005
1537838062
Python
Python (3.4.3)
py
Runtime Error
152
12440
334
import numpy as np import math from functools import reduce def lcm_base(x, y): return int(x / math.gcd(x, y) ) * y def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input()) T = np.array(sorted([int(input()) for _ in range(N)])) p...
s402103875
p03633
u220870679
1537756509
Python
Python (3.4.3)
py
Runtime Error
23
3572
269
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()) numbers = [] for i in range(N): numbers.append(int(input())) print(lcm_list(numbers))
s591054994
p03633
u073775598
1536497678
Python
Python (3.4.3)
py
Runtime Error
23
3564
493
#ABC070C import math from functools import reduce N=int(input()) T=[int(input()) for i in range(N)] #def lcm_base(x, y): # interium=x//math.gcd(x, y) # return (interium*y) #print(reduce(lcm_base, T)) ans=1 def grcode(x, y): if y==0: return (x) else: return grcode(y, x%y) #for i in range(N-...
s518645828
p03633
u073775598
1536497071
Python
Python (3.4.3)
py
Runtime Error
23
3572
317
#ABC070C import math from functools import reduce N=int(input()) T=[int(input()) for i in range(N)] #def lcm_base(x, y): # interium=x//math.gcd(x, y) # return (interium*y) #print(reduce(lcm_base, T)) ans=1 for i in range(N-1): T[i]=T[i]//math.gcd(T[i], T[i+1]) for i in range(N): ans=ans*T[i] print(ans)
s247654320
p03633
u073775598
1536496548
Python
Python (3.4.3)
py
Runtime Error
23
3572
321
#ABC070C import math from functools import reduce N=int(input()) T=[int(input()) for i in range(N)] #def lcm_base(x, y): # interium=x//math.gcd(x, y) # return (interium*y) #print(reduce(lcm_base, T)) ans=1 for i in range(N-1): T[i]=T[i]/math.gcd(T[i], T[i+1]) for i in range(N): ans=ans*T[i] print(int(ans)...
s301144505
p03633
u073775598
1536496127
Python
Python (3.4.3)
py
Runtime Error
23
3572
201
#ABC070C import math from functools import reduce N=int(input()) T=[int(input()) for i in range(N)] def lcm_base(x, y): interium=x/math.gcd(x, y) return (interium*y) print(reduce(lcm_base, T))
s713323538
p03633
u073775598
1536495764
Python
Python (3.4.3)
py
Runtime Error
23
3572
202
#ABC070C import math from functools import reduce N=int(input()) T=[int(input()) for i in range(N)] def lcm_base(x, y): interium=x//math.gcd(x, y) return (interium*y) print(reduce(lcm_base, T))
s009371525
p03633
u073775598
1536495639
Python
Python (3.4.3)
py
Runtime Error
24
3700
180
#ABC070C import math from functools import reduce N=int(input()) T=[int(input()) for i in range(N)] def lcm_base(x, y): return (x//math.gcd(x, y)*y) print(reduce(lcm_base, T))
s643672475
p03633
u073775598
1536495590
Python
Python (3.4.3)
py
Runtime Error
23
3572
181
#ABC070C import math from functools import reduce #N=int(input()) T=[int(input()) for i in range(N)] def lcm_base(x, y): return (x//math.gcd(x, y)*y) print(reduce(lcm_base, T))
s235136337
p03633
u073775598
1536493044
Python
Python (3.4.3)
py
Runtime Error
23
3572
183
#ABC070C import math from functools import reduce N=int(input()) T=[int(input()) for i in range(N)] def lcm_base(x, y): return (x * y) // math.gcd(x, y) print(reduce(lcm_base, T))
s976433728
p03633
u026788530
1536419610
Python
Python (3.4.3)
py
Runtime Error
19
3060
115
import math N = int(input()) a = 1 for i in range(N): b = int(input()) a = a * b //math.gcd(a,b) print(a)
s052392650
p03633
u026788530
1536419375
Python
Python (3.4.3)
py
Runtime Error
17
2940
115
import math N = int(input()) a = 1 for i in range(N): b = int(input()) a = a * b //math.gcd(a,b) print(a)
s214755526
p03633
u596276291
1536340540
Python
Python (3.4.3)
py
Runtime Error
21
3316
908
from collections import defaultdict, Counter from itertools import product, groupby, count, permutations, combinations from math import pi, sqrt, gcd from collections import deque from bisect import bisect, bisect_left, bisect_right from string import ascii_lowercase from functools import lru_cache import sys sys.setre...
s266495883
p03633
u099643902
1536164180
Python
Python (3.4.3)
py
Runtime Error
74
3952
358
N = int(input()) T = [0 for i in range(N)] for i in range(N): T[i] = int(input()) T.sort() def gcd(s, t): if t== 0: return s elif s > t: return gcd(t, s%t) else: return gcd(s, t % s) def lcm(s, t): g = gcd(s, t) return((s/g) * t) now = T[0] for i in range(1,N): now ...
s158924006
p03633
u099643902
1536164103
Python
Python (3.4.3)
py
Runtime Error
17
3064
357
N = int(input()) T = [0 for i in range(N)] for i in range(N): T[i] = int(input()) T.sort() def gcd(s, t): if t== 0: return s elif s > t: return gcd(t, s%t) else: return gcd(s, t % s) def lcm(s, t): g = gcd(s, t) return((s/g) * t) now = T[0] for i in range(1,N): now ...
s162508938
p03633
u648901783
1536093537
Python
Python (3.4.3)
py
Runtime Error
20
3092
634
N = int(input()) le = [int(input()) for i in range(N)] le.sort()#昇順 #3数以上の最小公倍数を求める問題 #a,b2数の最小公倍数とcの最小公倍数で求められる #2数の最小公倍数はユークリッドの互除法を利用して再帰関数で求められる。 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) def multi_LCM(le): if len(le)==1: return ...
s375871512
p03633
u648901783
1536093270
Python
Python (3.4.3)
py
Runtime Error
20
3076
635
N = int(input()) le = [int(input()) for i in range(N)] le.sort()#昇順 #3数以上の最小公倍数を求める問題 #a,b2数の最小公倍数とcの最小公倍数で求められる #2数の最小公倍数はユークリッドの互除法を利用して再帰関数で求められる。 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)) def multi_LCM(le): if len(le)==1: return ...
s527716817
p03633
u648901783
1536092527
Python
Python (3.4.3)
py
Runtime Error
19
3072
570
N = int(input()) le = [int(input()) for i in range(N)] le.sort()#昇順 #3数以上の最小公倍数を求める問題 #a,b2数の最小公倍数とcの最小公倍数で求められる #2数の最小公倍数はユークリッドの互除法を利用して再帰関数で求められる。 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)) def multi_LCM(le): if len(le)==1: return ...
s754750250
p03633
u303019816
1536011770
Python
Python (3.4.3)
py
Runtime Error
18
3060
254
from math import gcd from functools import reduce def lcm_base(a, b): return (a * b) // gcd(a, b) def lcm(*numbers): return reduce(lcm_base, numbers, 1) n = int(input()) T = [] for _ in range(n): T.append(int(input())) print(lcm(*T))
s461598440
p03633
u099643902
1535753059
Python
Python (3.4.3)
py
Runtime Error
74
3956
307
N = int(input()) T = [0 for i in range(N)] for i in range(N): T[i] = int(input()) T.sort() def gcd(s, t): if t== 0: return s else: return gcd(t, s%t) def lcm(s, t): g = gcd(s, t) return((s/g) * t) now = T[0] for i in range(1,N): now = lcm(now, T[i]) print(int(now))
s019376135
p03633
u457901067
1535559686
Python
Python (3.4.3)
py
Runtime Error
17
3064
294
N = int(input()) A = [] for i in range(N): A.append(int(input())) def GCD(a,b): if a < b: a, b = b, a if b == 0: return a else: return GCD(b, a%b) def LCM(a,b): return int(a*b/GCD(a,b)) prev = A[0] for i in range(1,N): lcm = LCM(prev, A[i]) prev = lcm print(prev)
s068072408
p03633
u201234972
1534610074
Python
Python (3.4.3)
py
Runtime Error
17
3064
230
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()) T = [ int( input()) for _ in range(N)] ans = T[0] for i in range(1,N): ans = int(lcm(ans,T[i])) print(ans)
s129013531
p03633
u201234972
1534609746
Python
Python (3.4.3)
py
Runtime Error
18
3064
227
N = int( input()) T = [ int( input()) for _ in range(N)] def gcd(a, b): while b > 0: a, b = b, a%b return a def lcm(a,b): return (a*b)/gcd(a,b) ans = T[0] for i in range(1,N): ans = int(lcm(ans,T[i])) print(ans)
s859837456
p03633
u201234972
1534609397
Python
Python (3.4.3)
py
Runtime Error
18
3060
185
import math N = int( input()) T = [ int( input()) for _ in range(N)] def lcm(a,b): return (a*b)/math.gcd(a,b) ans = T[0] for i in range(1,N): ans = int(lcm(ans,T[i])) print(ans)
s144339082
p03633
u820351940
1534304616
Python
Python (3.4.3)
py
Runtime Error
18
2940
147
import math n = int(input()) a = [int(input()) for i in range(n)] b = a[0] for i in range(1, n): b = (b * a[i]) // math.gcd(b, a[i]) print(b)
s661930557
p03633
u530335051
1533787102
Python
Python (3.4.3)
py
Runtime Error
18
3064
412
def gcd(n, m): if min(n, m) == 0: return max(n,m) else: return gcd(min(n,m), max(n,m) % min(n,m)) def lcm(n, m): return int(n * m / gcd(n, m)) n = int(input()) t = [] for i in range(0, n): t.append(int(input())) t_sorted = sorted(t) time = 0 for i in range(0, n): if i == 0: ...
s756585761
p03633
u530335051
1533786716
Python
Python (3.4.3)
py
Runtime Error
36
5048
317
import fractions def lcm(n, m): return int(n * m / fractions.gcd(n, m)) n = int(input()) t = [] for i in range(0, n): t.append(int(input())) t_sorted = sorted(t) time = 0 for i in range(0, n): if i == 0: time = t_sorted[0] else: time = lcm(int(time), t_sorted[i]) print(int(time))
s151999862
p03633
u530335051
1533786527
Python
Python (3.4.3)
py
Runtime Error
18
3064
307
import math def lcm(n, m): return int(n * m / math.gcd(n, m)) n = int(input()) t = [] for i in range(0, n): t.append(int(input())) t_sorted = sorted(t) time = 0 for i in range(0, n): if i == 0: time = t_sorted[0] else: time = lcm(int(time), t_sorted[i]) print(int(time))
s670709048
p03633
u530335051
1533786124
Python
Python (3.4.3)
py
Runtime Error
18
3064
390
def gcd(n, m): if max(n,m) % min(n,m) == 0: return min(n,m) else: return gcd(max(n,m), max(n,m) - min(n,m) * (max(n,m)//min(n,m))) def lcm(n, m): return n * m / gcd(n, m) n = int(input()) t = [] for i in range(0, n): t.append(int(input())) time = 0 for i in range(0, n-1): if i ==...
s316991827
p03633
u803647747
1533666106
Python
Python (3.4.3)
py
Runtime Error
18
3064
271
import math N = int(input()) input_list = [int(input())for _ in range(N)] def lcm(x, y): return (x * y) // math.gcd(x, y) initial_num = 1 for i in input_list: t = lcm(initial_num, i) if t > initial_num: initial_num = t print(initial_num)