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

Fixed submission:
n=int(input())
hoge=[]
for i in range(n):
  x,y,z=map(int,input().split())
  if(z!=0):
    hoge.append([x,y,z])
  

if(len(hoge)==1):
  print(*hoge[0])
  exit()

for i in range(101):
  for j in range(101):
    h=[]
    for k in range(len(hoge)):
      h.append(hoge[k][2]+abs(hoge[k][0]-i)+abs(hoge[k][1]-j))
      
    if(h.count(h[0])==len(h)):
      print(i,j,h[0])

Buggy submission (verdict: Runtime Error):
n=int(input())
hoge=[]
for i in range(n):
  x,y,z=map(int,input().split())
  if(z!=0):
    hoge.append([x,y,z])
  

if(len(hoge)==1):
  print(*hoge[0])
  exit()

for i in range(101):
  for j in range(101):
    h=[]
    for k in range(n):
      h.append(hoge[k][2]+abs(hoge[k][0]-i)+abs(hoge[k][1]-j))
      
    if(h.count(h[0])==len(h)):
      print(i,j,h[0])

Buggy submission (verdict: Runtime Error):
n=int(input())
hoge=[]
for i in range(n):
  x,y,z=map(int,input().split())
  if(z!=0):
    hoge.append([x,y,z])
  
for i in range(101):
  for j in range(101):
    h=[]
    for k in range(n):
      h.append(hoge[k][2]+abs(hoge[k][0]-i)+abs(hoge[k][1]-j))
      
    if(h.count(h[0])==len(h)):
      print(i,j,h[0])
Problem p03251 (python)

Fixed submission:
hoge = [int(i) for i in input().split()]
X = [int(i) for i in input().split()]
Y = [int(i) for i in input().split()]
X.append(hoge[2])
Y.append(hoge[3])
X.sort()
Y.sort()
 

if(Y[0]-X[-1]>0):
  print("No War")
else:
  print("War")

Buggy submission (verdict: Runtime Error):
hoge = [int(i) for i in input().split()]
X = [int(i) for i in input().split()]
Y = [int(i) for i in input().split()]

X.sort()
Y.sort()

if(y[0]-X[-1]>0):
  print("No War")
else:
  print("War")
Problem p03280 (python)

Fixed submission:
A,B=map(int,input().split())
print((A-1)*(B-1))

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
print((A-1)*(B-1)
Problem p03288 (python)

Fixed submission:
A=int(input())
ARC=1
if(A<1200):
  print("ABC")
  ARC=0

if(A>=2800):
  print("AGC")
  ARC=0
  
if(ARC==1):
  print("ARC")

Buggy submission (verdict: Runtime Error):
A=int(input())
ARC=1
if(A<1200):
  print("ABC")
  ARC=0

if(A>=2800):
  print("AGC")
  ARC=0
  
if(ARC=1):
  print("ARC")
Problem p03289 (python)

Fixed submission:
#ABC097B
hoge=input()
no=0

if(hoge[0]=="A"):
    hoge=hoge.replace("A","a",1)
else:
    no=1
    
if not(hoge[1].islower() and hoge[-1].islower()):
    no=1

if(hoge.count("C")==1):
    hoge=hoge.replace("C","c",1)
else:
    no=1
    
if(hoge.islower() and no==0):
    print("AC")
else:
    print("WA")

Buggy submission (verdict: Runtime Error):
hoge=input()
no=0
if(hoge[0]=="A"):
  hoge.strip("A")
else:
  no=1

if(hoge[0].islower()):
  hoge.strip(hoge[0])
else:
  no=1

if(hoge[0]=="C"):
  hoge.strip("C")
else:
  no=1
  
if(hoge.islower()==false):
  no=1
  
if(no==0):
  print("AC")
else:
  print("WA")
Problem p03337 (python)

Fixed submission:
A,B=map(int,input().split())
print(max(A+B,A-B,A*B))

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split)
print(max(A+B,A-B,A*B))
Problem p03361 (python)

Fixed submission:
m,n=map(int,input().split())
hoge=[[0 for i in range(n+2)] for j in range(m+2)]
for i in range(m):
  sss=input()
  for j in range(n):
    if(sss[j]=="#"):
      hoge[1+i][1+j]=1
    

