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
s192726238
p03633
u056358163
1590019501
Python
Python (3.4.3)
py
Runtime Error
23
3572
323
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input()) T = [] for _ in range(N): T.append(int(input())) ans = lcm_list(T) print(a...
s832881736
p03633
u811436126
1589918953
Python
Python (3.4.3)
py
Runtime Error
23
3572
162
import math from functools import reduce n = int(input()) t = [int(input()) for _ in range(n)] ans = reduce(lambda x, y: x * y // math.gcd(x, y), t) print(ans)
s159872300
p03633
u935558307
1589773338
Python
PyPy3 (2.4.0)
py
Runtime Error
174
38640
265
import sys sys.setrecursionlimit(200000) N = int(input()) T = [int(input()) for _ in range(N)] def gcd(a,b): return a if b==0 else gcd(b,a%b) def lcm(a,b): g = gcd(a,b) return a*b//g l = lcm(T[0],T[1]) for i in range(2,N): l = lcm(l,T[i]) print(l)
s280358054
p03633
u935558307
1589773313
Python
PyPy3 (2.4.0)
py
Runtime Error
178
38256
224
N = int(input()) T = [int(input()) for _ in range(N)] def gcd(a,b): return a if b==0 else gcd(b,a%b) def lcm(a,b): g = gcd(a,b) return a*b//g l = lcm(T[0],T[1]) for i in range(2,N): l = lcm(l,T[i]) print(l)
s496706396
p03633
u634079249
1589692253
Python
Python (3.4.3)
py
Runtime Error
37
5284
1010
import sys import os import math import bisect import collections import itertools import heapq import re import queue import fractions ii = lambda: int(sys.stdin.buffer.readline().rstrip()) il = lambda: list(map(int, sys.stdin.buffer.readline().split())) fl = lambda: list(map(float, sys.stdin.buffer.readline().split(...
s528996737
p03633
u634079249
1589692179
Python
Python (3.4.3)
py
Runtime Error
27
3932
941
import sys import os import math import bisect import collections import itertools import heapq import re import queue ii = lambda: int(sys.stdin.buffer.readline().rstrip()) il = lambda: list(map(int, sys.stdin.buffer.readline().split())) fl = lambda: list(map(float, sys.stdin.buffer.readline().split())) iln = lambda ...
s467386889
p03633
u671446913
1589596183
Python
Python (3.4.3)
py
Runtime Error
153
12488
289
#!/usr/bin/env python3 import collections import itertools as it import math import numpy as np # = input() n = int(input()) # = map(int, input().split()) # = list(map(int, input().split())) t = [int(input()) for i in range(n)] # # c = collections.Counter() print(np.lcm.reduce(t))
s933483629
p03633
u671446913
1589595970
Python
Python (3.4.3)
py
Runtime Error
23
3692
497
#!/usr/bin/env python3 import collections import itertools as it import math from functools import reduce #import numpy as np # = input() n = int(input()) # = map(int, input().split()) # = list(map(int, input().split())) t = [int(input()) for i in range(n)] # # c = collections.Counter() def lcm_base(x, y): ...
s417768258
p03633
u524534668
1589588887
Python
Python (3.4.3)
py
Runtime Error
18
3060
246
import math def lcm(a, b): return (a * b) // math.gcd(a, b) def main(): n = int(input()) l = list() for i in range(n): l.append(int(input())) ans = 1 for i in l: ans = lcm(ans, i) print(ans) main()
s448517071
p03633
u524534668
1589588810
Python
Python (3.4.3)
py
Runtime Error
19
3192
2735
#!/usr/bin/env python from __future__ import division, print_function import math import os import sys from io import BytesIO, IOBase if sys.version_info[0] < 3: from __builtin__ import xrange as range from future_builtins import ascii, filter, hex, map, oct, zip def lcm(a, b): return (a * b) // math.gcd(...
s897286593
p03633
u551109821
1589558718
Python
Python (3.4.3)
py
Runtime Error
18
2940
148
import math N = int(input()) t_lcm = int(input()) for i in range(N-1): t = int(input()) t_lcm = (t_lcm*t)//fractions.gcd(t,t_lcm) print(t_lcm)
s359050644
p03633
u551109821
1589558702
Python
Python (3.4.3)
py
Runtime Error
18
2940
143
import math N = int(input()) t_lcm = int(input()) for i in range(N-1): t = int(input()) t_lcm = (t_lcm*t)//math.gcd(t,t_lcm) print(t_lcm)
s175958709
p03633
u704658587
1589558450
Python
Python (3.4.3)
py
Runtime Error
157
12424
110
import numpy as np n = int(input()) t = [int(input()) for _ in range(n)] print(np.lcm.reduce(np.array(t)))
s545881840
p03633
u551109821
1589558271
Python
Python (3.4.3)
py
Runtime Error
158
12408
234
import numpy as np import math N = int(input()) T = np.array([int(input()) for _ in range(N)]) def lcm(x,y): return (x * y) // math.gcd(x,y) t_lcm = lcm(T[0],T[1]) for i in range(2,N): t_lcm = lcm(t_lcm,T[i]) print(t_lcm)
s371176789
p03633
u551109821
1589557866
Python
Python (3.4.3)
py
Runtime Error
205
14792
134
import numpy as np N = int(input()) T = np.array([int(input()) for _ in range(N)]) print(np.lcm.reduce(T)) # for i in range(1,N):
s675544776
p03633
u551109821
1589557650
Python
Python (3.4.3)
py
Runtime Error
153
12496
142
import numpy as np N = int(input()) T = [] for i in range(N): t = int(input()) T.append(t) a = np.array(T) print(np.lcm.reduce(a))
s781662856
p03633
u551109821
1589557176
Python
Python (3.4.3)
py
Runtime Error
152
12488
140
import math import numpy as np N = int(input()) T = [] for i in range(N): t = int(input()) T.append(t) print(np.lcm.reduce(T))
s623058441
p03633
u551109821
1589555987
Python
Python (3.4.3)
py
Runtime Error
176
12912
125
import numpy as np N = int(input()) T = [] for i in range(N): t = int(input()) T.append(t) print(np.lcm.reduce(T))
s184053621
p03633
u551109821
1589555861
Python
Python (3.4.3)
py
Runtime Error
151
12488
125
import numpy as np N = int(input()) T = [] for i in range(N): t = int(input()) T.append(t) print(np.lcm.reduce(T))
s637187129
p03633
u127499732
1589419812
Python
Python (3.4.3)
py
Runtime Error
17
2940
252
def main(): from math import gcd from functools import reduce from operator import mul n, *t = map(int, open(0).read().split()) g = reduce(gcd, t) ans = reduce(mul, t) // g print(ans) if __name__ == '__main__': main()
s463226019
p03633
u935558307
1589371434
Python
PyPy3 (2.4.0)
py
Runtime Error
174
38384
258
N = int(input()) 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*b)//g T = [int(input()) for _ in range(N)] l = lcm(T[0],T[1]) for i in range(2,N): l = lcm(l,T[i]) print(l)
s934081391
p03633
u423665486
1589349571
Python
Python (3.4.3)
py
Runtime Error
18
2940
168
from math import gcd def resolve(): n = int(input()) ans = int(input()) for i in range(n-1): v = int(input()) ans = ans * v // gcd(ans, v) print(ans) resolve()
s900820725
p03633
u423665486
1589349522
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38256
168
from math import gcd def resolve(): n = int(input()) ans = int(input()) for i in range(n-1): v = int(input()) ans = ans * v // gcd(ans, v) print(ans) resolve()
s016471818
p03633
u709799578
1589150175
Python
Python (3.4.3)
py
Runtime Error
23
3572
187
import math import functools n = int(input()) t = [int(input()) for _ in range(n)] def lcm(x, y): return (x * y) // math.gcd(x, y) ans = functools.reduce(lcm, t) print(str(ans))
s021219679
p03633
u709799578
1589149921
Python
Python (3.4.3)
py
Runtime Error
23
3572
177
import math import functools n = int(input()) t = [int(input()) for _ in range(n)] def lcm(x, y): return (x * y) // math.gcd(x, y) ans = functools.reduce(lcm, t) print(ans)
s397516064
p03633
u193264896
1589034916
Python
Python (3.4.3)
py
Runtime Error
151
12388
341
import sys readline = sys.stdin.buffer.readline import numpy as np sys.setrecursionlimit(10 ** 8) INF = float('inf') MOD = 10 ** 9 + 7 def main(): N = int(readline()) t = [0]*N for i in range(N): t[i] = int(readline()) T = np.array(t) ans = np.lcm.reduce(T) print(ans) if __name__ == '...
s179665825
p03633
u597622207
1588945330
Python
Python (3.4.3)
py
Runtime Error
24
3572
215
import math from functools import reduce N = int(input()) T = [int(input()) for _ in range(N)] def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(L): return reduce(lcm_base, L, 1) print(lcm(T))
s503066108
p03633
u671211357
1588909624
Python
Python (3.4.3)
py
Runtime Error
18
3064
157
from math import gcd N=int(input()) T=[int(input()) for i in range(N)] def lcm(a,b): return a*b//gcd(a,b) ans=1 for i in T: ans=lcm(ans,i) print(ans)
s403452712
p03633
u506086925
1588800811
Python
Python (3.4.3)
py
Runtime Error
17
3060
159
import math n = int(input()) lcmn = 1 def lcm(a, b): return a*b//math.gcd(a, b) for _ in range(n): t = int(input()) lcmn = lcm(lcmn, t) print(lcmn)
s322900600
p03633
u028973125
1588742297
Python
Python (3.4.3)
py
Runtime Error
23
3700
413
import sys import math import functools N = int(sys.stdin.readline().rstrip()) T = [] for _ in range(N): T.append(int(sys.stdin.readline().rstrip())) def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return functools.reduce(lcm_base, numbers, 1) def lcm_list(numbers): return fu...
s623085786
p03633
u028973125
1588742256
Python
PyPy3 (2.4.0)
py
Runtime Error
176
38384
413
import sys import math import functools N = int(sys.stdin.readline().rstrip()) T = [] for _ in range(N): T.append(int(sys.stdin.readline().rstrip())) def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return functools.reduce(lcm_base, numbers, 1) def lcm_list(numbers): return fu...
s064450704
p03633
u028973125
1588742162
Python
PyPy3 (2.4.0)
py
Runtime Error
167
38384
376
import sys import math import functools N = int(sys.stdin.readline().rstrip()) T = [] for _ in range(N): T.append(int(sys.stdin.readline().rstrip())) def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return functools.reduce(lcm_base, numbers, 1) def lcm_list(numbers): return fu...
s005371715
p03633
u135116520
1588713343
Python
Python (3.4.3)
py
Runtime Error
17
3064
348
N,M=map(int,input().split()) u=0 for i in range(M): a,b=list(map(int,input().split())) for i in range(M): if a[i]==1: s=b[i] idxlist=[] for idx,val in enumerate(a): if val==s: idxlist.append(idx) for j in idxlist: if b[j]!=N: u+=1 if u==len(idxlist): print("IMPOSSIBLE")...
s761321707
p03633
u135116520
1588713281
Python
Python (3.4.3)
py
Runtime Error
17
3064
469
def main(mylist): idxlist = [] for idx, val in enumerate(mylist): if val == 'cc': idxlist.append(idx) N,M=map(int,input().split()) u=0 for i in range(M): a,b=list(map(int,input().split())) for i in range(M): if a[i]==1: s=b[i] idxlist=[] for idx,val in enumerate(a): if val==s: ...
s147847733
p03633
u135116520
1588710430
Python
Python (3.4.3)
py
Runtime Error
36
5076
293
import fractions def lcm_base(x, y): return (x * y) // fractions.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N=int(input()) T=[] for i in range(N): t=int(input()) T.append(t) s=lcm_list(T) print(s)
s173063667
p03633
u135116520
1588710379
Python
Python (3.4.3)
py
Runtime Error
35
5076
283
import fractions def lcm_base(x, y): return (x * y) // fractions.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N=int(input()) T=[] for i in range(N): t=int(input()) T.append(t) lcm_list(T)
s388493143
p03633
u025501820
1588669119
Python
Python (3.4.3)
py
Runtime Error
36
5128
508
#!/usr/bin/env python3 N = int(input()) # S = input() # N, K = map(int, input().split()) # A = list(map(int, input().split())) mod = 10 ** 9 from functools import reduce from fractions import gcd def main(): T = sorted(list(set([int(input()) for _ in range(N)]))) if len(T) == 1: print(T[0]) ex...
s439456629
p03633
u025501820
1588669049
Python
Python (3.4.3)
py
Runtime Error
36
5128
510
#!/usr/bin/env python3 N = int(input()) # S = input() # N, K = map(int, input().split()) # A = list(map(int, input().split())) mod = 10 ** 9 from functools import reduce from fractions import gcd def main(): T = sorted(list(set([int(input()) for _ in range(N)]))) if len(T) == 1: print(T[0]) ex...
s585578311
p03633
u025501820
1588668506
Python
Python (3.4.3)
py
Runtime Error
36
5128
496
#!/usr/bin/env python3 N = int(input()) # S = input() # N, K = map(int, input().split()) # A = list(map(int, input().split())) mod = 10 ** 9 from functools import reduce from fractions import gcd def main(): T = list(set([int(input()) for _ in range(N)])) if len(T) == 1: print(T[0]) exit() ...
s903914849
p03633
u390727364
1588631243
Python
Python (3.4.3)
py
Runtime Error
18
3060
319
import math from sys import stdin def main(): n = int(stdin.readline()) t = [int(stdin.readline()) for _ in range(n)] dp = [0 for _ in range(n)] dp[0] = t[0] for i in range(1, n): dp[i] = t[i] * dp[i-1] // math.gcd(t[i], dp[i-1]) print(dp[-1]) if __name__ == "__main__": main()
s663222684
p03633
u390727364
1588630886
Python
Python (3.4.3)
py
Runtime Error
150
12500
204
import numpy as np from sys import stdin def main(): n = int(stdin.readline()) t = [int(stdin.readline()) for _ in range(n)] print(np.lcm.reduce(t)) if __name__ == "__main__": main()
s337916857
p03633
u934868410
1588628293
Python
Python (3.4.3)
py
Runtime Error
18
3060
195
n = int(input()) t = [int(input()) for _ in range(n)] def gcd(x,y): if y == 0: return x return gcd(y, x % y) ans = t[0] for x in t[1:]: ans = ans * t[i] // gcd(ans, t[i]) print(ans)
s528513138
p03633
u052066895
1588604704
Python
Python (3.4.3)
py
Runtime Error
18
3060
159
import math N = int(input()) A = [] for _ in range(N): A.append(int(input())) ans = 1 for i in range(N): ans = ans*A[i]//math.gcd(ans,A[i]) print(ans)
s433283224
p03633
u423665486
1588446745
Python
PyPy3 (2.4.0)
py
Runtime Error
178
38512
371
def gcd(a, b): """Compute the greatest common divisor of a and b""" while b > 0: a, b = b, a % b return a def lcm(a, b): """Compute the lowest common multiple of a and b""" return a * b / gcd(a, b) def resolve(): n = int(input()) T = [] for _ in range(n): T.append(int(input())) ans = 1 for i in range(n)...
s796357979
p03633
u054559808
1588308220
Python
PyPy3 (2.4.0)
py
Runtime Error
175
38256
245
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)] ans = lcm(t[0], t[1]) for i in range(2, n): ans = lcm(ans, t[i]) print(ans)
s778535810
p03633
u054559808
1588307834
Python
PyPy3 (2.4.0)
py
Runtime Error
167
38256
198
import math def lcm(x, y): return (x * y) // math.gcd(x, y) n = int(input()) t = [int(input()) for i in range(n)] ans = lcm(t[0], t[1]) for i in range(2, n): ans = lcm(ans, t[i]) print(ans)
s116301920
p03633
u989306199
1588194057
Python
Python (3.4.3)
py
Runtime Error
18
3060
175
import math def nlcm(t): res = 1 for a in t: res *= a // math.gcd(a,res) return res n = int(input()) T = [int(input()) for i in range(n)] print(nlcm(T))
s920865327
p03633
u892487306
1588191517
Python
Python (3.4.3)
py
Runtime Error
17
3060
254
import math N = int(input()) current_lcm = None for _ in range(N): t = int(input()) if current_lcm is None: current_lcm = t continue current_lcm = current_lcm // math.gcd(current_lcm, t) current_lcm *= t print(current_lcm)
s630629780
p03633
u892487306
1588191103
Python
Python (3.4.3)
py
Runtime Error
17
3060
237
import math N = int(input()) current_lcm = None for _ in range(N): t = int(input()) if current_lcm is None: current_lcm = t continue current_lcm = current_lcm * t // math.gcd(current_lcm, t) print(current_lcm)
s662909479
p03633
u188745744
1588167489
Python
Python (3.4.3)
py
Runtime Error
17
3060
137
import math A = int(input()) ans = int(input()) for i in range(A-1): B = int(input()) ans = B * ans // math.gcd(ans,B) print(ans)
s514074097
p03633
u482157295
1588130200
Python
Python (3.4.3)
py
Runtime Error
17
3060
175
from math import gcd n = int(input()) t_list = [int(input()) for i in range(n)] ans = t_list[0] for i in range(1,n): ans = ans * t_list[i] // gcd(ans,t_list[i]) print(ans)
s419502734
p03633
u690040890
1588096293
Python
Python (3.4.3)
py
Runtime Error
23
3572
229
import math from functools import reduce N = int(input()) T = [int(input()) for _ in range(N)] def lcm_base(x,y): return y//math.gcd(x,y)*x def lcm_list(numbers): return reduce(lcm_base, numbers, 1) print(lcm_list(T))
s984651673
p03633
u690040890
1588096176
Python
Python (3.4.3)
py
Runtime Error
25
3572
231
import math from functools import reduce N = int(input()) T = [int(input()) for _ in range(N)] def lcm_base(x,y): return (x//math.gcd(x,y))*y def lcm_list(numbers): return reduce(lcm_base, numbers, 1) print(lcm_list(T))
s021352998
p03633
u690040890
1588090921
Python
Python (3.4.3)
py
Runtime Error
23
3700
235
import math from functools import reduce N = int(input()) T = [int(input()) for _ 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(T))
s875315983
p03633
u644516473
1588024971
Python
Python (3.4.3)
py
Runtime Error
18
2940
174
from math import gcd from functools import reduce import sys lcm = lambda x, y : x*y // gcd(x, y) N, *T = map(int, sys.stdin.read().split()) ans = reduce(lcm, T) print(ans)
s998167449
p03633
u280552586
1588023031
Python
Python (3.4.3)
py
Runtime Error
17
2940
170
from math import gcd n = int(input()) def lcm(a, b): return a * b // gcd(a, b) ans = 1 for _ in range(n): t = int(input()) ans = lcm(ans, t) print(ans)
s950585839
p03633
u775451660
1588017058
Python
Python (3.4.3)
py
Runtime Error
18
3060
169
import math def lcm(x, y): return (x * y) // math.gcd(x, y) N = int(input()) ans = 1 for i in range(N): tmp = int(input()) ans = lcm(ans, tmp) print(ans)
s402139701
p03633
u691018832
1588000759
Python
Python (3.4.3)
py
Runtime Error
17
3060
300
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) from math import gcd n = int(readline()) t = [int(readline()) for _ in range(n)] ans = t[0] for tt in t: ans = ans * tt // gcd(ans, tt) print(ans)
s410013370
p03633
u321035578
1587853960
Python
Python (3.4.3)
py
Runtime Error
35
5048
182
import fractions n = int(input()) t = [0] * n for i in range(n): t[i] = int(input()) ans = t[0] for i in range(1,n): ans = ans * a[i] // fractions.gcd(ans,a[i]) print(ans)
s905314542
p03633
u568789901
1587840524
Python
Python (3.4.3)
py
Runtime Error
35
5048
255
import fractions ans=1 N=int(input()) list=[] for i in range(N): a=int(input()) list.append(a) X=[x for x in set(list)] def lcm(a,b): x=int((a*b)/fractions.gcd(a,b)) return x for i in range(0,len(X)): ans=lcm(X[i],ans) print(ans)
s193338754
p03633
u568789901
1587840484
Python
Python (3.4.3)
py
Runtime Error
41
5340
256
import fractions ans=1 N=int(input()) list=[] for i in range(N): a=int(input()) list.append(a) X=[x for x in set(list)] def lcm(a,b): x=int((a*b)/math.fractions(a,b)) return x for i in range(0,len(X)): ans=lcm(X[i],ans) print(ans)
s835267697
p03633
u568789901
1587840291
Python
Python (3.4.3)
py
Runtime Error
18
3064
281
import math ans=1 N=int(input()) list=[] for i in range(N): a=int(input()) list.append(a) X=[x for x in set(list)] if 0 in X: X.remove(0) def lcm(a,b): x=(a*b)/math.gcd(a,b) x=int(x) return x for i in range(0,len(X)): ans=lcm(X[i],ans) print(ans)
s309371757
p03633
u568789901
1587840249
Python
Python (3.4.3)
py
Runtime Error
19
3188
273
import math ans=1 N=int(input()) list=[] for i in range(N): a=int(input()) list.append(a) X=[x for x in set(list)] if 0 in X: X.remove(0) def lcm(a,b): x=int((a*b)/math.gcd(a,b)) return x for i in range(0,len(X)): ans=lcm(X[i],ans) print(ans)
s255170829
p03633
u568789901
1587840032
Python
Python (3.4.3)
py
Runtime Error
18
3064
251
import math ans=1 N=int(input()) list=[] for i in range(N): a=int(input()) list.append(a) X=[x for x in set(list)] def lcm(a,b): x=int((a*b)/math.gcd(a,b)) return x for i in range(0,len(list)): ans=lcm(list[i],ans) print(ans)
s812304498
p03633
u568789901
1587839695
Python
Python (3.4.3)
py
Runtime Error
18
3060
245
import math ans=1 N=int(input()) list=[] for i in range(N): a=int(input()) list.append(a) X=[x for x in set(list)] def lcm(a,b): x=int((a*b)/math.gcd(a,b)) return x for i in range(0,len(X)): ans=lcm(X[i],ans) print(ans)
s881721726
p03633
u568789901
1587839239
Python
Python (3.4.3)
py
Runtime Error
18
3060
205
import math N=int(input()) ans=1 list=[] for i in range(N): a=int(input()) list.append(a) X=[x for x in set(list)] for i in range(0,len(X)): ans=(X[i]*ans)//(math.gcd(X[i],ans)) print(ans)
s102092216
p03633
u568789901
1587839203
Python
Python (3.4.3)
py
Runtime Error
18
3060
245
import math N=int(input()) ans=1 list=[] for i in range(N): a=int(input()) list.append(a) X=[x for x in set(list)] if X[0]<2: del X[0] else: pass for i in range(0,len(X)): ans=(X[i]*ans)//(math.gcd(X[i],ans)) print(ans)
s975002226
p03633
u568789901
1587839052
Python
Python (3.4.3)
py
Runtime Error
18
3060
246
import math N=int(input()) ans=1 list=[] for i in range(N): a=int(input()) list.append(a) X=[x for x in set(list)] if 1 in X: X.remove(1) else: pass for i in range(0,len(X)): ans=(X[i]*ans)//(math.gcd(X[i],ans)) print(ans)
s265561100
p03633
u568789901
1587838422
Python
Python (3.4.3)
py
Runtime Error
18
3064
315
import math N=int(input()) list=[] for i in range(N): a=int(input()) list.append(a) X=[x for x in set(list)] if 1 in X: X.remove(1) ans=int((X[0]*X[1])/(math.gcd(X[0],X[1]))) if len(X)==1: print(X[0]) else: for i in range(1,len(X)-1): ans=int((X[i]*ans)/(math.gcd(X[i],ans))) print(ans)
s761568722
p03633
u568789901
1587838331
Python
Python (3.4.3)
py
Runtime Error
18
3064
312
import math N=int(input()) list=[] for i in range(N): a=int(input()) list.append(a) X=[x for x in set(list)] if 1 in X: X.pop(1) ans=int((X[0]*X[1])/(math.gcd(X[0],X[1]))) if len(X)==1: print(X[0]) else: for i in range(1,len(X)-1): ans=int((X[i]*ans)/(math.gcd(X[i],ans))) print(ans)
s374559279
p03633
u696444274
1587761200
Python
Python (3.4.3)
py
Runtime Error
18
3060
492
from math import gcd from functools import reduce from collections import deque # from math import factorial import sys sys.setrecursionlimit(2000000) # import math # import itertools # import statistics # import numpy as np # import collections n = int(input()) # = list(map(int, input().split())) t = [] for i in range...
s099292078
p03633
u372670441
1587731260
Python
Python (3.4.3)
py
Runtime Error
17
2940
633
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (int)(n); i++) #define rrep(ri,n) for(int ri = (int)(n-1); ri >= 0; ri--) #define rep2(i,x,n) for(int i = (int)(x); i < (int)(n); i++) #define repit(itr,x) for(auto itr = x.begin(); itr != x.end(); itr++) #define rrepit(ritr,x) for(auto ritr = x.rbegin(); rit...
s122585807
p03633
u857428111
1587729974
Python
Python (3.4.3)
py
Runtime Error
17
3060
258
def resolve(): nclo=range(int(input())) from math import gcd def lcm(a,b): return (a*b)//gcd(a,b) next=0 temp=1 for i in nclo: next=int(input()) temp=lcm(temp,next) print(temp) #%%submit! resolve()
s802657125
p03633
u263830634
1587729250
Python
Python (3.4.3)
py
Runtime Error
21
3316
181
from collections import gcd N = int(input()) t = int(input()) ans = t for _ in range(N - 1): tmp = int(input()) t = gcd(ans, tmp) ans *= tmp ans //= t print (ans)
s257674145
p03633
u263830634
1587729228
Python
Python (3.4.3)
py
Runtime Error
17
3060
174
from math import gcd N = int(input()) t = int(input()) ans = t for _ in range(N - 1): tmp = int(input()) t = gcd(ans, tmp) ans *= tmp ans //= t print (ans)
s048098265
p03633
u118642796
1587729104
Python
Python (3.4.3)
py
Runtime Error
18
3060
172
#!/usr/bin/env python3 import math N = int(input()) T = [int(input()) for _ in range(N)] ans = 1 for i in range(N): ans = ans * T[i] // math.gcd(ans, T[i]) print(ans)
s088201330
p03633
u498487134
1587728253
Python
PyPy3 (2.4.0)
py
Runtime Error
178
38384
346
import sys input = sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): mod=10**9+7 from math import gcd N=I() ans=1 for i in range(N): T=I() ans=(ans*T)//(gcd(ans,T)) ...
s582910885
p03633
u502731482
1587534540
Python
Python (3.4.3)
py
Runtime Error
17
2940
131
from math import gcd n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = ans * t // gcd(ans, t) print(ans)
s788673601
p03633
u502731482
1587534470
Python
Python (3.4.3)
py
Runtime Error
18
2940
135
from fraction import gcd n = int(input()) ans = 1 for i in range(n): t = int(input()) ans = ans * t // gcd(ans, t) print(ans)
s438049201
p03633
u125545880
1587518106
Python
Python (3.4.3)
py
Runtime Error
36
5048
366
import fractions import sys #import numpy as np def lcm_base(x, y): return (x * y) // fractions.gcd(x, y) def main(): N = int(input()) for i in range(N): if i == 0: tmp = int(input()) else: a = int(input()) b = lcm_base(a, tmp) tmp = b pr...
s890872672
p03633
u125545880
1587518007
Python
Python (3.4.3)
py
Runtime Error
39
5344
361
import fractions import sys #import numpy as np def lcm_base(x, y): return (x * y) // math.gcd(x, y) def main(): N = int(input()) for i in range(N): if i == 0: tmp = int(input()) else: a = int(input()) b = lcm_base(a, tmp) tmp = b print(b...
s928122778
p03633
u125545880
1587517886
Python
Python (3.4.3)
py
Runtime Error
18
3060
336
import math import sys def lcm_base(x, y): return (x * y) // math.gcd(x, y) def main(): N = int(input()) for i in range(N): if i == 0: tmp = int(input()) else: a = int(input()) b = lcm_base(a, tmp) tmp = b print(b) if __name__ == "__main...
s891315468
p03633
u125545880
1587517408
Python
Python (3.4.3)
py
Runtime Error
18
3060
301
import math def lcm_base(x, y): return (x * y) // math.gcd(x, y) def main(): N = int(input()) for i in range(N): if i == 0: b = int(input()) else: a = int(input()) b = lcm_base(a, b) print(b) if __name__ == "__main__": main()
s107904599
p03633
u550114433
1587509620
Python
Python (3.4.3)
py
Runtime Error
38
5052
168
from fractions import gcd N = int(input()) T = list(map(int, input().split())) ans = 1 for i in range(0,N): ans = ans * T[i] / gcd(ans, T[i]) print(int(ans))
s063908543
p03633
u106181248
1587442718
Python
Python (3.4.3)
py
Runtime Error
23
3572
229
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) n = int(input()) t = [int(input()) for i in range(n)] print(lcm(*t))
s279452158
p03633
u106181248
1587442642
Python
Python (3.4.3)
py
Runtime Error
23
3688
237
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))
s072383705
p03633
u106181248
1587442606
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38256
237
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))
s474144927
p03633
u959225525
1587430178
Python
Python (3.4.3)
py
Runtime Error
17
3060
215
import math def lcm(x, y): return (x * y) // math.gcd(x, y) n=int(input()) ans=0 ans=int(input()) if n==1: print(ans) exit() for i in range(n-1): t=int(input()) ans=lcm(ans,t) print(ans)
s155148816
p03633
u520276780
1587306779
Python
Python (3.4.3)
py
Runtime Error
296
20284
184
import numpy as np n=int(input()) a = list( int(input()) for _ in range(n)) #print(np.lcm.reduce(a1)) ans = 1 from math import gcd for ai in a: ans = ans*ai//gcd(ans,ai) print(ans)
s680918708
p03633
u812576525
1587296755
Python
Python (3.4.3)
py
Runtime Error
18
3056
198
n = int(input()) t = [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(t))
s161272864
p03633
u277312083
1587162700
Python
Python (3.4.3)
py
Runtime Error
37
5048
157
import fractions def lcm(x, y): return x * y / fractions.gcd(x, y) n = int(input()) i = 1 for _ in range(n): i = int(lcm(i, int(input()))) print(i)
s275412903
p03633
u255673886
1587141795
Python
PyPy3 (2.4.0)
py
Runtime Error
174
38384
1031
from collections import deque from heapq import heapify,heappop,heappush,heappushpop from copy import copy,deepcopy from itertools import permutations,combinations from collections import defaultdict,Counter from math import gcd from functools import reduce from pprint import pprint def myinput(): return map(int,i...
s529610409
p03633
u953110527
1587101612
Python
Python (3.4.3)
py
Runtime Error
18
3060
198
import math def lcm(a,b): return (a*b) // math.gcd(a,b) n = int(input()) t = [] for i in range(n): a = int(input()) t.append(a) b = t[0] for i in range(1,n): b = lcm(b,t[i]) print(b)
s271819864
p03633
u884692162
1587084087
Python
Python (3.4.3)
py
Runtime Error
18
3060
298
import sys import math sr = lambda: sys.stdin.readline().rstrip() ir = lambda: int(sr()) lr = lambda: list(map(int, sr().split())) def lcm(x, y): return (x * y) // math.gcd(x, y) N = ir() start = ir() next = 0 for n in range(1, N): next = ir() start = lcm(start, next) print(start)
s200686901
p03633
u288430479
1587001750
Python
Python (3.4.3)
py
Runtime Error
17
3060
159
解答例 from fractions import gcd def lcm(a,b): return a*b//gcd(a,b) N=int(input()) ans=1 for i in range(N): t=int(input()) ans=lcm(ans,t) print(ans)
s202415269
p03633
u564589929
1586998904
Python
Python (3.4.3)
py
Runtime Error
37
5048
575
# import sys # sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 def II(): return int(input()) def MI(): return map(int, input().split()) def MI1(): return map(int1, input().split()) def LI(): return list(map(int, input().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] import fract...
s108790230
p03633
u564589929
1586998757
Python
Python (3.4.3)
py
Runtime Error
19
3064
562
# import sys # sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 def II(): return int(input()) def MI(): return map(int, input().split()) def MI1(): return map(int1, input().split()) def LI(): return list(map(int, input().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] import math ...
s026855126
p03633
u363074342
1586836864
Python
Python (3.4.3)
py
Runtime Error
21
3064
126
import math N = int(input()) S_t = 1 for i in range(N): t = int(input()) S_t = S_t * t // math.gcd(S_t,t) print(S_t)
s298472836
p03633
u011062360
1586807167
Python
Python (3.4.3)
py
Runtime Error
23
3688
308
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) n = int(input()) list_T = [int(input()) for _ in range(n)] print(lcm_list(list_T))
s794754418
p03633
u841531687
1586785416
Python
Python (3.4.3)
py
Runtime Error
18
3060
157
import math N = int(input()) T = list(int(input()) for _ in range(N)) ans = T[0] for i in range(1, N): ans = ans * T[i] // math.gcd(ans, T[i]) print(ans)