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
s040409799
p03633
u089230684
1515190806
Python
Python (3.4.3)
py
Runtime Error
18
3060
291
# -*- coding: utf-8 -*- import math # code start def lcm(a,b): return a*b/math.gcd(int(a),int(b)) def main(): count = int(input()) i = 0 temp = 1 while(i<count): i+=1 num = int(input()) temp = lcm(temp,num) print(int(temp)) if __name__ == '__main__': main() # code end
s851738560
p03633
u499259667
1515172267
Python
Python (3.4.3)
py
Runtime Error
18
3060
275
N = int(input()) lis=[0]*N for i in range(N): lis[i]=(int(input())) def Euc(x,y): if y == 0: return x else: return Euc(y,x%y) def common_multiple(x,y): return int(x*y/Euc(x,y)) out = 1 for i in lis: out = common_multiple(out,i) print(out)
s171543405
p03633
u499259667
1515171333
Python
Python (3.4.3)
py
Runtime Error
19
3188
426
N = int(input()) lis=[0 for i in range(N)] for i in range(N): lis[i]=(int(input())) if N == 1: print(lis[0]) exit() def Euc(x,y): s=0;b=0;rem=0; if x>y: s=y;b=x elif y>x: s=x;b=y else: return x while True: rem = b%s if rem == 0: return ...
s096216897
p03633
u412116291
1515109229
Python
Python (3.4.3)
py
Runtime Error
80
4492
378
from functools import reduce def gcd(a, b): if (b == 0): return a return gcd(b, a % b) def lcm(a, b): return a * b / gcd(a, b) def main(): n = int(input()) li = [] for i in range(n): inp = int(input()) li.append(inp) ans = int(reduce((lambda x, y: lcm(x, y)), li)) if ans > 1e18: an...
s647084353
p03633
u412116291
1515109171
Python
Python (3.4.3)
py
Runtime Error
79
4492
381
from functools import reduce def gcd(a, b): if (b == 0): return a; return gcd(b, a % b) def lcm(a, b): return a * b / gcd(a, b); def main(): n = int(input()) li = [] for i in range(n): inp = int(input()) li.append(inp) ans = int(reduce((lambda x, y: lcm(x, y)), li)) if ans > 1e18: ...
s745269638
p03633
u412116291
1515108598
Python
Python (3.4.3)
py
Runtime Error
78
4488
336
from functools import reduce def gcd(a, b): if (b == 0): return a; return gcd(b, a % b) def lcm(a, b): return a * b / gcd(a, b); def main(): n = int(input()) li = [] for i in range(n): li.append(int(input())) ans = int(reduce((lambda x, y: lcm(x, y)), li)) print(ans) if __name__ == "__m...
s835112676
p03633
u412116291
1515108375
Python
Python (3.4.3)
py
Runtime Error
81
4524
273
from functools import reduce def gcd(a, b): if (b == 0): return a; return gcd(b, a % b) def lcm(a, b): return a * b / gcd(a, b); n = int(input()) li = [] for i in range(n): li.append(int(input())) ans = int(reduce((lambda x, y: lcm(x, y)), li)) print(ans)
s919172673
p03633
u499259667
1515038270
Python
PyPy3 (2.4.0)
py
Runtime Error
176
38640
392
N = int(input()) lis=[0 for i in range(N)] for i in range(N): lis[i]=(int(input())) def Euc(x,y): s=0;b=0;rem=0; if x>y: s=y;b=x elif y>x: s=x;b=y else: return int(x) while True: rem = b%s if rem == 0: return int(x*y/s) b = s s...
s569515172
p03633
u499259667
1515038151
Python
Python (3.4.3)
py
Runtime Error
18
3064
392
N = int(input()) lis=[0 for i in range(N)] for i in range(N): lis[i]=(int(input())) def Euc(x,y): s=0;b=0;rem=0; if x>y: s=y;b=x elif y>x: s=x;b=y else: return int(x) while True: rem = b%s if rem == 0: return int(x*y/s) b = s s...
s091411829
p03633
u499259667
1515037739
Python
Python (3.4.3)
py
Runtime Error
18
3064
387
N = int(input()) lis=[0 for i in range(N)] for i in range(N): lis[i]=(int(input())) def Euc(x,y): s=0;b=0;rem=0; if x>y: s=y;b=x elif y>x: s=x;b=y else: return x while True: rem = b%s if rem == 0: return int(x*y/s) b = s s = re...
s721089414
p03633
u010733367
1514179073
Python
Python (3.4.3)
py
Runtime Error
18
3060
201
from math import gcd N = int(input()) T = [int(input()) for i in range(N)] ans = T[0] def lcm(a, b): g = gcd(a, b) return a * b // g for i in range(1, N): ans = lcm(ans, T[i]) print(ans)
s411325456
p03633
u751863169
1513542372
Python
Python (3.4.3)
py
Runtime Error
21
3188
302
#!/usr/bin/env python N = int(input()) T = [] for _ in range(N): T.append(int(input())) def gcd(a, b): if b == 0: return a else: return gcd(b, a % b) def lcm(a, b): return int(a / gcd(a, b) * b) ans = T[0] for i in range(1, N): ans = lcm(ans, T[i]) print(ans)
s285323979
p03633
u635277286
1512242753
Python
Python (3.4.3)
py
Runtime Error
18
3064
247
def gcd(x,y): if x < y: x,y = y,x while y > 0: r = x % y x = y y = r return x N=int(input()) T=[0]*N for i in range(N): T[i] = int(input()) curr=1 ans=1 for i in range(N): g=gcd(curr,T[i]) ans=T[i]/g*curr curr=ans print(int(ans))
s388098103
p03633
u635277286
1512237929
Python
Python (3.4.3)
py
Runtime Error
20
3316
247
def gcd(x,y): if x < y: x,y = y,x while y > 0: r = x % y x = y y = r return x N=int(input()) T=[0]*N for i in range(N): T[i] = int(input()) curr=1 ans=1 for i in range(N): g=gcd(curr,T[i]) ans=curr*T[i]/g curr=ans print(int(ans))
s625186267
p03633
u495415554
1511411899
Python
Python (3.4.3)
py
Runtime Error
17
3064
416
# list: ソート済配列 # n: 参照番号 @profile def gcd(list, n): if n == 0: return list[0] else: a, b = list[n-1], list[n] while list[n]: list[n-1], list[n] = list[n], list[n-1] % list[n] list[n-1] = (a*b)/list[n-1] return gcd(list, n-1) N = int(input()) T = [in...
s122641556
p03633
u495415554
1511411103
Python
Python (3.4.3)
py
Runtime Error
17
2940
105
A, B, C, D = map(int, input().split()) value = min(B, D) - max(A, C) print(value if value > 0 else "0")
s041031733
p03633
u207707177
1511068121
Python
Python (3.4.3)
py
Runtime Error
18
3064
244
n = int(input()) t = [] ans = 1 for i in range(n): t.append(int(input())) 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)) for i in range(n): ans = lcm(ans,t[i]) print(ans)
s306218172
p03633
u207707177
1511067885
Python
Python (3.4.3)
py
Runtime Error
17
3064
239
n = int(input()) t = [] ans = 1 for i in range(n): t.append(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) for i in range(n): ans = lcm(ans,t[i]) print(int(ans))
s693481417
p03633
u061916079
1509220051
Python
Python (2.7.6)
py
Runtime Error
213
16080
963
# -*- coding: utf-8 -*- import math import sys import itertools import numpy as np import functools import collections mo = 1000000007 INF = 10**100 r = range class infix(object): def __init__(self, function): self.function = function def __ror__(self, other): self.left = other return ...
s075744557
p03633
u061916079
1509220008
Python
Python (3.4.3)
py
Runtime Error
158
12500
963
# -*- coding: utf-8 -*- import math import sys import itertools import numpy as np import functools import collections mo = 1000000007 INF = 10**100 r = range class infix(object): def __init__(self, function): self.function = function def __ror__(self, other): self.left = other return ...
s400919451
p03633
u214380782
1508027091
Python
Python (3.4.3)
py
Runtime Error
2104
3064
400
N = int(input()) A0 = [] for i in range(N): A0.append(int(input())) A1 = set(A0) A = list(A1) Amax = max(A) A.remove(Amax) can = Amax end = 0 while end == 0: count = 1 while True: if can*count%A[-1]!=0: count += 1 else: can *= count del A[-1] ...
s830289549
p03633
u214380782
1508025674
Python
Python (3.4.3)
py
Runtime Error
2104
3064
552
N = int(input()) T0 = [] for i in range(N): T0.append(int(input())) if N == 1: print(T0[0]) else: T = list(set(T0)) Tmax, Tsec = T[-1], T[-2] can1 = 1 count0 = 1 while True: can = Tmax * count0 if can%Tsec==0: can1 = can break ...
s426581358
p03633
u214380782
1508025369
Python
Python (3.4.3)
py
Runtime Error
2104
3064
438
N = int(input()) T0 = [] for i in range(N): T0.append(int(input())) T = list(set(T0)) Tmax, Tsec = T[-1], T[-2] can1 = 1 count0 = 1 while True: can = Tmax * count0 if can%Tsec==0: can1 = can break count0 += 1 count = 1 while True: can = can1 * count f...
s898144977
p03633
u785205215
1507633847
Python
Python (3.4.3)
py
Runtime Error
21
3316
524
from sys import stdin, stdout from collections import defaultdict def readLine_int_list(): return list(map(int, stdin.readline().split())) def readAll_int(): return list(map(int, stdin)) def gcd(a, b): while b: a, b = b, a % b return a def lcm(a, b): return a * b // gcd (a, b) def main(): n = int(inp...
s227751375
p03633
u785205215
1507633161
Python
Python (3.4.3)
py
Runtime Error
22
3316
962
from sys import stdin, stdout from collections import defaultdict def readLine_int_list():return list(map(int, stdin.readline().split())) def readLine_int_list_reverse(): return list(map(int, stdin.readline().split())).reverse() def readAll_int(): return list(map(int, stdin)) def readLine_str_list():return list(map(int...
s249400647
p03633
u785205215
1507632675
Python
Python (3.4.3)
py
Runtime Error
24
3316
492
from sys import stdin, stdout from collections import defaultdict def readLine_int_list():return list(map(int, stdin.readline().split())) def readAll_int(): return list(map(int, stdin)) def gcd(a, b): while b: a, b = b, a % b return a def lcm(a, b): return a * b // gcd (a, b) def main(): n = int(input()) ...
s155746134
p03633
u197697186
1506774581
Python
Python (3.4.3)
py
Runtime Error
17
3064
444
deploy = True if not deploy: with open('input.txt', 'r') as f: fid = list(map(lambda x: int(x.rstrip()), f.readlines())) Ti = fid[1:] n = int(fid[0]) else: n = int(input()) Ti = [] for t in range(): Ti.append(int(input())) Max = max(Ti) while True: m = [Max for i in range(...
s062966556
p03633
u197697186
1506774324
Python
Python (3.4.3)
py
Runtime Error
17
3064
445
deploy = False if not deploy: with open('input.txt', 'r') as f: fid = list(map(lambda x: int(x.rstrip()), f.readlines())) Ti = fid[1:] n = int(fid[0]) else: n = int(input()) Ti = [] for t in range(): Ti.append(int(input())) Max = max(Ti) while True: m = [Max for i in range...
s311276546
p03633
u197697186
1506774004
Python
Python (3.4.3)
py
Runtime Error
17
3064
439
deploy = True if not deploy: with open('input.txt', 'r') as f: fid = list(map(lambda x: int(x.rstrip()), f.readlines())) Ti = fid[1:] n = int(fid[0]) else: n = int(input()) Ti = [] for t in range(): Ti.append(int(input())) Max = max(Ti) while True: m = [Max for i in range(...
s160090815
p03633
u937164028
1506725689
Python
Python (3.4.3)
py
Runtime Error
18
2940
407
import sys if __name__ == '__main__': N = int(input()) T = [] for i in range(N): T.append(int(input())) maxT = max(T) i = maxT while i <10*18 k = 0 for j in range(N): if (i%T[j]) == 0: k += 1 else: break if ...
s815254135
p03633
u937164028
1506718544
Python
Python (3.4.3)
py
Runtime Error
18
3056
269
if __name__ == '__main__': N = int(input()) T = list(map(int, input().split())) for i in range(10**18): k = 0 for j in range(N): if (i%T[j]) == 0: k += 1 if k == N: print(i) return
s402282200
p03633
u038052425
1506566033
Python
Python (3.4.3)
py
Runtime Error
19
3064
340
def get_gcd(a, b): if b == 0: return a else: return get_gcd(b, a%b) def get_lcm(a, b): return int(a*b / get_gcd(a, b)) N = int(input()) T = list() for i in range(N): T.append(int(input())) if len(T) == 1: T[1] = 0 lcm = get_lcm(T[0], T[1]) for i in range(N-2): lcm = get_lcm(lcm...
s985774612
p03633
u038052425
1506565846
Python
Python (3.4.3)
py
Runtime Error
18
3064
311
def get_gcd(a, b): if b == 0: return a else: return get_gcd(b, a%b) def get_lcm(a, b): return int(a*b / get_gcd(a, b)) N = int(input()) T = list() for i in range(N): T.append(int(input())) lcm = get_lcm(T[0], T[1]) for i in range(N-2): lcm = get_lcm(lcm, T[i+2]) print(lcm)
s081051508
p03633
u816428863
1506143415
Python
Python (3.4.3)
py
Runtime Error
18
3064
283
N = int(input()) T= [0]*N for i in range(N): T[i] = int(input()) T.sort(reverse=True) def gcd(n,m): while m != 0: n , m = m , n%m return n def lcm(n,m): x = (n/gcd(n,m))*m return int(x) ans = T[0] for i in range(1,N): ans = lcm(ans,T[i]) print(ans)
s949836555
p03633
u410996052
1506049424
Python
Python (3.4.3)
py
Runtime Error
17
3060
159
s=set() n=int(input()) for i in range(n): s.add(int(input())) while len(s) != 1: l=list(cb(s,2)) s = set([lcm(x,y) for x,y in l]) print(list(s)[0])
s723832076
p03633
u858136677
1505354499
Python
Python (3.4.3)
py
Runtime Error
72
3948
238
def euclid(a,b): if b == 0: return a else: return euclid(b,a % b) n = int(input()) t = [] for i in range(n): x = int(input()) t.append(x) for i in range(0,n-1): t[i+1] = t[i] * t[i+1] / euclid(t[i],t[i+1]) print(int(t[n-1]))
s368210358
p03633
u301823349
1505151410
Python
Python (3.4.3)
py
Runtime Error
17
3060
270
N = int(input()) T = [] for _ 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 a * b // gcd (a, b) result = lcm(T[0],T[1]) for x in range(2,N): result = lcm(result, T[x]) print(result)
s306924390
p03633
u112465297
1505070170
Python
Python (3.4.3)
py
Runtime Error
17
3060
263
def gcd(a,b): a=min(a,b) b=max(a,b) while b: a,b= b, a%b return a def lcm(a,b): return a*b//gcd(a,b) N=int(input()) for i in range(N): T.append(int(input())) ans=1 for t in range(N): ans=lcm(ans,T[i]) print(ans)
s504198153
p03633
u190405389
1504466951
Python
Python (3.4.3)
py
Runtime Error
17
3060
166
import math n = int(input()) t = [int(input()) for i 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[n - 1])
s744802085
p03633
u449998745
1504431299
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38640
213
import math n=int(input()) cnt=0 t=[] u={} while cnt<n: num=[int(input())] t+=num cnt+=1 def lcm(a,b): return int(a*b / math.gcd(a,b)) ans=1 for x in range(n): ans=lcm(ans,t[x]) print(ans)
s882680815
p03633
u594377052
1504292650
Python
Python (2.7.6)
py
Runtime Error
23
3512
347
import sys N = int(raw_input()) array = [] for i in range(N): array.append(int(raw_input())) array.sort() def euclid(a, b): if a == b: return a if a > b: return euclid(a - b, b) else: return euclid(b - a, a) result = array[0] for i in array[1:]: result = result * i / eucl...
s944322181
p03633
u376420711
1504214235
Python
Python (3.4.3)
py
Runtime Error
23
3572
188
from functools import reduce from math import gcd n = int(input()) clocks = [] for i in range(n): clocks.append(int(input())) print(reduce(lambda x, y: (x * y) // gcd(x, y), clocks))
s685803775
p03633
u376420711
1504214143
Python
Python (3.4.3)
py
Runtime Error
22
3572
191
from functools import reduce from math import gcd n = int(input()) clocks = [] for i in range(n): clocks.append(int(input())) print(reduce(lambda x, y: (x * y) // gcd(x, y), clocks, 1))
s393654516
p03633
u425351967
1503956957
Python
Python (3.4.3)
py
Runtime Error
35
5052
161
from fractions import gcd N = int(input()) T = [] for i in range(N): T.append(int(input())) res = 1 for t in T: res = int(res/(gcd(res, t))) * t print(res)
s211581823
p03633
u425351967
1503956661
Python
Python (3.4.3)
py
Runtime Error
35
5052
162
from fractions import gcd N = int(input()) T = [] for i in range(N): T.append(int(input())) res = 1 for t in T: res = int(res * t /(gcd(res, t))) print(res)
s846995344
p03633
u425351967
1503956503
Python
Python (3.4.3)
py
Runtime Error
17
2940
165
from fractions import gcd N = int(input()) T = [] for i in range(N): T.append(long(input())) res = 1L for t in T: res = long(res * t /(gcd(res, t))) print(res)
s592766177
p03633
u425351967
1503956492
Python
Python (3.4.3)
py
Runtime Error
17
2940
160
from math import gcd N = int(input()) T = [] for i in range(N): T.append(long(input())) res = 1L for t in T: res = long(res * t /(gcd(res, t))) print(res)
s956454893
p03633
u425351967
1503956398
Python
Python (3.4.3)
py
Runtime Error
44
5436
162
from fractions import gcd N = int(input()) T = [] for i in range(N): T.append(int(input())) res = 1 for t in T: res = int(res * t /(gcd(res, t))) print(res)
s713282469
p03633
u425351967
1503956374
Python
PyPy3 (2.4.0)
py
Runtime Error
165
38640
157
from math import gcd N = int(input()) T = [] for i in range(N): T.append(int(input())) res = 1 for t in T: res = int(res * t /(gcd(res, t))) print(res)
s592731443
p03633
u425351967
1503956338
Python
Python (3.4.3)
py
Runtime Error
17
3060
157
from math import gcd N = int(input()) T = [] for i in range(N): T.append(int(input())) res = 1 for t in T: res = int(res * t /(gcd(res, t))) print(res)
s639283590
p03633
u946386741
1503696287
Python
Python (3.4.3)
py
Runtime Error
17
3060
178
import math N = int(input()) T = [int(input()) for n in range(N)] def lcm(a, b): return a * b // math.gcd(a, b) res = T[0] for t in T: res = lcm(res, t) print(res)
s715476932
p03633
u120810144
1503526360
Python
Python (3.4.3)
py
Runtime Error
36
3700
224
from functools import reduce def gcd(a, b): if b == 0: return a return gcd(b, a % b) def lcm(a, b): return a * b // gcd(a, b) n = int(input()) t = [int(input()) for i in range(n)] x = reduce(t, lcm) print(x)
s377067829
p03633
u667084803
1503468306
Python
Python (3.4.3)
py
Runtime Error
17
3060
204
def gcd(a, b): while b: a, b = b, a % b return a def lcm(a,b): return a*b//gcd(a,b) N=int(input()) T=[int(input()) for i in range(N)] T.sort() G=T[1] for i in range(N): G=lcm(G,T[i]) print(G)
s040953076
p03633
u667084803
1503468056
Python
Python (3.4.3)
py
Runtime Error
17
3060
195
def gcd(a, b): while b: a, b = b, a % b return a def lcm(a,b): return a*b//gcd(a,b) N=int(input()) T=[int(input()) for i in range(N)] G=T[1] for i in range(N): G=lcm(G,T[i]) print(G)
s165640461
p03633
u528825252
1503449834
Python
Python (3.4.3)
py
Runtime Error
18
3060
367
n = int(input()) T = [] for i in range(n): T.append(int(input())) # def gcd(a, b): # if b==0: # return(a) # return(gcd(b, a%b)) def gcd(a, b): while b > 0: t = a a = b b = t%b return(a) def lcm(a, b): return(int(a / int(gcd(a, b))) * b) LCM = T[0] for i in rang...
s664808510
p03633
u528825252
1503449363
Python
Python (3.4.3)
py
Runtime Error
17
3064
362
n = int(input()) T = [] for i in range(n): T.append(int(input())) # def gcd(a, b): # if b==0: # return(a) # return(gcd(b, a%b)) def gcd(a, b): while b > 0: t = a a = b b = t%b return(a) def lcm(a, b): return(a / gcd(a, b) * b) LCM = T[0] for i in range(n-1): ...
s611590456
p03633
u528825252
1503448254
Python
Python (3.4.3)
py
Runtime Error
75
4024
262
n = int(input()) T = [] for i in range(n): T.append(int(input())) def gcd(a, b): if b==0: return(a) return(gcd(b, a%b)) def lcm(a, b): return(a*b / gcd(a, b)) LCM = T[0] for i in range(n-1): LCM = lcm(LCM, T[i+1]) print(int(LCM))
s420852125
p03633
u182601079
1503363482
Python
Python (3.4.3)
py
Runtime Error
18
3064
347
def gcd(a,b): m = max(a,b) n = min(a,b) if n==0: return m return gcd(n, m%n) def lcm(a,b): return (a*b)/gcd(a,b) N = input() Ti = [] for i in range(int(N)): tmp = input() Ti.append(int(tmp)) Ti.sort() ans_lcm = lcm(Ti[0],Ti[1]) for i in range(2,len(Ti)): ans_lcm = lcm(ans_lcm...
s363009933
p03633
u182601079
1503362997
Python
Python (3.4.3)
py
Runtime Error
18
3064
385
def gcd(a,b): if b==0: return a return gcd(b, a%b) def lcm(a,b,g): return (a*b)/g N = input() Ti = [] for i in range(int(N)): tmp = input() Ti.append(int(tmp)) Ti.sort() ans_gcd = gcd(Ti[0],Ti[1]) ans_lcm = lcm(Ti[0],Ti[1],ans_gcd) for i in range(2,len(Ti)): ans_gcd = gcd(ans_gcd,Ti[...
s967703821
p03633
u182601079
1503362449
Python
Python (3.4.3)
py
Runtime Error
2104
3064
376
N = input() Ti = [] def gcd(a,b): while (a != 0): a, b = b%a, a return b def lcm(a,b): return (a*b)/gcd(a,b) for i in range(int(N)): tmp = input() Ti.append(int(tmp)) Ti.sort() ans_gcd = gcd(Ti[0],Ti[1]) ans_lcm = lcm(Ti[0],Ti[1]) for i in range(2,len(Ti)): ans_gcd = gcd(ans_gcd,Ti[i...
s024556243
p03633
u182601079
1503361326
Python
Python (3.4.3)
py
Runtime Error
17
3064
347
N = input() Ti = [] def gcd(a,b): while (a != 0): a, b = b%a, a return b for i in range(int(N)): tmp = input() Ti.append(int(tmp)) Ti.sort() ans_gcd = gcd(Ti[0],Ti[1]) ans_lcm = (Ti[0]*Ti[-1])/ans_gcd for i in range(2,len(Ti)): ans_gcd = gcd(ans_gcd,Ti[i]) ans_lcm = (ans_gcd*Ti[-1])/a...
s486444915
p03633
u182601079
1503359835
Python
Python (3.4.3)
py
Runtime Error
2104
3064
400
N = input() Ti = [] def gcd(a,b): gcd = 1 for i in range(2,a+1): if a%i == 0 and b%i == 0: gcd = i return gcd for i in range(int(N)): tmp = input() Ti.append(int(tmp)) Ti.sort() ans_gcd = gcd(Ti[0],Ti[1]) ans_lcm = (Ti[0]*Ti[-1])/ans_gcd for i in range(2,len(Ti)): ans_gcd ...
s526712277
p03633
u410717334
1503276399
Python
Python (3.4.3)
py
Runtime Error
17
3064
228
import math def gcd(x, y): if x < y: x,y=y,x while y > 0: r = x % y x = y y = r return x N=int(input()) T0=1 for _ in range(N): T=int(input()) T0=int(T0/gcd(T0,T)*T) print(T0)
s558837212
p03633
u410717334
1503276142
Python
Python (3.4.3)
py
Runtime Error
19
3316
215
def gcd(x, y): if x < y: x,y=y,x while y > 0: r = x % y x = y y = r return x N=int(input()) T0=1 for _ in range(N): T=int(input()) T0=int(T*T0/gcd(T0,T)) print(T0)
s436868776
p03633
u463836923
1503275778
Python
Python (3.4.3)
py
Runtime Error
18
3316
136
#coding=UTF-8 import math N=int(input()) ans=1 for idx in range(0,N,1): T=int(input()) ans=ans*T// math.gcd(ans,T) print(ans)
s521749286
p03633
u410717334
1503275662
Python
Python (3.4.3)
py
Runtime Error
19
3316
112
import math N=int(input()) T0=1 for _ in range(N): T=int(input()) T0=int(T*T0/math.gcd(T0,T)) print(T0)
s744062385
p03633
u539953365
1503256091
Python
Python (3.4.3)
py
Runtime Error
18
3060
333
def gcd(a, b): """Return greatest common divisor using Euclid's Algorithm.""" while b: a, b = b, a % b return a def lcm(a, b): """Return lowest common multiple.""" return a * b // gcd(a, b) N = int(input()) if N > 1: T = int(input()) for i in range(1, N): T = lcm(int(input())...
s114097750
p03633
u707274516
1503220038
Python
Python (3.4.3)
py
Runtime Error
18
3064
340
def gcd(a, b): a = int(a) b = int(b) m = int(0) while(b > 0): m = a a = b b = m % a return a def lcm(a, b): return int(a * b / gcd(a, b)) n = int(input()) t = [] for i in range(0, n): t.append(int(input())) cur = t[0] for i in range(1, n): cur = lcm(cur, t...
s705240357
p03633
u707274516
1503219915
Python
Python (3.4.3)
py
Runtime Error
19
3188
330
def gcd(a, b): m = 0 res = 0 while(b > 0): m = a a = b b = m % a res = a return res def lcm(a, b): return a * b / gcd(a, b) n = int(input()) t = [] for i in range(0, n): t.append(int(input())) cur = t[0] for i in range(1, n): cur = lcm(cur, t[i]) print...
s120561835
p03633
u472397429
1503202066
Python
Python (3.4.3)
py
Runtime Error
18
2940
131
from math import gcd n = int(input()) res = 1 for i in range(n): x = int(input()) res = res // gcd(res, x) * x print(res)
s191813398
p03633
u466826467
1503112224
Python
Python (3.4.3)
py
Runtime Error
18
3056
308
def euclid(a, b): if b == 0: return a else: return euclid(b, a % b) def lcm(a, b): g = euclid(a, b) return int(a * b / g) if __name__ == '__main__': N = int(input()) ans = 1 for i in range(N): T = int(input()) ans = lcm(ans, T) print(ans)
s829826087
p03633
u466826467
1503111709
Python
Python (3.4.3)
py
Runtime Error
75
3952
408
def euclid(a, b): if b == 0: return a else: return euclid(b, a % b) if __name__ == '__main__': N = int(input()) T = [] for i in range(N): T.append(int(input())) if N == 1: print(T[0]) else: gcd = (T[0] * T[1] / euclid(T[0], T[1])) for i in r...
s898801714
p03633
u466826467
1503111103
Python
Python (3.4.3)
py
Runtime Error
75
3952
485
def euclid(a, b): if b < a: tmp = a a = b b = tmp ret = b % a if ret == 0: return a else: return euclid(ret, a) if __name__ == '__main__': N = int(input()) T = [] for i in range(N): T.append(int(input())) if N == 1: print(T[0]) ...
s182390510
p03633
u123310422
1502998444
Python
Python (3.4.3)
py
Runtime Error
17
3060
223
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 = [] for i in range(N): T.append(int(input())) T.sort() print(int(lcm(T[-1], T[-2])))
s935181080
p03633
u491153752
1502995353
Python
Python (3.4.3)
py
Runtime Error
17
2940
212
def gcd(a, b): if b == 0: return a else: return gcd(b, a % b) n = int(input()) res = 1 for i in range(n): a = int(input()) g = gcd(res, a) res = int(res / g) * a print(res)
s435986648
p03633
u491153752
1502995204
Python
Python (3.4.3)
py
Runtime Error
17
2940
212
def gcd(a, b): if b == 0: return a else: return gcd(b, a % b) n = int(input()) res = 1 for i in range(n): a = int(input()) g = gcd(res, a) res = int(res * a / g) print(res)
s207842036
p03633
u491153752
1502994937
Python
Python (3.4.3)
py
Runtime Error
18
2940
217
def gcd(a, b): if b == 0: return a else: return gcd(b, a % b) n = int(input()) res = 1 for i in range(n): a = int(input()) g = gcd(res, a) res = int(res * a / g) print(str(res))
s095593941
p03633
u165538494
1502946256
Python
Python (3.4.3)
py
Runtime Error
35
5048
156
import fractions import functools n=int(input()) t=[] for i in range(n): t.append(int(input())) ans=functools.reduce(a*b//fractions.gcd(a,b),t) print(ans)
s837573837
p03633
u642905089
1502933082
Python
Python (3.4.3)
py
Runtime Error
149
417012
237
def gcd(a,b): if b == 0: return a else: return gcd(b, a % b) N = int(input()) Ts = [None for i in range(N)] a = input() b = 0 for i in range(N-1): b = int(input()) a = (a*b) // gcd(a,b) print(a)
s271296285
p03633
u518455500
1502913647
Python
Python (3.4.3)
py
Runtime Error
73
3948
237
def gcd(a,b): if b == 0: return a else: return gcd(b,a%b) def lcm(a,b): g = gcd(a,b) return a/g * b n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = lcm(ans,t) print(int(ans))
s877378238
p03633
u846552659
1502839706
Python
Python (3.4.3)
py
Runtime Error
74
3952
332
# -*- coding:utf-8 -*- def euc(a,b): if b == 0: return a else: return euc(b, a%b) N = int(input()) T = [ int(input()) for tmp in range(N) ] if len(T) > 1: a = T.pop() b = T.pop() lcm = a*b/euc(a,b) for tmp in T: lcm = tmp*lcm/euc(tmp,lcm) print(int(lcm)) else: pr...
s649893424
p03633
u821323926
1502839256
Python
Python (3.4.3)
py
Runtime Error
71
3944
194
def gcd(a, b): if b == 0: return a return gcd(b, a%b) def lcm(a, b): return a * b / gcd(a, b) n = int(input()) ans = 1 for nnn in range(n): ans = lcm(ans, int(input())) print(int(ans))
s128850987
p03633
u216289806
1502825605
Python
Python (3.4.3)
py
Runtime Error
76
3940
380
''' def gcd(a,b): if a<b: c=a a=b b=c c=a%b if c==0: return b else: return gcd(b,c) ''' def gcd(a,b): return a if b == 0 else gcd(b,a%b) def lcm(e,f): c=gcd(e,f) return e/c*f n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for...
s607192287
p03633
u216289806
1502823501
Python
Python (3.4.3)
py
Runtime Error
73
3956
333
def gcd(a,b): if a<b: c=a a=b b=c c=a%b if c==0: return b else: return gcd(b,c) def lcm(a,b): c=gcd(a,b) return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=lcm(ans,t[lop]) pr...
s462863339
p03633
u216289806
1502823248
Python
Python (3.4.3)
py
Runtime Error
17
3064
430
n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=lcm(ans,t[lop]) print(int(ans)) def gcd(a,b): if a<b: c=a a=b b=c c=a%b return b def lcm(a,b): c=gcd(a,b) return a/c*b n=int(input()) t=[0]*n for lop2 in ...
s441494950
p03633
u216289806
1502823198
Python
Python (3.4.3)
py
Runtime Error
17
3064
430
n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=lcm(ans,t[lop]) print(int(ans)) def gcd(a,b): if a<b: c=a a=b b=c c=a%b return b def lcm(a,b): c=gcd(a,b) return a/c*b n=int(input()) t=[0]*n for lop2 in ...
s453578379
p03633
u216289806
1502823144
Python
Python (3.4.3)
py
Runtime Error
17
3060
189
def lcm(a,b): c=4 return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=lcm(ans,t[lop]) print(int(ans))
s476965047
p03633
u216289806
1502823043
Python
Python (3.4.3)
py
Runtime Error
17
3060
249
def gcd(a,b): if a<b: d=a a=b b=d def lcm(a,b): c=gcd(a,b) return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=lcm(ans,t[lop]) print(int(ans))
s778844947
p03633
u216289806
1502822786
Python
Python (3.4.3)
py
Runtime Error
17
3064
357
def gcd(a,b): if a<b: d=a a=b b=d if b==0: b=1 if a==0: a=1 c=a%b if c==0: return b else: return 5 def lcm(a,b): c=gcd(a,b) return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ...
s997522380
p03633
u216289806
1502822752
Python
Python (3.4.3)
py
Runtime Error
75
3952
363
def gcd(a,b): if a<b: d=a a=b b=d if b==0: b=1 if a==0: a=1 c=a%b if c==0: return b else: return gcd(b,c) def lcm(a,b): c=gcd(a,b) return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n...
s311997503
p03633
u216289806
1502822702
Python
Python (3.4.3)
py
Runtime Error
17
3064
334
def gcd(a,b): if a<b: d=a a=b b=d if b==0: b=1 c=a%b if c==0: return b else: return 2 def lcm(a,b): c=gcd(a,b) return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=lcm(ans,t[lop]) pr...
s253705923
p03633
u216289806
1502822500
Python
Python (3.4.3)
py
Runtime Error
74
3952
341
def gcd(a,b): if a<b: d=a a=b b=d if b==0: b=1 c=a%b if c==0: return b else: return gcd(b,c) def lcm(a,b): c=gcd(a,b) return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=lcm(ans,t[l...
s819548031
p03633
u216289806
1502821641
Python
Python (3.4.3)
py
Runtime Error
17
3064
352
def gcd(a,b): if a<b: c=a a=b b=c c=a%b if c==0: a=b b=c return gcd(a,b) else: return b def lcm(a,b): c=gcd(a,b) return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=...
s685024597
p03633
u216289806
1502821578
Python
Python (3.4.3)
py
Runtime Error
17
3064
334
def gcd(a,b): if a<b: c=a a=b b=c c=a%b if c==0: return gcd(b,c) else: return b def lcm(a,b): c=gcd(a,b) return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=lcm(ans,t[lop]) pr...
s438917650
p03633
u216289806
1502821503
Python
Python (3.4.3)
py
Runtime Error
17
3064
335
def gcd(a,b): if a<b: c=a a=b b=c c=a%b if c==0: return gcd(b,cs) else: return b def lcm(a,b): c=gcd(a,b) return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=lcm(ans,t[lop]) p...
s484140869
p03633
u216289806
1502821182
Python
Python (3.4.3)
py
Runtime Error
18
3060
185
def lcm(a,b): c=2 return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=lcm(ans,t[lop]) print(int(ans))
s740729878
p03633
u216289806
1502818275
Python
Python (3.4.3)
py
Runtime Error
73
3956
335
def gcd(a,b): if a<b: c=a; a=b; b=c; c=a%b if c==0: return b else: return gcd(b,c) def lcm(a,b): c=gcd(a,b); return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=lcm(ans,t[lop]) ...
s287376330
p03633
u216289806
1502818080
Python
Python (3.4.3)
py
Runtime Error
17
3064
350
import gcc def gcd(a,b): if a<b: c=a; a=b; b=c; c=a%b if c==0: return b else: return gcc.gcd(b,c) def lcm(a,b): c=gcd(a,b); return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=l...
s807653141
p03633
u216289806
1502817948
Python
Python (3.4.3)
py
Runtime Error
17
3064
348
import gcc def gcd(a,b): if a<b: c=a; a=b; b=c; c=a%b if c==0: return b else: return gcc.gcd(b,c) def lcm(a,b): c=gcd(a,b); return a/c*b n=int(input()) t=[0]*n for lop2 in range(n): t[lop2]=int(input()) ans=t[0] for lop in range(1,n): ans=l...
s333438983
p03633
u216289806
1502817800
Python
Python (3.4.3)
py
Runtime Error
17
3064
328
import gcc def gcd(a,b): if a<b: c=a; a=b; b=c; c=a%b if c==0: return b else: return gcc.gcd(b,c) def lcm(a,b): c=gcd(a,b); return a/c*b n=int(input()) t=[int(input()) for lop in range(n)] ans=t[0] for lop in range(1,n): ans=lcm(ans,t[n]) print(i...