Problem p03632 (python)

Fixed submission:


a,b,c,d=[int(i) for i in input().strip().split(' ')]

'''
入力は他の人のを見た
'''

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)

Buggy submission (verdict: Runtime Error):
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))

Buggy submission (verdict: Runtime Error):
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))

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):


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)

Buggy submission (verdict: Runtime Error):
A=input()
B=input()
C=input()
D=input()
a=int(A)
b=int(B)
c=int(C)
d=int(D)

print(0)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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()

Buggy submission (verdict: Runtime Error):
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')

Buggy submission (verdict: Runtime Error):
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()

Buggy submission (verdict: Runtime Error):
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()

Buggy submission (verdict: Runtime Error):
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()

Buggy submission (verdict: Runtime Error):
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()