Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
L,R=map(int,input().split())
X=2019
for i in range (R-L):
    for j in range(R-L-i):
        if (L+i)*(L+i+j+1)%2019==0:
            X=0
            break
        elif X >(L+i)*(L+i+j+1)%2019:
            X=(L+i)*(L+i+j+1)%2019
    if X=0:
        break        
print(X)


Fixed submission:
L,R=map(int,input().split())
X=2019
for i in range (R-L):
    for j in range(R-L-i):
        if (L+i)*(L+i+j+1)%2019==0:
            X=0
            break
        elif X >(L+i)*(L+i+j+1)%2019:
            X=(L+i)*(L+i+j+1)%2019
    if X==0:
        break        
print(X)

Buggy python submission (verdict: Time Limit Exceeded):
L,R=map(int,input().split())
X=2019
for i in range (R-L):
    for j in range(R-L-i):
        if (L+i)*(L+i+j+1)%2019==0:
            X=0
            break
        elif X >(L+i)*(L+i+j+1)%2019:
            X=(L+i)*(L+i+j+1)%2019
print(X)


Fixed submission:
L,R=map(int,input().split())
X=2019
for i in range (R-L):
    for j in range(R-L-i):
        if (L+i)*(L+i+j+1)%2019==0:
            X=0
            break
        elif X >(L+i)*(L+i+j+1)%2019:
            X=(L+i)*(L+i+j+1)%2019
    if X==0:
        break        
print(X)

Buggy python submission (verdict: Time Limit Exceeded):
L,R=map(int,input().split())
X=2019
for i in range (R-L):
    for j in range(R-L-i):
        if X >(L+i)*(L+i+j+1)%2019:
            X=(L+i)*(L+i+j+1)%2019
        elif (L+i)*(L+i+j+1)%2019==0:
            X=0
            break
print(X)


Fixed submission:
L,R=map(int,input().split())
X=2019
for i in range (R-L):
    for j in range(R-L-i):
        if (L+i)*(L+i+j+1)%2019==0:
            X=0
            break
        elif X >(L+i)*(L+i+j+1)%2019:
            X=(L+i)*(L+i+j+1)%2019
    if X==0:
        break        
print(X)
Buggy python submission (verdict: Runtime Error):
import fractions
A,B,C,D=map(int,input().split())
X=0
L=0
M=0
N=0
E=C*D//fractions.gcd(C,D)
if B-A>=C:
    if A%C==0 or B%C==0:
        L=(B-A)//C+1
    else:
        L=(B-A)//C
else:
    if A%C==0 or B%C==0:
        L=!
    elif A%C>B%C:
        L=1
    else:
        L=0
if B-A>=D:        
    if A%D==0 or B%D==0:
        M=(B-A)//D+1
    else:
        M=(B-A)//D
else:
    if A%D==0 or B%D==0:
        M=1
    elif A%D>B%D:
        M=1
    else:
        M=0       
if B-A>=E:
    if A%E==0 or B%E==0:
        N=(B-A)//E+1
    else:
        N=(B-A)//E
else:
    if A%E==0 or B%E==0:
        N=!
    elif A%E>B%E :
        N=1
    else :
        N=0
X=B-A+1-L-M+N
print(X)


Fixed submission:
import fractions
A,B,C,D=map(int,input().split())
E=C*D//fractions.gcd(C,D)
X=0
Y=0
X=A-1-(A-1)//C-(A-1)//D+(A-1)//E
Y=B-B//C-B//D+B//E
print(Y-X)

Buggy python submission (verdict: Runtime Error):
import fractions
A,B,C,D=map(int,input().split())
X=0
L=0
M=0
N=0
E=C*D//fractions.gcd(C,D)
if B-A>=C:
    if A%C==0 or B%C==0:
        L=(B-A)//C+1
    else:
        L=(B-A)//C
else:
    if A%C>=B%C:
        L=1
    else:
        L=0
if B-A>=D:        
    if A%D==0 or B%D==0:
        M=(B-A)//D+1
    else:
        M=(B-A)//D
else:
    if A%D>=B%D
        M=1
    else:
        M=0       
if B-A>=E:
    if A%E==0 or B%E==0:
        N=(B-A)//E+1
    else:
        N=(B-A)//E