flag=True
for i in range(m):
  for j in range(n):
    if(hoge[1+i][1+j]==1):
      ans=0
      #print(1+i,1+j,ans,hoge[i][1+j],hoge[1+i][j],hoge[2+i][1+j],hoge[1+i][2+j])
      ans=max(hoge[i][1+j],hoge[1+i][j],hoge[2+i][1+j],hoge[1+i][2+j])
      if(ans==0):
        flag=False
        
if(flag):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
hoge=[[0 for i in range(n+2)] for j in range(m+2)]
for i in range(m):
  sss=input()
  for j in range(n):
    if(sss[j]=="#"):
      hoge[1+i][1+j]=1
    
flag=True
for i in range(m):
  for j in range(n):
    if(hoge[1+i][1+j]==1):
      ans=0
      ans+=hoge[i][1+j]+hoge[1+i][j]+hoge[2+i][1+j]+hoge[1+i][2+j]
      if(ans==0):
        flag=False
        
if(flag):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
hoge=[[0 for i in range(n+2)] for j in range(m+2)]
for i in range(n):
  sss=input()
  for j in range(m):
    if(sss[j]=="#"):
      hoge[1+i][1+j]=1
    
flag=True
for i in range(m):
  for j in range(n):
    if(hoge[1+i][1+j]==1):
      ans=0
      ans+=hoge[i][1+j]+hoge[1+i][j]+hoge[2+i][1+j]+hoge[1+i][2+j]
      if(ans==0):
        flag=False
        
if(flag):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
hoge=[[0 for i in range(n+2)] for j in range(m+2)]
for i in range(m):
  sss=input()
  for j in range(n):
    if(sss[j]=="#"):
      hoge[1+i][1+j]=1
    
flag=True
for i in range(m):
  for j in range(n):
    if(hoge[1+i][1+j]==1):
      ans=0
      ans+=hoge[i][1+j]+hoge[1+i][j]+hoge[2+i][1+j]+hoge[1+i][2+j]
      if(ans==0):
        flag=False
        
if(flag):
  print("Yes")
else:
  print("No")
Problem p03419 (python)

Fixed submission:
a,b=map(int,input().split())

if(a==1 and b==1):
  print(1)
elif(a==1):
  print(max(0,b-2))
elif(b==1):
  print(max(0,a-2))
else:
  print((a-2)*(b-2))

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

if(a==1):
  print(max(0,b-2))
elif(b==1):
  print(max(0,a-2))
else:
  print((a-2)*(b-2))
Problem p03455 (python)

Fixed submission:
a,b=map(int,input().split())
if(a*b%2==0):
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if(a*b%2==0):
  print("Even")
else:
  print("Odd")
Problem p03456 (python)

Fixed submission:
a,b=map(int,input().split())
ans=0
if(b<10):
  ans=a*10+b
elif(b<100):
  ans=a*100+b
else:
  ans=a*1000+b
  
  
n=int(1+ans**0.5)
flag=0
for i in range(n):
  if(i**2==ans):
    flag=1
    break
    
if(flag==1):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b=int(input())
ans=0
if(b<10):
  ans=a*10+b
elif(b<100):
  ans=a*100+b
else:
  ans=a*1000+b
  
  
n=int(1+ans**0.5)
flag=0
for i in range(n):
  if(i**2==ans):
    flag=1
    break
    
if(flag==1):
  print("Yes")
else:
  print("No")
Problem p03547 (python)

Fixed submission:
a,b=map(str,input().split())

if(a=="A"):
  c=1
if(a=="B"):
  c=2
if(a=="C"):
  c=3
if(a=="D"):
  c=4
if(a=="E"):
  c=5
if(a=="F"):
  c=6
if(b=="A"):
  d=1
if(b=="B"):
  d=2
if(b=="C"):
  d=3
if(b=="D"):
  d=4
if(b=="E"):
  d=5
if(b=="F"):
  d=6
  
if(c>d):
  print(">")
if(c<d):
  print("<")
if(c==d):
  print("=")

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

if(a=="A"):
  c=1
if(a=="B"):
  c=2
if(a=="C"):
  c=3
if(a=="D"):
  c=4
if(a=="E"):
  c=5
if(a=="F"):
  c=6
if(b=="A"):
  d=1
if(b=="B"):
  d=2
if(b=="C"):
  d=3
if(b=="D"):
  d=4
if(b=="E"):
  d=5
if(b=="F"):
  d=6
  
