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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s505255262 | p03632 | u197697186 | 1506771773 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 215 | a, b, c, d = map(int, input().split())
if a <= c:
if b <= c:
print(b-c)
else:
print(d - c)
elif c <= a:
if c <= b:
print(c - b)
else:
print(b - c)
else:
print(0) |
s901989061 | p03632 | u937164028 | 1506717551 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 315 | if __name__ == '__main__':
A, B, C, D = map(int, input().split())
if B <= C or D <= A:
print(0)
else:
if A < C:
print(B-C)
elif A > C
print(D - A)
else:
if B < D:
print(B-A)
else:
print(D-A) |
s187520170 | p03632 | u937164028 | 1506717355 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 200 | if __name == '__main__':
A, B, C, D = map(int, input().split())
if B =< C or D =< A:
print(0)
else:
if A < C:
print(B-C)
else:
print(D - A) |
s727576707 | p03632 | u813450984 | 1506262114 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 208 | s = map(int, input().split())
A, B, C, D = [for i in s]
if D <= A or C >= B:
print("0")
elif C <= A and D >= B:
print(B - A)
elif C >= A and D >= B:
print(B - C)
elif D <= B and C <= A:
print(D - A) |
s069568300 | p03632 | u677320550 | 1505463567 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 80 | map(int, input().split())
if(b<=c):
print(0)
else:
z=b-c
print(z)
|
s531989115 | p03632 | u677320550 | 1505463554 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 80 | map(int, input().split())
if(b<=c):
print(0)
else:
z=b-c
print(z)
|
s578213713 | p03632 | u677320550 | 1505463416 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 114 | a=int(input())
b=int(input())
c=int(input())
d=int(input())
if(b<=c):
print(0)
else:
z=b-c
print(z)
|
s282513947 | p03632 | u579754454 | 1503613145 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38640 | 91 | A,B,C,D=int(input().split())
x=min(C,D)-max(A,B)
if x>0:
print(x)
else:
print("0")
|
s425870658 | p03632 | u174404613 | 1503361094 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 97 | i=input()
l=map(int,input().split())
ans=min(l[1],l[3])-max(l[0],l[2])
print(ans if ans>0 else 0) |
s895498683 | p03632 | u018679195 | 1502945037 | Python | Python (3.4.3) | py | Runtime Error | 16 | 2940 | 63 | a,b,c,d=map(int,input().split())
print(max(0,min(a,c)-max(b,d)) |
s257524254 | p03632 | u863370423 | 1502944983 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 65 | a,b,c,d=map(int(),input().split())
print(max(0,min(a,c)-max(b,d)) |
s536466080 | p03632 | u725500654 | 1502937828 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 116 | a=input()
b=input()
c=input()
d=input()
fast=max(int(a),int(c))
last=min(int(b),int(d))
print(max(0,int(last-fast))) |
s201581801 | p03632 | u725500654 | 1502937358 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 118 | a=input()
b=input()
c=input()
d=input()
fast=max(int(a),int(c))
last=min(int(b),int(d))
print(max(0,int(last-fast))) |
s446845627 | p03632 | u725500654 | 1502936341 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 167 | a=input()
b=input()
c=input()
d=input()
if a<c:
fast=c
else:
fast=a
if b<d:
last=b
else:
last=d
if b<c:
print("0")
else:
print(str(last-fast)) |
s410159024 | p03632 | u513375789 | 1502927997 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 232 | #include<iostream>
using namespace std;
int main(void){
int A,B,C,D;
cin >> A >> B >> C >> D;
const int lower = max(A,C);
const int upper = min(B,D);
cout << max(0,upper-lower) << endl;
return 0;
} |
s908545973 | p03632 | u216289806 | 1502817602 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 180 | def gcd(a,b):
return b
def lcm(a,b):
return a
n=int(input())
t=[int(input()) for lop in range(n)]
ans=t[0]
for lop in range(1,n):
ans=lcm(ans,t)
print(int(ans)) |
s690064400 | p03632 | u216289806 | 1502817568 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 312 | 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=[int(input()) for lop in range(n)]
ans=t[0]
for lop in range(1,n):
ans=lcm(ans,t)
print(int(ans)) |
s598579284 | p03632 | u216289806 | 1502816902 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 314 | A=input().strip().sprit(' ')
B=input().strip().sprit(' ')
C=input().strip().sprit(' ')
D=input().strip().sprit(' ')
a=int(A)
b=int(B)
c=int(C)
d=int(D)
max=0
min=0
if a < c :
max=c
else :
max=a
if b > d :
min=d
else :
min=b
if ( min - max ) > 0 :
print( min - max )
else :
print(0)
|
s593295201 | p03632 | u216289806 | 1502816851 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 272 |
A=input().strip()
B=input().strip()
C=input().strip()
D=input().strip()
a=int(A)
b=int(B)
c=int(C)
d=int(D)
max=0
min=0
if a < c :
max=c
else :
max=a
if b > d :
min=d
else :
min=b
if ( min - max ) > 0 :
print( min - max )
else :
print(0)
|
s293575276 | p03632 | u216289806 | 1502816511 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 87 | A=input()
B=input()
C=input()
D=input()
a=int(A)
b=int(B)
c=int(C)
d=int(D)
print(0)
|
s740802861 | p03632 | u216289806 | 1502816490 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 238 | A=input()
B=input()
C=input()
D=input()
a=int(A)
b=int(B)
c=int(C)
d=int(D)
max=0
min=0
if a < c :
max=c
else :
max=a
if b > d :
min=d
else :
min=b
if ( min - max ) > 0 :
print( min - max )
else :
print(0)
|
s548720115 | p03632 | u216289806 | 1502816387 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 235 | nput()
B=input()
C=input()
D=input()
a=int(A)
b=int(B)
c=int(C)
d=int(D)
max=0
min=0
if a < c :
max=c
else :
max=a
if b > d :
min=d
else :
min=b
if ( min - max ) > 0 :
print( min - max )
else :
print(0)
|
s132810984 | p03632 | u216289806 | 1502816274 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 264 | A=input()
B=input()
C=input()
D=input()
a=int(A)
b=int(B)
c=int(C)
d=int(D)
max=0
min=0
if a < c :
max=c
else :
max=a
if b > d :
min=d
else :
min=b
if ( min - max ) > 0 :
print( min - max )
print('\n')
else :
print('0\n')
quit()
|
s441442631 | p03632 | u216289806 | 1502816168 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 243 | A=input()
B=input()
C=input()
D=input()
a=int(A)
b=int(B)
c=int(C)
d=int(D)
if a < c :
max=c
else :
max=a
if b > d :
min=d
else :
min=b
if ( min - max ) > 0 :
print( min - max )
print('\n')
else :
print('0\n') |
s505405727 | p03632 | u216289806 | 1502816088 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 251 | A=input()
B=input()
C=input()
D=input()
a=int(A)
b=int(B)
c=int(C)
d=int(D)
if a < c :
max=c
else :
max=a
if b > d :
min=d
else :
min=b
if ( min - max ) > 0 :
print( min - max )
print('\n')
else :
print('0\n')
quit()
|
s434869019 | p03632 | u216289806 | 1502816011 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 225 | A=input()
B=input()
C=input()
D=input()
a=int(A)
b=int(B)
c=int(C)
d=int(D)
if a<c:
max=c
else:
max=a
if b>d:
min=d
else:
min=b
if (min-max)>0:
print(min-max)
print('\n')
else:
print('0\n')
quit()
|
s613300248 | p03632 | u216289806 | 1502815791 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 226 | A=input()
B=input()
C=input()
D=input()
a=int(A)
b=int(B)
c=int(C)
d=int(D)
if a<c:
max=c
else:
max=a
if b>d:
min=d;
else:
min=b
if (min-max)>0:
print(min-max)
print('\n')
else:
print('0\n')
quit()
|
s104409136 | p03632 | u216289806 | 1502815736 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 226 | A=input()
B=input()
C=input()
D=input()
a=int(A)
b=int(B)
c=int(C)
d=int(D)
if a<c:
max=c
else:
max=a
if b>d:
min=d;
else:
min=b
if (min-max)>0:
print(min-max)
print('\n')
else:
print('0\n')
quit()
|
s281844971 | p03632 | u781091740 | 1502727287 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 63 | a,b,c,d=map(int,input().split());print(max(0,min(c,d)-max(a,b)) |
s070214136 | p03632 | u696449926 | 1502653039 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 161 | A, B, C, D = map(int,input().split())
if(B < C or D < A):
print(0)
else:
if(A > C):
E = A
else:
E = C
if(B > D):
F = D
else:
F = B
print(F - E)
|
s911159033 | p03632 | u870965055 | 1502600671 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 379 | #include <bits/stdc++.h>
#define rep(i,n) for(li i=0;i<(n);i++)
#define red(i,n) for(li i=(n)-1;i>=0;i--)
#define all(a) begin(a),end(a)
#define pb(a) push_back(a)
using namespace std;
using li = long long;
using vi = vector<li>;
using vs = vector<string>;
int main()
{
int a,b,c,d;
cin>>a>>b>>c>>d;
... |
s261956271 | p03632 | u294283114 | 1502593519 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 226 | import math
def lcm(x, y):
return ((x * y) // math.gcd(x, y))
n = int(input())
t = [i for i in range(n)]
for i in range(n):
t[i] = int(input())
ans = 1
for i in range(0, n):
ans = lcm(ans, t[i])
print(int(ans)) |
s578552035 | p03632 | u676264453 | 1502590364 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 163 | ls = list(map(int, input().split()))
A = ls[0]
B = ls[1]
C = ls[2]
D = ls[3]
k = [ i for i in range(0,101) if A <= i <= B and C <= i <= D]
print(max(k) - min(k))
|
s757195972 | p03632 | u676264453 | 1502590258 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 163 | ls = list(map(int, input().split()))
A = ls[0]
B = ls[1]
C = ls[2]
D = ls[3]
k = [ i for i in range(0,101) if A <= i <= B and C <= i <= D]
print(max(k) - min(k))
|
s119980940 | p03632 | u525117558 | 1502590062 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 53 | a=input()
b=input()
c=input()
d=input()
print(c-b-a) |
s029578650 | p03632 | u443170850 | 1502590021 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3316 | 427 | A, B, C, D = input().split()
A = int(A)
B = int(B)
C = int(C)
D = int(D)
def solve(A, B, C, D):
if A < C:
if B < C:
print("0")
elif A <= C and D <= B:
print(str(D-C))
else:
ptint(str(B-C))
else:
if D < A:
print("0")
elif C... |
s619670199 | p03632 | u443170850 | 1502589663 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 304 | A, B, C, D = input().split()
A = int(A)
B = int(B)
C = int(C)
D = int(D)
if A < C:
if B < C:
print(0)
elif A <= C and D <= B:
print(D-C)
else:
ptint(B-C)
else:
if D < A:
print(0)
elif C <= A and B <= D:
print(B-A)
else:
print(D-A)
|
s160247247 | p03632 | u443170850 | 1502589587 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 304 | A, B, C, D = input().split()
A = int(A)
B = int(B)
C = int(C)
D = int(D)
if A < C:
if B < C:
print(0)
elif A <= C and D <= B:
print(D-C)
else:
ptint(B-C)
else:
if D < A:
print(0)
elif C <= A and N <= D:
print(B-A)
else:
print(D-A)
|
s767884189 | p03632 | u520829741 | 1502589378 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 289 | def gcd(a,b):
if a==0:
return b
return gcd(b%a,a)
n=int(input())
arr=[]
for i in range(0,n):
x=int(input())
arr.append(x)
ans=int(0)
if n>1:
ans=arr[0]*arr[1]/gcd(arr[0],arr[1])
for i in range(2,n):
ans=ans*arr[i]/gcd(ans,arr[i])
print(int(ans))
|
s130108901 | p03632 | u868040597 | 1502589350 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 248 | # coding: utf-8
a, b, c, d = map(int, input().split())
alice_time = [x for x in range(a, b+1)]
bob_time = [x for x in range(c, d+1)]
pushed_time = set(alice_time) & set(bob_time)
if len(pushed_time) == 0:
print(0)
else:
print(pushed_time - 1) |
s459771131 | p03632 | u868040597 | 1502589319 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 246 | # coding: utf-8
a, b, c, d = map(int, input().split())
alice_time = [x for x in range(a, b+1)]
bob_time = [x for x in range(c, d+1)]
pushed_time = set(alice_time) & set(bob_time)
if len(pushed_time) == 0:
print(0)
else:
print(pushed_time - 1) |
s235161231 | p03632 | u796424048 | 1502588217 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 177 | A,B,C,D = list(map(int,input().split()))
if A < C:
a = C
else:
a = A
if B < D:
b = B
else:
b = D
if B =< C or D =< A:
res = 0
else:
res = (b-a)
print(res)
|
s913471815 | p03632 | u868040597 | 1502588135 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 253 | # coding: utf-8
a, b, c, d = map(int, input().split())
alice_time = range(a, b+1)
bob_time = range(c, d+1)
pushed_time = set(alice_time) & set(bob_time)
print(alice_time)
print(bob_time)
if not pushed_time:
print (pushed_time[0] - pushed_time[-1]) |
s118079466 | p03632 | u868040597 | 1502588095 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 252 | # coding: utf-8
a, b, c, d = map(int, input().split())
alice_time = range(a, b+1)
bob_time = range(c, d+1)
pushed_time = set(alice_time) & set(bob_time)
print(alice_time)
print(bob_time)
if not pushed_time:
print (pushed_time[0] - pushed_time[-1]) |
s309852493 | p03632 | u364618491 | 1502587832 | Python | Python (3.4.3) | py | Runtime Error | 16 | 2940 | 89 | a[]=list(map(int,input().split()))
n=min(a[1],a[3])-max(a[0],a[2])
print(n if n>0 else 0) |
s080968708 | p03632 | u868040597 | 1502586980 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 136 | # coding: utf-8
a, b, c, d = map(int, input().split())
if c <= b:
if c <= d:
print(b - c)
else:
print(d - c)
else:
print(0)
|
s881524070 | p03632 | u347629712 | 1502586950 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 223 | s = raw_input()
abcd = map(int, s.split())
if abcd[0] > abcd[2]:
begin = abcd[0]
else:
begin = abcd[2]
if abcd[1] > abcd[3]:
end = abcd[3]
else:
end = abcd[1]
if (end - begin) >= 0:
print(end - begin)
else:
print(0)
|
s022781499 | p03632 | u737840172 | 1502586716 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 296 | #include <iostream>
using namespace std;
int main() {
int a,b,c,d;
cin >> a >> b >> c >> d;
int ans = 0;
for(int i = 0; i <= 100; ++i)
if(i >= a and i <= b and i >= c and i <= d)
++ans;
if(ans > 0)
--ans;
cout << ans << endl;
return 0;
}
|
s344382379 | p03632 | u190952243 | 1502586625 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 122 | a,b,c,d = input().split(" ")
init = max(a,c)
term = min(b,d)
if term-init <= 0 and :
print "0"
else:
print (term-init) |
s749829522 | p03632 | u451017206 | 1502586562 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 76 | A,B,C,D = [int(i) for i in input().split()]
print(min(0,min(B,D) - max(A,C)) |
s287638816 | p03632 | u190952243 | 1502586501 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 106 | a,b,c,d = input()
init = max(a,c)
term = min(b,d)
if term-init <= 0:
print "0"
else:
print (term-init) |
s393551445 | p03632 | u190952243 | 1502586450 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 111 | a,b,c,d = input()
init = max(a,c)
term = min(b,d)
if term-init <= 0 and :
print "0"
else:
print (term-init) |
s184965161 | p03633 | u559250296 | 1601182765 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9468 | 312 | import math
from functools import reduce
n = int(input())
lis = []
for i in range(n):
lis.append(int(input()))
def lcm_base(x, y):
return (x * y) // math.gcd(x, y)
def lcm(*numbers):
return reduce(lcm_base, numbers, 1)
def lcm_list(numbers):
return reduce(lcm_base, numbers, 1)
print(lcm(lis))
|
s129586478 | p03633 | u559250296 | 1601182645 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9116 | 148 | n = int(input())
lis = []
for i in range(n):
lis.append(int(input()))
def lcm(*numbers):
return reduce(lcm_base, numbers, 1)
print(lcm(lis)) |
s529507410 | p03633 | u559250296 | 1601182568 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9164 | 90 | n = int(input())
lis = []
for i in range(n):
lis.append(int(input()))
print(lcm(lis)) |
s837431984 | p03633 | u306241759 | 1601163019 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9692 | 268 | 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())
T = [int(input()) for i in range(N)]
ans = 1
for i in range(len(T)):
ans = lcm(ans, T[i])
print(int(ans)) |
s572836935 | p03633 | u306241759 | 1601162895 | Python | PyPy3 (7.3.0) | py | Runtime Error | 103 | 72680 | 268 | 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
N = int(input())
T = [int(input()) for i in range(N)]
ans = 1
for i in range(len(T)):
ans = lcm(ans, T[i])
print(int(ans)) |
s934080431 | p03633 | u306241759 | 1601162608 | Python | PyPy3 (7.3.0) | py | Runtime Error | 122 | 72700 | 275 | 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
N = int(input())
T = [int(input()) for i in range(N)]
ans = T[0]
for i in range(1, len(T)):
ans = lcm(ans, T[i])
print(int(ans))
|
s759921366 | p03633 | u759109971 | 1601055439 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9156 | 193 | import math
N = int(input())
T = []
for i in range(N):
T.append(int(input()))
ans = T[0]
for i in range(1, N):
ans = int((ans * T[i]) / math.gcd(ans, T[i]))
print(ans)
|
s943389136 | p03633 | u759109971 | 1601055350 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9092 | 187 | import math
N = int(input())
T = []
ans = 1
for i in range(N):
T.append(int(input()))
for i in range(N):
ans = int((ans * T[i]) / math.gcd(ans, T[i]))
print(ans)
|
s530651469 | p03633 | u054473438 | 1600739329 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9160 | 141 | from math import gcd
N = int(input())
T = int(input())
for i in range(N-1):
t = int(input())
T = int(T / gcd(T, t) * t)
print(int(T)) |
s968154759 | p03633 | u054473438 | 1600739001 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9004 | 141 | from math import gcd
N = int(input())
T = int(input())
for i in range(N-1):
t = int(input())
T = int(T * t / gcd(T, t))
print(int(T)) |
s490941535 | p03633 | u759109971 | 1600717809 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9708 | 247 | def gcd(x,y):
if y == 0:
return x
else:
return gcd(y, x % y)
N = int(input())
T = []
ans = 1
for i in range(N):
T.append(int(input()))
for i in range(N):
ans = (ans * T[i]) / gcd(ans, T[i])
print(int(ans))
|
s996416461 | p03633 | u672316981 | 1600222681 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9104 | 348 | import math
def lcm(x, y):
return x * y / math.gcd(x, y)
def main():
n = int(input())
t_lst = [int(input()) for _ in range(n)]
t_lst.sort()
answer = t_lst[0]
for i in range(1, n):
t = t_lst[i]
answer = lcm(answer, t)
answer = int(answer)
print(answer)
if __name... |
s648975660 | p03633 | u407355496 | 1599427085 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9680 | 309 | def gcd(x, y):
if y == 0:
return x
return gcd(y, x % y)
def main():
n = int(input())
l = []
for i in range(n):
a = int(input())
l.append(a)
ans = 1
for i in range(len(l)):
ans = l[i] / gcd(l[i], ans) * ans
print(int(ans))
return 0
if __name__ == '__main__':
main() |
s809496859 | p03633 | u500376440 | 1599243795 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9176 | 175 | from math import *
def lcm(x,y):
return (x*y)//gcd(x,y)
N=int(input())
T=[int(input()) for _ in range(N)]
a=T[0]
for i in range(1,N):
ans=lcm(a,T[i])
a=ans
print(ans)
|
s677111346 | p03633 | u648315264 | 1599076634 | Python | Python (3.8.2) | py | Runtime Error | 34 | 9492 | 837 | import math
from math import gcd,pi,sqrt
INF = float("inf")
import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N... |
s258153447 | p03633 | u886459614 | 1598398893 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9160 | 152 | n= int(input())
a=int(input())
b=int(input())
import math
c=(a*b)//math.gcd(a,b)
for i in range(n-2):
b=int(input())
c=(c*b)//math.gcd(c,b)
print(c) |
s541724453 | p03633 | u739843002 | 1598295466 | Python | Python (3.8.2) | py | Runtime Error | 277 | 9324 | 2623 | def delete_head_zeros(n):
n = str(n)
l = len(n)
if "." in n:
l = n.find(".")
head_zeros = 0
for i in range(l - 1):
if n[i] == "0":
head_zeros += 1
else:
break
return n[head_zeros:]
# compare a, b
# a, b: int or string
def bigint_compare(a, b):
a = delete_head_zeros(a)
b = delete_head_zeros(b)
if ... |
s476359798 | p03633 | u070200692 | 1598230069 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8976 | 247 | import math
n = int(input())
a = []
for i in range(n):
a.append(int(input()))
if n == 1:
print(a[0])
else:
lcm = (a[0] * a[1]) // math.gcd(a[0], a[1])
for i in range(2, n):
lcm = (lcm * a[i]) // math.gcd(lcm, a[i])
print(lcm)
|
s073210787 | p03633 | u070200692 | 1598230022 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9132 | 248 | import math
n = int(input())
a = []
if n == 1:
print(a[0])
else:
for i in range(n):
a.append(int(input()))
lcm = (a[0] * a[1]) // math.gcd(a[0], a[1])
for i in range(2, n):
lcm = (lcm * a[i]) // math.gcd(lcm, a[i])
print(lcm)
|
s615860407 | p03633 | u070200692 | 1598229963 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9172 | 202 | import math
n = int(input())
a = []
for i in range(n):
a.append(int(input()))
lcm = (a[0] * a[1]) // math.gcd(a[0], a[1])
for i in range(2, n):
lcm = (lcm * a[i]) // math.gcd(lcm, a[i])
print(lcm)
|
s938973976 | p03633 | u250795848 | 1598215602 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9152 | 300 | import math
def lcm(a,b):
mul = a*b
gc = math.gcd(a,b)
lc = int(mul/gc)
return lc
n = int(input())
if n == 1:
print(int(input()))
exit()
t = [0]*n
for i in range(n):
t[i] = int(input())
a = t[0]
for j in range(n-1):
b = t[j+1]
lc = lcm(a,b)
a = lc
print(lc) |
s174866832 | p03633 | u250795848 | 1598214683 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9152 | 415 | import math
def lcm(x):
mul = x[0] * x[1]
gc = math.gcd(x[0],x[1])
lc =int( mul/gc)
if len(x) > 2:
for i in range(2,len(x)):
mul = lc * x[i]
gc = math.gcd(lc,x[i])
lc = int(mul/gc)
return int(lc)
n = int(input())
if n == 1:
print(int... |
s572626277 | p03633 | u250795848 | 1598214319 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9076 | 327 | import math
def lcm(x):
mul = x[0] * x[1]
gc = math.gcd(x[0],x[1])
lc =int( mul/gc)
for i in range(2,len(x)):
mul = lc * x[i]
gc = math.gcd(lc,x[i])
lc = int(mul/gc)
return int(lc)
n = int(input())
t = [0]*n
for j in range(n):
t[j] = int(input())
print(... |
s369647226 | p03633 | u250795848 | 1598213796 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9140 | 251 | import math
def lcm(x):
for i in range(len(x)-1):
mul = x[i] * x[i+1]
gc = math.gcd(x[i],x[i+1])
lc = mul / gc
return int(lc)
n = int(input())
t = [0]*n
for j in range(n):
t[j] = int(input())
print(lcm(t)) |
s865279675 | p03633 | u716660050 | 1597740083 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9164 | 194 | import math
def lcm(l):
r=l.pop(0)
for i in l:
r=r*i//math.gcd(r,i)
return r*i//math.gcd(r,i)
N=int(input())
T=[]
for i in range(N):
T.append(int(input()))
print(lcm(T)) |
s594931374 | p03633 | u112364985 | 1597274595 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9176 | 225 | import math
import sys
sys.setrecursionlimit(10**6)
def lcm(x,y):
return (x*y)//math.gcd(x,y)
n=int(input())
t=[int(input()) for i in range(n)]
LCM=lcm(t[0],t[1])
for i in range(2,n):
LCM=lcm(LCM,t[i])
print(LCM) |
s362237947 | p03633 | u112364985 | 1597274509 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9028 | 184 | import math
def lcm(x,y):
return (x*y)//math.gcd(x,y)
n=int(input())
t=[int(input()) for i in range(n)]
LCM=lcm(t[0],t[1])
for i in range(2,n):
LCM=lcm(LCM,t[i])
print(LCM) |
s301350627 | p03633 | u453055089 | 1597023386 | Python | PyPy3 (7.3.0) | py | Runtime Error | 98 | 68576 | 150 | import math
n = int(input())
t1 = int(input())
for _ in range(n-1):
t2 = int(input())
ans = t1*t2 // math.gcd(t1, t2)
t1 = ans
print(ans)
|
s587733684 | p03633 | u453055089 | 1597023262 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9156 | 150 | import math
n = int(input())
t1 = int(input())
for _ in range(n-1):
t2 = int(input())
ans = t1*t2 // math.gcd(t1, t2)
t1 = ans
print(ans)
|
s097075511 | p03633 | u453055089 | 1597023156 | Python | PyPy3 (7.3.0) | py | Runtime Error | 202 | 68316 | 137 | import math
n = int(input())
t1 = int(input())
for _ in range(n-1):
t2 = int(input())
ans = t1*t2 // math.gcd(t1, t2)
print(ans)
|
s054025264 | p03633 | u401686269 | 1596982932 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9128 | 261 | def gcd(a,b):
if b == 0:return a
return gcd(b,a%b)
N=int(input())
T=[]
for i in range(N):
t = int(input())
T.append(t)
if i == 0:continue
elif i == 1:
lcm = T[-2]*T[-1]//gcd(T[-2],T[-1])
else:
lcm = lcm * T[-1]//gcd(lcm,T[-1])
print(lcm) |
s944260326 | p03633 | u401686269 | 1596982867 | Python | Python (3.8.2) | py | Runtime Error | 30 | 8876 | 261 | def gcd(a,b):
if b == 0:return 1
return gcd(b,a%b)
N=int(input())
T=[]
for i in range(N):
t = int(input())
T.append(t)
if i == 0:continue
elif i == 1:
lcm = T[-2]*T[-1]//gcd(T[-2],T[-1])
else:
lcm = lcm * T[-1]//gcd(lcm,T[-1])
print(lcm) |
s838701959 | p03633 | u456416458 | 1596510762 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9044 | 311 | s = input()
n = int(s)
# 最大公約数を求める関数gcd
def gcd(a, b):
if b == 0:
return a
return int(gcd(b, a % b))
def lcm(a, b):
g = gcd(a, b)
return int(a / g * b)
answer = 1
for i in range(n):
v = input()
w = int(v)
answer = int(lcm(answer,w))
print(answer)
|
s102866973 | p03633 | u456416458 | 1596510633 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9036 | 301 | s = input()
n = int(s)
# 最大公約数を求める関数gcd
def gcd(a, b):
if b == 0:
return a
return gcd(b, a % b)
def lcm(a, b):
g = gcd(a, b)
return a / g * b
answer = 1
for i in range(n):
v = input()
w = int(v)
answer = int(lcm(answer,w))
print(answer)
|
s160261729 | p03633 | u456416458 | 1596509798 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9196 | 350 | s = input()
n = int(s)
arrays = []
for i in range(n):
v = input()
w = int(v)
arrays.append(w)
# 最大公約数を求める関数gcd
def gcd(a, b):
if b == 0:
return a
return gcd(b, a % b)
q = arrays[0]
for i in range(len(arrays) - 1):
p = gcd(q, arrays[i + 1])
q = int((q * arrays[i + 1]) / p)
print(q... |
s515576222 | p03633 | u516554284 | 1596345367 | Python | PyPy3 (7.3.0) | py | Runtime Error | 84 | 74644 | 154 | import math
n=int(input())
ans=int(input())
if n>1:
for x in range(n-1):
s=int(input())
ans=int(ans*s/(math.gcd(ans,s)))
print(ans) |
s301108679 | p03633 | u492910842 | 1596344503 | Python | PyPy3 (7.3.0) | py | Runtime Error | 86 | 68560 | 191 | from functools import reduce
from math import gcd
n=int(input())
t=[int(input()) for i in range(n)]
lcm=t[0]*t[1]//gcd(t[0],t[1])
for i in range(2,n):
lcm=lcm*t[i]//gcd(lcm,t[i])
print(lcm) |
s524248864 | p03633 | u492910842 | 1596344432 | Python | PyPy3 (7.3.0) | py | Runtime Error | 95 | 74312 | 194 | from functools import reduce
from math import gcd
n=int(input())
t=[int(input()) for i in range(n)]
x=reduce(gcd,t)
lcm=t[0]*t[1]//x
for i in range(2,n):
lcm=lcm*t[i]//gcd(lcm,t[i])
print(lcm) |
s580046066 | p03633 | u758815106 | 1596182647 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9152 | 603 | #import
#import math
#import numpy as np
N = int(input())
#= input()
#= map(int, input().split())
#= list(map(int, input().split()))
#= [input(), input()]
#= [list(map(int, input().split())) for _ in range(N)]
#= {i:[] for i in range(N)}
T = [int(input()) for _ in range(N)]
def gcd(x, y):
if x < y:
t = x
... |
s364137330 | p03633 | u758815106 | 1596182544 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9212 | 553 | #import
#import math
#import numpy as np
N = int(input())
#= input()
#= map(int, input().split())
#= list(map(int, input().split()))
#= [input(), input()]
#= [list(map(int, input().split())) for _ in range(N)]
#= {i:[] for i in range(N)}
T = [int(input()) for _ in range(N)]
def gcd(x, y):
if x < y:
t = x
... |
s464385178 | p03633 | u065099501 | 1595119324 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9216 | 770 |
def gcd(x,y):
if x%y == 0:
return y
else:
return gcd(y,x%y)
def lcm(x,y):
return x*y//gcd(x,y)
def f(tmp):
tmp.sort(reverse=True)
result=[]
for i in tmp[1:]:
if tmp[0]%i == 0:
tmp.remove(i)
for i in range(1,len(tmp)):
result.append(lcm(tmp[0],tm... |
s680000033 | p03633 | u017603316 | 1594845744 | Python | PyPy3 (7.3.0) | py | Runtime Error | 87 | 74144 | 284 |
N = int(input())
T = []
for i in range(N):
T.append(int(input()))
if N==1:
f2 = T[0]
elif N==2:
import math
a,b = T[0], T[1]
f=math.gcd(a,b)
f2=a*b//f
else:
for i in range(2,N):
a,b=f2, T[i]
f=math.gcd(a,b)
f2=a*b//f
print(f2)
|
s158840734 | p03633 | u017603316 | 1594845620 | Python | PyPy3 (7.3.0) | py | Runtime Error | 153 | 77104 | 250 |
N = int(input())
T = []
for i in range(N):
T.append(int(input()))
import fractions
a,b = T[0], T[1]
f=fractions.gcd(a,b)
f2=a*b//f
if N>=3:
for i in range(2,N):
a,b=f2, T[i]
f=fractions.gcd(a,b)
f2=a*b//f
print(f2) |
s718569960 | p03633 | u017603316 | 1594845538 | Python | PyPy3 (7.3.0) | py | Runtime Error | 130 | 77536 | 226 |
N = int(input())
T = []
for i in range(N):
T.append(int(input()))
import fractions
a,b = T[0], T[1]
f=fractions.gcd(a,b)
f2=a*b//f
for i in range(2,N):
a,b=f2, T[i]
f=fractions.gcd(a,b)
f2=a*b//f
print(f2)
|
s012612576 | p03633 | u917013605 | 1594664076 | Python | PyPy3 (7.3.0) | py | Runtime Error | 79 | 74152 | 233 | import math
def lcm(x, y):
return (x * y) // math.gcd(x, y)
N = int(input())
t_li = []
for _ in range(N):
t_li.append(int(input()))
ans = lcm(t_li[0], t_li[1])
for i in range(2, N):
ans = lcm(ans, t_li[i])
print(ans)
|
s214632844 | p03633 | u137228327 | 1594302625 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9136 | 323 | import math
N = int(input())
T = []
def lcm(x, y):
gc = math.gcd(x, y)
ans = (x * y)//gc
return ans
for i in range(N):
T.append(int(input()))
if len(T) > 2:
g = lcm(T[0],T[1])
for i in range(3,N-1):
g = lcm(g,T[i+1])
print(g)
elif len(T) == 2:
print(g)
else:
print(T[... |
s319825693 | p03633 | u137228327 | 1594302534 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9188 | 284 | import math
N = int(input())
T = []
def lcm(x, y):
gc = math.gcd(x, y)
ans = (x * y)//gc
return ans
for i in range(N):
T.append(int(input()))
g = lcm(T[0],T[1])
if len(T) > 2:
for i in range(3,N-1):
g = lcm(g,T[i+1])
print(g)
else:
print(g) |
s982860866 | p03633 | u137228327 | 1594302466 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9104 | 264 | import math
N = int(input())
T = []
for i in range(N):
T.append(int(input()))
def lcm(x, y):
ans = (x * y)//math.gcd(x, y)
return ans
g = lcm(T[0],T[1])
if len(T) > 2:
for i in range(3,N-1):
g = lcm(g,T[i+1])
print(g)
else:
print(g) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.