else:
    if A%E>=B%E :
        N=1
    else :
        N=0
X=B-A+1-L-M+N
print(X)


Fixed submission:
import fractions
A,B,C,D=map(int,input().split())
E=C*D//fractions.gcd(C,D)
X=0
Y=0
X=A-1-(A-1)//C-(A-1)//D+(A-1)//E
Y=B-B//C-B//D+B//E
print(Y-X)

Buggy python submission (verdict: Runtime Error):
import sympy
A,B,C,D=map(int,input().split())
X=0
L=0
M=0
N=0
E=C*D/sympy.gcd(C,D)
if A%C==0 or B%C==0:
    L=(B-A)//C+1
else:
    L=(B-A)//C

if A%D==0 or B%D==0:
    M=(B-A)//D+1
else:
    M=(B-A)//D
if B-A>=E:
    if A%E==0 or B%E==0:
        N=(B-A)//E+1
    else:
        N=(B-A)//E
else:
    if A%E==0 or B%E==0:
        N=(B-A)//E+2
    else:
        N=(B-A)//E+1
X=B-A+1-L-M+N
print(int(X))

Fixed submission:
import fractions
A,B,C,D=map(int,input().split())
E=C*D//fractions.gcd(C,D)
X=0
Y=0
X=A-1-(A-1)//C-(A-1)//D+(A-1)//E
Y=B-B//C-B//D+B//E
print(Y-X)

Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,D=map(int,input().split())
X=0
Y=A-1
for i in range(B-A+1):
    Y=Y+1
    
    if Y%C==0 or Y%D==0:
        continue
    else:
        X=X+1
print(X)


Fixed submission:
import fractions
A,B,C,D=map(int,input().split())
E=C*D//fractions.gcd(C,D)
X=0
Y=0
X=A-1-(A-1)//C-(A-1)//D+(A-1)//E
Y=B-B//C-B//D+B//E
print(Y-X)
Buggy python submission (verdict: Runtime Error):
X,A=map(int,input().split())
if X < A:
    Print("0")

else:
    print("10")    
    

Fixed submission:
X,A=map(int,input().split())
Y=0
if X<A:
    Y=0
else:
    Y=10

print(Y)
Buggy python submission (verdict: Runtime Error):
W,H,x,y=map(int,input().split())
S=W*H/2
z=0
if x== W/2 & y== H/2:
    z=1
else:
    z=0
print(S,z)         


Fixed submission:
W,H,x,y=map(int,input().split())
S=W*H/float(2)
z=0
if x== W/2:
    if y== H/2:
        z=1
    else:
        z=0
else:
    z=0
print(S,z)

Buggy python submission (verdict: Runtime Error):
W,H,x,y=map(int,input().split())
S=W*H*0.1/2
z=0
if x== W/2 & y== H/2:
    z=1
else:
    z=0
print(S,z)         


Fixed submission:
W,H,x,y=map(int,input().split())
S=W*H/float(2)
z=0
if x== W/2:
    if y== H/2:
        z=1
    else:
        z=0
else:
    z=0
print(S,z)
Buggy python submission (verdict: Runtime Error):
S=input()
A=S.replace(01"")
B=A.replace(10"")
print(len(S)-len(B))


Fixed submission:
S=list(input())
a=S.count("1")
b=S.count("0")
if a>=b:
    print(b*2)
else :
    print(a*2)
Buggy python submission (verdict: Runtime Error):
y,m,d=map(int,input().split("/"))
if y<=2018 :
    print(Heisei)
elif y==2019 :
    if m<=4 :
        print(Heisei)
    else:
        print(TBD)
else :
    print(TBD)


Fixed submission:
y,m,d=map(int,input().split("/"))
if y<=2018 :
    print("Heisei")
elif y==2019 :
    if m<=4 :
        print("Heisei")
    else:
        print("TBD")
else :
    print("TBD")

Buggy python submission (verdict: Runtime Error):
y,m,d=map(int,input().split(/))
if y<=2018 :
    print(Heisei)
else:
    if m<=4 :
        print(Heisei)
    else:
        print(TBD)        


Fixed submission:
y,m,d=map(int,input().split("/"))
if y<=2018 :
    print("Heisei")
elif y==2019 :
    if m<=4 :
        print("Heisei")
    else:
        print("TBD")