if(c>d):
  print(">")
if(c<d):
  print("<")
if(c=d):
  print("=")
Problem p03555 (python)

Fixed submission:
a=input()
b=input()
ans=0
if(a[0]==b[2]):
  if(a[1]==b[1]):
    if(a[2]==b[0]):
      print("YES")
      ans=1
      
if(ans==0):
  print("NO")

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
ans=0
if(a[0]==b[2]):
  if(a[1]==b[1]):
    if(a[2]==b[0]):
      print("YES")
      ans=1
      
if(ans=0):
  print("NO")
Problem p03565 (python)

Fixed submission:
hoge=input()
key=input()
ans=[]
for i in range(len(hoge)-len(key)+1):
  flag=0
  for j in range(len(key)):
    if(hoge[i+j]==key[j] or hoge[i+j]=="?"):
      flag+=1
  if(flag==len(key)):
    kari=hoge[:i]+key+hoge[i+len(key):]
    ans.append(kari.replace("?","a"))
    
if(len(ans)>0):
  ans.sort()
  print(ans[0])
else:
  print("UNRESTORABLE")

Buggy submission (verdict: Runtime Error):
hoge=input()
key=input()
ans=[]
for i in range(len(hoge)-len(key)+1):
  flag=0
  for j in range(len(key)):
    if(hoge[i+j]==key[j] or hoge[i+j]=="?"):
      flag+=1
  if(flag==len(key)):
    kari=hoge[:i]+key+hoge[i+len(key):]
    ans.append(kari.replace("?","a"))
    
ans.sort()
print(ans[0])
Problem p03609 (python)

Fixed submission:
a,b=map(int,input().split())
if(a-b>=0):
  print(a-b)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
a,b=map(int.input().split())
if(a-b>=0):
  print(a-b)
else:
  print(0)
Problem p03694 (python)

Fixed submission:
n=int(input())
hoge=list(map(int,input().split()))

print(max(hoge)-min(hoge))

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

print(max(hoge)-min()hoge)
Problem p03695 (python)

Fixed submission:
n=int(input())
hoge=list(map(int,input().split()))