else :
    print("TBD")
Buggy python submission (verdict: Runtime Error):
D,N=map(int,input().split())
if N=100 :
    print((N+1)*100**D)
else :
    print(N*100**D)

Fixed submission:
D,N=map(int,input().split())
if N<100 :
    print(N*100**D)
else :
    print((N+1)*100**D)

Buggy python submission (verdict: Runtime Error):
D,N=map(int,input().split())
if N=100 :
    print((N+1)*100*D)
else :    
    print(N*100**D)


Fixed submission:
D,N=map(int,input().split())
if N<100 :
    print(N*100**D)
else :
    print((N+1)*100**D)
Buggy python submission (verdict: Time Limit Exceeded):
k,s = [int(i) for i in input().split()]
r=0

for i in range(0,k+1):
    for j in range(0,k+1):
        for l in range(0,k+1):
            if s-(i+j)==l:
                r+=1

print(r)


Fixed submission:
k,s = [int(i) for i in input().split()]
r=0

for i in range(0,k+1):
    for j in range(0,k+1):
        if 0<=s-(i+j)<=k:
            r+=1

print(r)
Buggy python submission (verdict: Runtime Error):
N, M, Q = map(int, input().split())
B = [tuple(int(i) for i in input().split()) for i in range(Q)]

A = [1]*N
def recur(A=A, index=0, lim=M):
    if index>len(A)-2:
        return
    while A[index] <= lim-1:
        A[index] += 1
        yield A[::-1]
        yield from recur(A[:], index+1, A[index])
    return

def get_point(A):
    return sum((A[b[1]-1]-A[b[0]-1]==b[2])*b[3] for b in B)

print(max(get_point(A), *(get_point(i) for i in recur())))


Fixed submission:
N, M, Q = map(int, input().split())
B = [tuple(int(i) for i in input().split()) for i in range(Q)]

A = [1]*N
def recur(A=A, index=0, lim=M):
    if index>len(A)-2:
        return
    while A[index] <= lim-1:
        A[index] += 1
        yield A[::-1]
        yield from recur(A[:], index+1, A[index])
    return

def get_point(A):
    return sum((A[b[1]-1]-A[b[0]-1]==b[2])*b[3] for b in B)

print(max(0, get_point(A), *(get_point(i) for i in recur())))
Buggy python submission (verdict: Runtime Error):
import math
A, B, C, D = map(int, input().split())
print(int(B - A + 1 - (B//C - (A-1)//C + B//D - (A-1)//D - B//(C*D/math.gcd(C, D)) + (A-1)//(C*D/math.gcd(C, D)))))

Fixed submission:
from fractions import gcd
from decimal import Decimal
A, B, C, D = map(Decimal, input().split())
_A = A-1
print(int(B - _A - (B//C - _A//C + B//D - _A//D - B//(C*D/gcd(C, D)) + _A//int(C*D/gcd(C, D)))))
Buggy python submission (verdict: Runtime Error):
n=int((input())
def f(n):
    a=0
    b=100
    while True:
        a+=1
        b*=(100+a)/100
        b=int(b)
        if b>=n:
            break
    return a
print(f(n))

Fixed submission:
n=int(input())
a,b=map(int,input().split())
l=[abb for abb in range(a, b+1)]
kl=[]
for am in l:
    if am%n==0:
        kl.append(am)
if len(kl)>0:
    print("OK")
else:
    print("NG")

Buggy python submission (verdict: Runtime Error):
def f(n):
    a=0
    b=100
    while True:
        a+=1
        b*=(100+a)/100
        b=int(b)
        if b>=n:
            break
    return a
  
print(f(n))

Fixed submission:
n=int(input())
a,b=map(int,input().split())
l=[abb for abb in range(a, b+1)]
kl=[]
for am in l:
    if am%n==0:
        kl.append(am)
if len(kl)>0:
    print("OK")
else:
    print("NG")

Buggy python submission (verdict: Runtime Error):
n=int(input())
a,b=map(int,input().split())
if a==b and if a%n==0:
    print("OK")
else:
     print("NG")
if (b-a+1)/n>=1:
  print("OK")
else:
    print("NG")

Fixed submission:
n=int(input())
a,b=map(int,input().split())
l=[abb for abb in range(a, b+1)]
kl=[]
for am in l:
    if am%n==0:
        kl.append(am)
if len(kl)>0:
    print("OK")
else:
    print("NG")
Buggy python submission (verdict: Runtime Error):
n,b=input().split()
n,b=int(n),int(b)
def b(n,b):
    return "safe" if n>b else "No"
print(b(n,b))

Fixed submission:
n,m=map(int,input().split())
def func(n,m):
    return "unsafe" if n<=m else "safe"
print(func(n,m))

Buggy python submission (verdict: Runtime Error):
n,b=input().split()
def b(n,b):
    return "safe" if n>b else "No"
print(b(n,b))

Fixed submission:
n,m=map(int,input().split())
def func(n,m):
    return "unsafe" if n<=m else "safe"
print(func(n,m))
Buggy python submission (verdict: Runtime Error):
,c,d,=map(int,input().split())
def func(a,b,c,d):
    while a>=0 and c>=0:
        c-=b
        a-=d
    return "Yes" if a>=c else "No"
print(func(a,b,c,d))

Fixed submission:
a,b,c,d,=map(int,input().split())
def func(a,b,c,d):
    while a>0 and c>0:
        c-=b
        if c<=0:
            return "Yes"
        a-=d
        if a<=0:
            return "No" 
print(func(a,b,c,d))
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=list(map(str,a.split()))
def func(b):
    return len(set(b))
print(func(b))

Fixed submission:
a=int(input())
b=[input() for i in range(a)]
def func(b):
    return len(set(b))
print(func(b))

Buggy python submission (verdict: Runtime Error):
a=map(int,input().split())
b=list(map(int,input().split()))
def func(a,b):
    ab=set(b)
    return len(ab)


Fixed submission:
a=int(input())
b=[input() for i in range(a)]
def func(b):
    return len(set(b))
print(func(b))
Buggy python submission (verdict: Runtime Error):
import math 
n=input()
def d(n):
    return math.pi*2*n
  
print(d(n))

Fixed submission:
import math
n=int(input())
def func(n):
    return math.pi*n*2
print(func(n))

Buggy python submission (verdict: Runtime Error):

import math 
n=input()
def d (n):
    return math.pi*2*n
  
print(d(n))

Fixed submission:
import math
n=int(input())
def func(n):
    return math.pi*n*2
print(func(n))

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[b for b in int(input())]
def func(n,a):
    if n< sum(a):return -1
    else: 
        return n-sum(a)

Fixed submission:
import math
n=int(input())
def func(n):
    return math.pi*n*2
print(func(n))

Buggy python submission (verdict: Runtime Error):
import math
n=int(input())
def func(n)
    return math.pi*n*2
print(func(n))

Fixed submission:
import math
n=int(input())
def func(n):
    return math.pi*n*2
print(func(n))

Buggy python submission (verdict: Runtime Error):
import math
n=int(input())
def func(n)
    return math.pi*n*2
print(n)
   

Fixed submission:
import math
n=int(input())
def func(n):
    return math.pi*n*2
print(func(n))

Buggy python submission (verdict: Runtime Error):
import math
def func(x):
    return math.pi*2*x
x=R  
print(func(x))

Fixed submission:
import math
n=int(input())
def func(n):
    return math.pi*n*2
print(func(n))

Buggy python submission (verdict: Runtime Error):
import math
def func(x):
    return math.pi*2*x
  
x=R
print(func(x))

Fixed submission:
import math
n=int(input())
def func(n):
    return math.pi*n*2
print(func(n))

Buggy python submission (verdict: Runtime Error):
import math
def func(x):
    return math.pi*2*x
  
x=R

Fixed submission:
import math
n=int(input())
def func(n):
    return math.pi*n*2
print(func(n))

Buggy python submission (verdict: Runtime Error):
import math
def circle(x):
    return pi**(2*x)
  
 x=R

Fixed submission:
import math
n=int(input())
def func(n):
    return math.pi*n*2
print(func(n))
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[b for b in int(input().split())]
def func(n,a):
    if n< sum(a):return "-1"
    else: 
        return n-sum(a)
print(func(n,a))

Fixed submission:
n,m=map(int,input().split())
a=[int(b) for b in input().split()]
def func(n,a):
    if n< sum(a):return "-1"
    else: 
        return n-sum(a)
print(func(n,a))

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[int(b) for b in input()]
def func(n,a):
    if n< sum(a):return "-1"
    else: 
        return n-sum(a)
print(func(n,a))

Fixed submission:
n,m=map(int,input().split())
a=[int(b) for b in input().split()]
def func(n,a):
    if n< sum(a):return "-1"
    else: 
        return n-sum(a)
print(func(n,a))
Buggy python submission (verdict: Runtime Error):
N=input()
def d(N):
    return "Yes" if "7" in N else "No"
print(d(n))

Fixed submission:
N=input()
def d(N):
    return "Yes" if "7" in N else "No"
print(d(N))

Buggy python submission (verdict: Runtime Error):
n=input().split())
def d(n):
    return "Yes" if "7" in n else "No"
print(d(n))

Fixed submission:
N=input()
def d(N):
    return "Yes" if "7" in N else "No"
print(d(N))

Buggy python submission (verdict: Runtime Error):
n=int(input())
def d(n):
    return "Yes" if 7 in n else "No"
print(d(n))

Fixed submission:
N=input()
def d(N):
    return "Yes" if "7" in N else "No"
print(d(N))

Buggy python submission (verdict: Runtime Error):
n=int(input())
def d(n):
    return "Yes" if 7 in n else ""No"
print(d(n))

Fixed submission:
N=input()
def d(N):
    return "Yes" if "7" in N else "No"
print(d(N))

Buggy python submission (verdict: Runtime Error):
def function (N):
    return 'Yes' if 7 in N else 'No'
a= function(N)
print(a)

Fixed submission:
N=input()
def d(N):
    return "Yes" if "7" in N else "No"
print(d(N))

Buggy python submission (verdict: Runtime Error):
def a(N):
    return 'Yes' if 7 in N else 'No'
nun=a(N)
print num

Fixed submission:
N=input()
def d(N):
    return "Yes" if "7" in N else "No"
print(d(N))
Buggy python submission (verdict: Runtime Error):
n=int(input())
an=[a for a in range(1,n+1)]
o=[]
def ass(an):
    for c in an
        if c%3==0 or c%5==0:
             continue
        else:
            o.append(c)
    return sum(o)
print(ass(an))

Fixed submission:
n=int(input())
an=[a for a in range(1,n+1)]
o=[]
def ass(an):
    for c in an:
        if c%3==0 or c%5==0:
             continue
        else:
            o.append(c)
    return sum(o)
print(ass(an))
Buggy python submission (verdict: Runtime Error):
A, B = int(input())
if 1<=A & A<=9 | 1<=B & B<=9:
    if 1<=A*B & A*B<=81:
        print (A*B)
    else:
        print (-1)



Fixed submission:
A, B = map(int, input().split())
if 1 <= A <= 9 and 1 <= B <= 9:
    print(A*B)
else:
     print (-1)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
count =0
t = True
for i in range(1, 10):
    if  N % i == 0:
        A = N/i
        if 1 <= A <= 9:
            while(t): 
                for a in range(1, 10):
                    if a != i :
                        if A % a == 0:
                            print('Yes')
                            count += 1
                            t = False
                            break
                    break
if  count != 1:
    print('No')

Fixed submission:
a = int(input())
for i in range(1, 10):
    for j in range(1, 10):
        if i*j == a:
            print("Yes")
            exit()
print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
count =0
t = True
for i in range(1, 10):
    if  N % i == 0:
        A = N/i
        if 1 <= A <= 9:
            while(t): 
                for a in range(1, 10):
                    if a != i :
                        if A % a == 0:
                            print('Yes')
                            count += 1
                            t = False
                            break
if  count != 1:
    print('No')

Fixed submission:
a = int(input())
for i in range(1, 10):
    for j in range(1, 10):
        if i*j == a:
            print("Yes")
            exit()
print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
count =0
t = True
for i in range(1, 10):
    if  N % i == 0:
        A = N/i
        if 1 <= A <= 9:
            while(t): 
                for a in range(1, 10):
                    if a != i :
                        if A % a == 0:
                            print('Yes')
                            count += 1
                            t = False
                            break
if  count != 1:
    print('No')

Fixed submission:
a = int(input())
for i in range(1, 10):
    for j in range(1, 10):
        if i*j == a:
            print("Yes")
            exit()
print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
for i in range(N-1):
    if S[i] == S[i+1]:
        i += 1
        N -= 1
print(N)

Fixed submission:
A, B = map(int, input().split())
if A - 2*B >= 0:
    print(A - 2*B)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
lis = list(map(int, input().split()))
count = 0
for i in range(N):
    if lis[i] >= K:
        count += 1
print(count) 

Fixed submission:
N = int(input())
count = 0
for i in range(1, N + 1):
    if i % 2 == 1:
        count = count + 1
print(count/N)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
lis = list(map(int, input().split()), N)
count = 0
for i in range(N):
    if lis[i] >= K:
        count += 1
print(count) 

Fixed submission:
N, K = map(int, input().split())
lis = list(map(int, input().split()))
count = 0
for i in range(N):
    if lis[i] >= K:
        count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
lis = list(map(int, input().split()))
count = 0
for i in range(1, N + 1):
    if lis[i] >= K:
        count += 1
print(count) 

Fixed submission:
N, K = map(int, input().split())
lis = list(map(int, input().split()))
count = 0
for i in range(N):
    if lis[i] >= K:
        count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
lis = list(map(int, input().split()))
count = 0
for i in range(1, N + 1):
    if lis[i] >= K:
        count += 1
print(count) 

Fixed submission:
N, K = map(int, input().split())
lis = list(map(int, input().split()))
count = 0
for i in range(N):
    if lis[i] >= K:
        count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n, k, q = map(int, input().split())
 
ai = [int(input()) for _ in range(q)]

bi = [int(k) for _ in range(n)]

for i in range(q):
    for s in range(n):
        if ai[i]-1 != s:
            bi[s] -= 1
        
for i in range(n):
    if bi[i] > 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
n, k, q = map(int, input().split())

a = [int(input()) for _ in range(q)]

b = [int(0) for _ in range(n)]

for i in a:
    b[i-1] += 1
for i in range(n):
    if b[i] > q-k:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input)
print(N*N*N)


Fixed submission:
N = int(input())
print(N*N*N)
Buggy python submission (verdict: Runtime Error):
S = input().split()
T = input().split()
count = 0
for i in range(3):
    if S[i] == T[i]:
        ++count
print(count)

Fixed submission:
S = input()
T = input()
count = 0
for i in range(3):
    if S[i] == T[i]:
        count = count + 1
print(count)

Buggy python submission (verdict: Runtime Error):
S = input().split
T = input().split
count = 0
for i in range(3):
    if S[i] == T[i]:
        ++count
print(count)

Fixed submission:
S = input()
T = input()
count = 0
for i in range(3):
    if S[i] == T[i]:
        count = count + 1
print(count)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
print(max[A + B, A - B, A * B])

Fixed submission:
A, B = map(int, input().split())
print(max([A + B, A - B, A * B]))
Buggy python submission (verdict: Runtime Error):
N, D = map(int, input().split())
t = []
count = 0
sum = 0
for i in range(N):
    t.append(list(map(int, input().split())))
for i in range(0, N-1):
    for j in range(i + 1, N):
      for d in range(D):
        sum += pow(t[i][d] - t[j][d], 2)
        sqrt = math.sqrt(sum)
      print(sum)
      print(sqrt)
      if sqrt == int(sqrt):
        count += 1
      sum = 0
      sqrt = 0
print(count)

Fixed submission:
import math
N, D = map(int, input().split())
t = []
for i in range(N):
    t.append(list(map(int, input().split())))
count = 0
sum = 0
for i in range(0, N-1):
    for j in range(i + 1, N):
      for d in range(D):
        sum += pow(t[i][d] - t[j][d], 2)
        sqrt = math.sqrt(sum)
      if sqrt == int(sqrt):
        count += 1
      sum = 0
      sqrt = 0
print(count)
Buggy python submission (verdict: Runtime Error):
N=int(input())
lsr=[]
for i in range(1,9):
    for j in range(1,9):
        lst.append(i*j)

print("Yes" if N in lst else "No")
        

Fixed submission:
N=int(input())
lst=[]
for i in range(1,10):
    for j in range(1,10):
        lst.append(i*j)

if N in lst:
    print("Yes")
else:
    print("No")