color=[0]*9
for i in range(n):
  if(hoge[i]<3200):
    color[hoge[i]//400]+=1
  else:
    color[8]+=1

ans=0
for i in color[:8]:
  if(i!=0):
    ans+=1

if(color[8]==n):
  print(1,n)
else:
  print(ans,ans+color[8])

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

color=[0]*9
for i in range(n):
  color[hoge[i]//400]+=1

ans=0
for i in color[:8]:
  if(i!=0):
    ans+=1
    
print(ans,ans+color[8])
Problem p03697 (python)

Fixed submission:
a,b=map(int,input().split())
if(a+b>=10):
  print("error")
else:
  print(a+b)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().spkit())
if(a+b>=10):
  print("error")
else:
  print(a+b)
Problem p03720 (python)

Fixed submission:
n,m=map(int,input().split())
hoge=[]
for i in range(m):
  a,b=map(int,input().split())
  hoge.append(a)
  hoge.append(b)
  
for i in range(n):
  print(hoge.count(i+1))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
hoge=[]
for i in range(m):
  a,b=map(int,input())
  hoge.append(a)
  hoge.append(b)
  
for i in range(n):
  print(hoge.count(i+1))
Problem p03730 (python)

Fixed submission:
a,b,c=map(int,input().split())
ans=0
flag=0
for i in range(b):
  ans+=a
  if(ans%b==c):
    flag=1

if(flag==1):
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
ans=0
flag=0
for i in range(b):
  ans+=a
  if(ans%b==c):
    flag=1

if(flag=1):
  print("YES")
else:
  print("NO")
Problem p03795 (python)

Fixed submission:
a=int(input())
print(800*a-200*(int(a/15)))

Buggy submission (verdict: Runtime Error):
a=int(input)
print(800*a-200*(int(a/15)))
Problem p03852 (python)

Fixed submission:
a=input()
if(a=="a" or a=="i" or a=="u" or a=="e" or a=="o"):
  print("vowel")
else:
  print("consonant")

Buggy submission (verdict: Runtime Error):
a=input()
if(a=="a" or a=="i" or a=="u" or a=="e" or a=="o):
   print("vowel")
else:
   print("consonant")
Problem p03997 (python)

Fixed submission:
a=int(input())
b=int(input())
h=int(input())
print(int((a+b)*h/2))

Buggy submission (verdict: Runtime Error):
a,b,h=map(int,input().split())
print(int((a+b)*h/2))

Buggy submission (verdict: Runtime Error):
a,b,h=map(int,input().split())
print((a+b)*h/2)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print((a+b)*h/2)
Problem p03998 (python)

Fixed submission:
hoa=list(input())
hob=list(input())
hoc=list(input())
f="A"

while 1:
  if(f=="A" and len(hoa)==0):
    print(f)
    break
  elif(f=="B" and len(hob)==0):
    print(f)
    break
  elif(f=="C" and len(hoc)==0):
    print(f)
    break
  elif(f=="A"):
    if(hoa[0]=="a"):
      f="A"
      hoa=hoa[1:]
    elif(hoa[0]=="b"):
      f="B"
      hoa=hoa[1:]
    elif(hoa[0]=="c"):
      f="C"
      hoa=hoa[1:]
  elif(f=="B"):
    if(hob[0]=="a"):
      f="A"
      hob=hob[1:]
    elif(hob[0]=="b"):
      f="B"
      hob=hob[1:]
    elif(hob[0]=="c"):
      f="C"
      hob=hob[1:]
  elif(f=="C"):
    if(hoc[0]=="a"):
      f="A"
      hoc=hoc[1:]
    elif(hoc[0]=="b"):
      f="B"
      hoc=hoc[1:]
    elif(hoc[0]=="c"):
      f="C"
      hoc=hoc[1:]

Buggy submission (verdict: Runtime Error):
hoge_a=input()
hoge_b=input()
hoge_c=input()
tugi="A"
while 1:
  if(tugi=="A"):
    if(hoge_a[0]=="a"):
      tugi="A"
    if(hoge_a[0]=="b"):
      tugi="B"
    if(hoge_a[0]=="c"):
      tugi="C"
    hoge_a=hoge_a[1:]
      
  if(tugi=="B"):
    if(hoge_b[0]=="a"):
      tugi="A"
    if(hoge_b[0]=="b"):
      tugi="B"
    if(hoge_b[0]=="c"):
      tugi="C"
    hoge_b=hoge_b[1:]
      
  if(tugi=="C"):
    if(hoge_c[0]=="a"):
      tugi="A"
    if(hoge_c[0]=="b"):
      tugi="B"
    if(hoge_c[0]=="c"):
      tugi="C"
    hoge_c=hoge_c[1:]
    
  if(len(hoge_a)==0 and tugi=="A"):
    print(tugi)
    break
    
  if(len(hoge_b)==0 and tugi=="B"):
    print(tugi)
    break
    
  if(len(hoge_c)==0 and tugi=="C"):
    print(tugi)
    break

Buggy submission (verdict: Runtime Error):
hoge_a=input()
hoge_b=input()
hoge_c=input()
tugi="A"
while 1:
  if(tugi=="A"):
    if(len(hoge_a)==0):
      print("A")
      break:
    if(hoge_a[0]=="a"):
      tugi=="A"
    if(hoge_a[0]=="b"):
      tugi=="B"
    if(hoge_a[0]=="c"):
      tugi=="C"
    hoge_a=hoge_a[1:]
      
  if(tugi=="B"):
    if(len(hoge_b)==0):
      print("B")
      break:
    if(hoge_b[0]=="a"):
      tugi=="A"
    if(hoge_b[0]=="b"):
      tugi=="B"
    if(hoge_b[0]=="c"):
      tugi=="C"
    hoge_b=hoge_b[1:]
      
  if(tugi=="C"):
    if(len(hoge_a)==0):
      print("C")
      break:
    if(hoge_c[0]=="a"):
      tugi=="A"
    if(hoge_c[0]=="b"):
      tugi=="B"
    if(hoge_c[0]=="c"):
      tugi=="C"
    hoge_c=hoge_c[1:]
Problem p02969 (python)

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

Buggy submission (verdict: Runtime Error):
r=int(input())
a=3(r*r)

Buggy submission (verdict: Runtime Error):
r=(int,input())
a=3(r*r)

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

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

Buggy submission (verdict: Runtime Error):
r=int(input())
a=3(rxr)

Buggy submission (verdict: Runtime Error):
r=(int,input().split)
a=3(rxr)

Buggy submission (verdict: Runtime Error):
r=map(int,input())
a=3(rxr)

Buggy submission (verdict: Runtime Error):
r=(int,input())
a=3(rxr)
Problem p02981 (python)

Fixed submission:
n,a,b=map(int,input().split())
if(n*a>=b):
    print(b)
else:
    print(n*a)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=int(input())
B=int(input())
t1=N*A
t2=B
if t1<B:
      tmin=t1
      print(tmin)
else:
      tmin=B
      print(tmin)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=int(input())
B=int(input())
t1=N*A
t2=N*B
if t1<t2:
      tmin=t1
      print(tmin)
else:
      tmin=t2
      print(tmin)

Buggy submission (verdict: Runtime Error):
N=int(input("enter number of people")
A=int(input("enter the cost of train")
B=int(input("enter the cost of taxi")
t1=N*A
if t1<B:
      tmin=t1
      print("minimum total travel expense",tmin)
else:
      tmin=B
      print("minimum total travel expense",tmin)

Buggy submission (verdict: Runtime Error):
N=int(input("enter number of people"))
A=int(input("enter the cost of train"))
B=int(input("enter the cost of taxi"))
t1=N*A
t2=N*B
if t1<t2:
      tmin=t1
      print("minimum total travel expense",tmin)
else:
      tmin=t2
      print("minimum total travel expense",tmin)

Buggy submission (verdict: Runtime Error):
N=int(input("enter number of people"))
A=int(input("enter the cost of train"))
B=int(input("enter the cost of taxi"))
t1=N*A
t2=N*B
if t1<t2:
      tmin=t1
      print("minimum total travel expense",tmin)
else:
      tmin=t2
      print("minimum total travel expense",tmin)

Buggy submission (verdict: Runtime Error):
N=int(input("enter number of people")
A=int(input("enter the cost of train")
B=int(input("enter the cost of taxi")
t1=N*A
t2=N*B
if t1<t2:
      tmin=t1
      print("minimum total travel expense",tmin)
else:
      tmin=t2
      print("minimum total travel expense",tmin)

Buggy submission (verdict: Runtime Error):
N=int(input("enter number of people")
A=int(input("enter the cost of train")
B=int(input("enter the cost of taxi")
t1=N*A
t2=N*B
if t1<t2:
      tmin=t1
      print("minimum total travel expense",tmin)
else:
      tmin=t2
      print("minimum total travel expense",tmin)
Problem p03605 (python)

Fixed submission:
N = int(input())
if N//10==9 or N%10==9: print('Yes')
else: print('No')

Buggy submission (verdict: Runtime Error):
N == int(input())
if N//10==9 or N%10==9: print('Yes')
else: print('No')
Problem p03711 (python)

Fixed submission:
x,y = map(int, input().split())
if x==2:
  print('No')
elif x==4 or x==6 or x==9 or x==11:
  if y==6 or y==9 or y==11:
    print('Yes')
  else: print('No')
else:
  if y==3 or y==5 or y==7 or y==8 or y==10 or y==12:
    print('Yes')
  else: print('No')

Buggy submission (verdict: Runtime Error):
x,y = map(int, input().split())
if x==2:
  print('No')
elif x==4 or x==6 or x==9 or x==11
  if y==6 or y==9 or y==11:
    print('Yes')
  else: print('No')
else:
  if y==3 or y==5 or y==7 or y==8 or y==10 or y==12:
    print('Yes')
  else: print('No')
Problem p03845 (python)

Fixed submission:
n=int(raw_input())
t=map(int,raw_input().split())
total=sum(t)
m=int(raw_input())
for _ in xrange(m):
	p,x=map(int,raw_input().split())
	print total-t[p-1]+x

Buggy submission (verdict: Runtime Error):
n=int(raw_input())
t=map(int,raw_input().split())
total=sum(t)
m=int(raw_input())
for _ in xrange(m):
	p,x=map(int,raw_input())
	print total-t[p-1]+x

Buggy submission (verdict: Runtime Error):
n=int(raw_input())
t=map(int,raw_input().split())
total=sum(t)
m=int(raw_input())
for _ in xrange(m):
	p,x=map(int,raw_input())
	print sum-t[p-1]+x
Problem p03846 (python)

Fixed submission:
def pow(base, nod):
  MOD = 10**9+7
  ans = 1
  tmp = base
  while nod>0:
    if nod%2==1: ans=ans*tmp%MOD
    tmp = tmp**2
    tmp %= MOD
    nod /= 2
  return ans

n=int(raw_input())
a=map(int,raw_input().split())
d={}
for i in xrange(n):
  if a[i] not in d: d[a[i]]=0
  d[a[i]]+=1
isValid=True
if n%2==0:
  for k,v in d.items():
    if k%2!=1 or v!=2:
      isValid=False
else:
  for k,v in d.items():
    if k%2!=0 or (k==0 and v!=1) or (k!=0 and v!=2):
      isValid=False
if isValid:
  print pow(2, n/2)
else:
  print 0

Buggy submission (verdict: Runtime Error):
def pow(base, nod):
	MOD = 10**9+7
	ans = 1
	tmp = 2
	while base>0:
		if base%2==1: ans=ans*tmp%MOD
		tmp = tmp**2%MOD
		base /= 2
	return ans

n=int(raw_input())
a=map(int,raw_input().split())
d={}
for i in xrange(n):
	if a[i] not in d: d[a[i]]=0
	d[a[i]]+=1
isValid=True
if n%2==0:
	for k,v in d:
		if k%2!=1 or v!=2:
		isValid=False
else:
	for k,v in d:
		if k%2!=0 or (k==0 and v!=1) or (k!=0 and v!=2):
		isValid=False
if isValid:
	print pow(2, n/2)
else:
	print 0
Problem p02554 (python)

Fixed submission:
n = int(input())
ans = 1
ans1 = 1
ans2 = 1
mod = 1000000007
for i in range(n):
	ans = (ans*10)%mod
	ans2 = (ans2*8)%mod
	ans1 = (ans1*9)%mod
ans = (ans - ans1 + mod)%mod
ans = (ans - ans1 + mod)%mod
ans = (ans + ans2)%mod
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 1
ans1 = 1
ans2 = 1
mod = 1000000007
for i in range(n):
	ans = (ans*10)%mod
    ans2 = (ans2*8)%mod
	ans1 = (ans1*9)%mod
ans = (ans - ans1 + mod)%mod
ans = (ans - ans1 + mod)%mod
ans = (ans + ans2)%mod
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 1
ans2 = 1
mod = 1000000007
for i in range(n):
	ans = (ans*10)%mod
    ans2 = (ans2*8)%mod
ans = (ans - ans2 + mod)%mod
print(ans)
Problem p03060 (python)

Fixed submission:
n=int(input())
arr=list(map(int,input().split()))
arr2=list(map(int,input().split()))
ans=0
for i in range(n):
	if(arr[i]-arr2[i]>0):
		ans+=arr[i]-arr2[i]

	#ans=max(ans,arr[i]-arr2[i])
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
arr=list(map(int,input().split()))
arr2=lisT9map(int,input().split())
ans=0
for i in range(n):
	if(arr[i]-arr2[i]>0):
		ans+=arr[i]-arr2[i]

	#ans=max(ans,arr[i]-arr2[i])
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
arr=list(map(int,input().split()))
arr2=lisT9map(int,input().split())
ans=0
for i in range(n):
	if(arr[i]-arr2[i]>0):
		ans+=arr[i]-arr2[i]

	#ans=max(ans,arr[i]-arr2[i])
print(ans)
Problem p03076 (python)

Fixed submission:
arr=[]
for i in range(5):
	t=int(input())
	arr.append(t)
ans=0
arr2=[]
for i in range(5):
	if(arr[i]%10==0):
		ans+=arr[i]
	else:
		ans+=((arr[i]//10)+1)*10
		arr2.append(arr[i]%10)
if(len(arr2)>0):
	ans-=10
	ans+=min(arr2)
print(ans)

Buggy submission (verdict: Runtime Error):
arr=[]
for i in range(5):
	t=int(input())
	arr.append(t)
ans=0
arr2=[]
for i in range(5):
	if(arr[i]%10==0):
		ans+=arr[i]
	else:
		ans+=((arr[i]//10)+1)*10
		arr2.append(arr[i]%10)
ans-=10
ans+=min(arr2)
print(ans)
Problem p02801 (python)

Fixed submission:
a = input()
print(chr(ord(a)+1))

Buggy submission (verdict: Runtime Error):
import queue
import copy
 
def ngoin(bo,now):
    return 0 <= now[0] and now[0] < len(bo) and 0 <= now[1] and now[1] < len(bo[0])
 
def minido(bo,si,sj):
    tb = [[False for i in range(len(bo[0]))] for j in range(len(bo))]
    q = queue.Queue()
    q.put([si,sj,0])
    tb[si][sj] = True
    ret = 0
    while not q.empty():
        now = q.get()
        ret = now[2]
        if ngoin(bo,[now[0]-1,now[1]]):
            if bo[now[0]-1][now[1]] and not tb[now[0]-1][now[1]]:
                q.put([now[0]-1,now[1],now[2]+1])
                tb[now[0]-1][now[1]] = True
                
        if ngoin(bo,[now[0],now[1]+1]):
            if bo[now[0]][now[1]+1] and not tb[now[0]][now[1]+1]:
                q.put([now[0],now[1]+1,now[2]+1])
                tb[now[0]][now[1]+1] = True
                
        if ngoin(bo,[now[0]+1,now[1]]):
            if bo[now[0]+1][now[1]] and not tb[now[0]+1][now[1]]:
                q.put([now[0]+1,now[1],now[2]+1])
                tb[now[0]+1][now[1]] = True
                
        if ngoin(bo,[now[0],now[1]-1]):
            if bo[now[0]][now[1]-1] and not tb[now[0]][now[1]-1]:
                q.put([now[0],now[1]-1,now[2]+1])
                tb[now[0]][now[1]-1] = True
    return ret
            
 
h,w = map(int,input().split())
bo = [[True if x == '.' else False for x in input()] for i in range(h)]
grap = [[float('inf') for i in range(h*w)] for j in range(h*w)]
ans = 0
for i in range(h*w):
    grap[i][i] = 0
for si in range(h):
    for sj in range(w):
        if not bo[si][sj]:
            continue
        ans = max(ans,minido(bo,si,sj))
                
print(ans)
Problem p02865 (python)

Fixed submission:
n = int(input())
if n == 1:
    print(0)
    exit(0)
l = 1
r = n-1
ans = 0
while l < r:
    l+=1
    r-=1
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
m = 998244353
def myPow(a,b):
    a %= m
    if b == 1:
        return a%m
    elif b == 0:
        return 1
    if b%2 == 0:
        return myPow(a**2,b//2)%m
    else:
        return (a%m)*myPow(a**2,(b-1)//2)%m

n = int(input())
ngo = [0]*n
d = list(map(int,input().split()))
for i in range(n):
    ngo[d[i]]+=1
if ngo[0] != 1:
    print(0)
    exit(0)
ans = 1
for i in range(n-1):
    ans = (ans*myPow(ngo[i],ngo[i+1])%m)%m
print(ans%m)
Problem p02922 (python)

Fixed submission:
# coding: utf-8
# Your code here!

a,b = input().split()
a = int(a)
b = int(b)
ngo = 1
ans = 0
while ngo < b:
    ngo += a-1
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

a,b = input().split()
a = int(a)
b = int(b)
ngo = 1
ans = 0
while ngo < b:
    ngo += a-1
    ans + =1
print(ans)
Problem p02952 (python)

Fixed submission:
n = int(input())
ans = 0
for i in range(1,n+1):
  if len(str(i))%2 != 0:
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 0
for i in range(i,n+1):
  if len(str(i))%2 != 0:
    ans += 1
print(ans)
Problem p02995 (python)

Fixed submission:
import fractions
a,b,c,d = map(int,input().split())
t1 = b//c-a//c
if a%c == 0:
    t1 += 1
t2 = b//d-a//d
if a%d == 0:
    t2 += 1
lcm = c*d//fractions.gcd(c,d)
t3 = b//lcm-a//lcm
if a%lcm == 0:
    t3 += 1
print(b-a+1-(t1+t2-t3))

Buggy submission (verdict: Runtime Error):
import math
a,b,c,d = map(int,input().split())
t1 = b//c-a//c
if a%c == 0:
    t1 += 1
t2 = b//d-a//d
if a%d == 0:
    t2 += 1
lcm = c*d//math.gcd(c,d)
t3 = b//lcm-a//lcm
if a%lcm == 0:
    t3 += 1
print(b-a+1-(t1+t2-t3))
Problem p03029 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
print((a*3+p)//2)