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

Fixed submission:
n,x=map(int,input().split())
M=[int(input()) for i in range(n)]
print(n+(x-sum(M))//min(M))

Buggy submission (verdict: Runtime Error):
n,x=map(input().split())
M=[int(input()) for i in range(n)]
print(n+(x-sum(M))//min(M))
Problem p03385 (python)

Fixed submission:
print("Yes" if len(set(input()))==3 else "No")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
s=max(a,b,c)*3-(a+b+c)
print(s//2 if s%2==0 else (s+3)//2)
Problem p03408 (python)

Fixed submission:
n=int(input())
blue=[input() for i in range(n)]
m=int(input())
red=[input() for i in range(m)]
print(max(max([blue.count(blue[i])-red.count(blue[i]) for i in range(n)]),0))

Buggy submission (verdict: Runtime Error):
n=int(input())
blue=[input() for i in range(n)]
m=int(input())
red=[input() for i in range(m)]
print(max([blue.count(blue(i))-red.count(blue(i)) for i in range(n)]),0)
Problem p03415 (python)

Fixed submission:
a,b,c=[input() for i in range(3)]
print(a[0]+b[1]+c[2])

Buggy submission (verdict: Runtime Error):
a,b,c=[input() for i in range(3)]
print(a[0]+b[1]+c[3])
Problem p03417 (python)

Fixed submission:
n,m=map(int,input().split())
if n>=2 and m>=2:
  print((n-2)*(m-2))
elif n==1 and m>=2:
  print(m-2)
elif m==1 and n>=2:
  print(n-2)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
if n>=2 and m>=2:
  print((n-2)*(m-2))
elif n==1 ans m>=2:
  print(m-2)
elif m==1 ans n>=2:
  print(n-2)
else:
  print(1)
Problem p03456 (python)

Fixed submission:
x=int(input().replace(" ",""))
if int(x**.5)**2==x:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x=int(input()replace(" ",""))
if int((x**.5))**2==x:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x=int(input()replace(" ",""))
if int((x**.5))**2=x:
  print("Yes")
else:
  print("No")
Problem p03469 (python)

Fixed submission:
s=input()
print(s[:3]+"8"+s[4:])

Buggy submission (verdict: Runtime Error):
n=input()
l=[int(input()) for i in range(n)]
s=set(l)
print(len(s))
Problem p03470 (python)

Fixed submission:
n=int(input())
l=[int(input()) for i in range(n)]
s=set(l)
print(len(s))

Buggy submission (verdict: Runtime Error):
n=input()
l=[int(input()) for i in range(n)]
s=set(l)
print(len(s))

Buggy submission (verdict: Runtime Error):
n=input
l=[int(input()) for i in range(n)]
s=set(l)
print(len(s))

Buggy submission (verdict: Runtime Error):
n=input
l=[int(input()) for i in range(n)]
s=set(l)
print(len(s))
Problem p03474 (python)

Fixed submission:
a,b=map(int,input().split())
s=input()
print("Yes" if s.count("-")==1 and s.index("-")==a else "No")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
s=input()
print("Yes" if s.count("-")==1 and s.index("-")==a else "No)
Problem p03477 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
print("Left" if a+b>c+d else "Right" if a+b<c+d else "Balanced")

Buggy submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
print(sum([i for i in range(1,n+1) if a<=sum(map(int,str(i)))<=b]))
Problem p03480 (python)

Fixed submission:
S=input()
l=len(S)
if l%2==1:
    m=S[l//2]
    c=1
    for i in range(l//2):
        if S[l//2-i-1]==m and S[l//2+i+1]==m:
            c+=2
        else:
            break
    ans=c+(l-c)//2
else:
    m1=S[l//2-1]
    m2=S[l//2]
    c=0
    if m1==m2:
        c=2
        for i in range(l//2-1):
            if S[l//2-i-2]==m1 and S[l//2+i+1]==m1:
                c+=2
            else:
                break
    ans=c+(l-c)//2
print(ans)

Buggy submission (verdict: Runtime Error):
S=input()
l=len(S)
if l%2==1:
    m=S[l//2]
    c=1
    for i in range l//2:
        if S[l//2-i-1]==m and S[l//2+i+1]==m:
            c+=2
        else:
            break
    ans=c+(l-c)//2
else:
    m1=S[l//2-1]
    m2=S[l//2]
    c=0
    if m1==m2:
        c=2
        for i in range l//2-1:
        if S[l//2-i-2]==m1 and S[l//2+i+1]==m1:
            c+=2
        else:
            break
    ans=c+(l-c)//2
print(ans)
Problem p03502 (python)

Fixed submission:
n=int(input())
f=sum(map(int,str(n)))
print("No" if n%f else "Yes")

Buggy submission (verdict: Runtime Error):
n=int(input())
f=sum(map(int,n))
print("No" if n%f else "Yes")
Problem p03549 (python)

Fixed submission:
n,m=map(int,input().split())
print((100*n+1800*m)*2**m)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input())
print((100*n+1800*m)*2**m)
Problem p03606 (python)

Fixed submission:
N=int(input())
X=0
for i in range(N):
  l,n=map(int,input().split())
  X+=n-l+1
print(X)

Buggy submission (verdict: Runtime Error):
N=int(input())
X=0
for i in range(N):
  l,n=map(int,input().split())
  x+=l-n+1
print(X)
Problem p03609 (python)

Fixed submission:
X,t=map(int,input().split())
print(max(X-t,0))

Buggy submission (verdict: Runtime Error):
X,t=mao(int,input().split())
print(max(X-t,0))
Problem p03624 (python)

Fixed submission:
s=input()
for i in range(ord("a"),ord("z")+1):
  if chr(i) not in s:
    print(chr(i))
    break
else:
  print("None")

Buggy submission (verdict: Runtime Error):
s=input()
for i in range(ord("a"),ord("z")+1):
  if chr(i) in s:
    print(chr(i))
    break
else:
  print("None)
Problem p03633 (python)

Fixed submission:
from functools import reduce
from fractions import gcd
def lcm(a,b):
  return a*b//gcd(a,b)
def lcmm(l):
  return reduce(lcm,l)
n=int(input())
l=[int(input()) for i in range(n)]
print(lcmm(l))

Buggy submission (verdict: Runtime Error):
from functools import reduce
from fractions import gcd
def lcms(a,b):
  return a*b//gcd(a,b)
def lcmm(l):
  return reduce(lcm,l)
n=int(input())
l=[int(input()) for i in range(n)]
print(lcmm(l))
Problem p03636 (python)

Fixed submission:
a=input()
print(a[0]+str(len(a)-2)+a[-1])

Buggy submission (verdict: Runtime Error):
a=input()
print(a[0]+str(len([a]-2))+a[-1])
Problem p03680 (python)

Fixed submission:
n=int(input())
A=list(int(input()) for i in range(n))
a=0
for x in range(n):
  a=A[a]-1
  if a==1:
    print(x+1)
    break
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
n=int(input())
A=list(int(input()) for i in range(n))
a=0
for x in range(n):
  a=A[i]
  if a==2:
    print(x)
    break
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
n=int(input())
A=list(int(input()) for i in range(n))
a=0
for x in range(n):
  a=a[i]
  if a==2:
    print(x)
    break
Problem p03711 (python)

Fixed submission:
x,y=map(int,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
print("Yes" if x in a and y in a or x in b and y in b or x==2 and y==2 else "No")

Buggy submission (verdict: Runtime Error):
x,y=int(map,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
print("Yes" if x in a and y in a or x in b and y in b or x==2 and y==2 else "No")

Buggy submission (verdict: Runtime Error):
x,y=int(map,input().split())
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
print("Yes" if x in a and y in a or x in b and y in b or x==2 and y==2 else "No)
Problem p03729 (python)

Fixed submission:
a,b,c=input().split()
print("YES" if a[-1]==b[0] and b[-1]==c[0] else "NO")

Buggy submission (verdict: Runtime Error):
a,b,c=input().split()
print("YES" a[-1]==b[0] and b[-1]==c[0] else "NO")
Problem p03738 (python)

Fixed submission:
a,b=[list(input()) for i in range(2)]
if len(a)>len(b):
  print("GREATER")
elif len(a)<len(b):
  print("LESS")
elif a>b:
  print("GREATER")
elif a<b:
  print("LESS")
else:
  print("EQUAL")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
print("GRATER" if a>b else "LESS" if a<b else "EQUAL")
Problem p03813 (python)

Fixed submission:
print("ABC" if int(input())<1200 else "ARC")

Buggy submission (verdict: Runtime Error):
print("ABC" if int(input)<1200 else "ARC")
Problem p03863 (python)

Fixed submission:
s=input()
l=len(s)
if s[0]==s[-1]:
    if l%2==0:
        print("First")
    else:
        print("Second")
else:
    if l%2==1:
        print("First")
    else:
        print("Second")

Buggy submission (verdict: Runtime Error):
s=input()
l=len(s)
if s[0]==s[-1]:
    if l%2=1:
        print("First")
    else:
        print("Second")
else:
    if l%2=0:
        print("First")
    else:
        print("Second")
Problem p03997 (python)

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

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

Fixed submission:
S={c:list(input()) for c in "abc"}
s="a"
while S[s]:s=S[s].pop(0)
print(s.upper())

Buggy submission (verdict: Runtime Error):
a=list(input())
b=list(input())
c=list(input())
turn="a"
while True:
  if turn=="a":
    turn=a.pop()
    if not a:
      print("A")
      break
  elif turn=="b"
    turn=b.pop()
    if not b:
      print("B")
      break
  else:
    turn=c.pop()
    if not c:
      print("C")
      break
Problem p04000 (python)

Fixed submission:
h,w,n=map(int,input().split())
D=dict()
for i in range(n):
    a,b=map(int,input().split())
    for p in range(-1,2):
        for q in range(-1,2):
            aa=a+p
            bb=b+q
            if 2<=aa<=h-1 and 2<=bb<=w-1:
                aabb=str(aa)+"_"+str(bb)
                if aabb in D:
                    D[aabb]+=1
                else:
                    D[aabb]=1
ans=[0]*10
V=list(D.values())
for v in V:
    ans[v]+=1
ans[0]=(h-2)*(w-2)-sum(ans)
for i in range(10):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
h,w,n=map(int,input().split())
D=dict()
for i in range(n):
    a,b=map(int,input().split())
    for p in range(-1,2):
        for q in range(-1,2):
            aa=a+p
            bb=b+q
            if 2<=aa<=h-1 and 2<=bb<=w-1:
                aabb=str(aa)+str(bb)
                if aabb in D:
                    D[aabb]+=1
                else:
                    D[aabb]=1
ans=[0]*10
V=list(D.values())
for v in V:
    ans[v]+=1
ans[0]=(h-2)*(w-2)-sum(ans)
for i in range(10):
    print(ans[i])
Problem p04030 (python)

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

Buggy submission (verdict: Runtime Error):
s=list(input())
ans=""
for i in range(len(s)):
  if s[i-1]==B:
    ans=ans[:-1]
  else:
    ans+=s[i-1]
Problem p03742 (python)

Fixed submission:
x,y = map(int,input().split())
if x>y:
    x,y = y,x

if y-x>1:
    print("Alice")
else:
    print("Brown")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if x>y:
    swap(x,y)

if y-x>1:
    print("Alice")
else:
    print("Brown")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if x>y:
    swap(x,y)

if y-x>1:
    print("Alice")
elif:
    print("Brown")

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if x>y:
    swap(x.y)

if y-x>1:
    print("Alice")
elif:
    print("Brown")
Problem p02621 (python)

Fixed submission:
a = int(input())

print(a + a ** 2 + a ** 3)

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

count = 0

for x,y in zip(a,b):
  count += min(a[x],b[y])
  if count > k:
    break
    
print(k // count)

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

count = 0

for i in zip(a,b):
  count += min(a[i],b[i])
  if count > k:
    break
    
print(k // count)

Buggy submission (verdict: Runtime Error):
a = input()

print(a + a ** 2 + a ** 3)
Problem p02639 (python)

Fixed submission:
a,b,c,d,e = (int(x) for x in input().split())

if a == 0:
  print(1)
  
elif b == 0:
  print(2)
  
elif c == 0:
  print(3)
  
elif d == 0:
  print(4)
  
else:
  print(5)

Buggy submission (verdict: Runtime Error):
x,y = map(int, input().split())

for i in range(x + 1):
  legs = 2 * i + 4 * (x - i)
  
  if legs == y:
    print("Yes")
    break
    
  else:
    print("No")
Problem p02657 (python)

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

print(a * b)

Buggy submission (verdict: Runtime Error):
n = int(input())

sum = 0
i = 0

for i in range(n+1):
  x = int(input())
  sum *= x
  i += 1
  
  if sum > 10 ** 18:
    print(-1)
    break
    
print(sum)
Problem p02663 (python)

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

wake = a * 60 + b
gobed = c * 60 + d

time = gobed - wake

if time > e:
  print(time - e)
elif time == e:
  print(0)

Buggy submission (verdict: Runtime Error):
s = input()


count = 0
for i in range(len(s)):
  if s[i] == "P" && s[i + 1] == "D":
    count += 1
  elif s[i] == "D":
    count += 1
  elif s[i] == "?" && s[i + 1] == "D":
    count += 1
    
print(count)
Problem p02730 (python)

Fixed submission:
s = input()
n = len(s)

sa = s[:(n - 1) // 2]
sb = s[(n + 1) // 2:]

if s == s[::-1] and sa == sa[::-1] and sb == sb[::-1]:
  print("Yes")
  
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = input()
n = len(s)

sa = s[:(n - 1) // 2]
sb = s[(n + 1) // 2:]

if s == s[::-1] and a == a[::-1] and b == b[::-1]:
  print("Yes")
  
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = input()
n = len(s)

sa = s[:(n-1) // 2]
sb = s[(n + 1) // 2:]

if s == s[::-1] and a == a[::-1] and b == b[::-1]:
  print("Yes")
  
else:
  print("No")
Problem p02921 (python)

Fixed submission:
s = input()
t = input()
count = 0

for i in range(3):
  if s[i] == t[i]:
    count += 1

print(count)

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

res = b // a + 1

if a == b:
  res = 1
  
print(res)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()


for i in range 3:
  if s[i] == t[i]:
    count += 1
    print(count)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()

for i in range len(s):
  if s[i] == t[i]:
    count +=
    print(count)
    
  else:
    print(0)
Problem p03288 (python)

Fixed submission:
r = int(input())

if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")

Buggy submission (verdict: Runtime Error):
r = input()

if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")
Problem p03369 (python)

Fixed submission:
s = input()

count = 700

for i in s:
  if i == "o":
    count += 100
    
print(count)

Buggy submission (verdict: Runtime Error):
s = input()

count = 700

for i in range(s):
  if i == "o":
    count += 100
    
print(count)

Buggy submission (verdict: Runtime Error):
s = input()

count = 0

for i in range(s):
  if i == "o":
    count +=
    
print(700 + count * 100)

Buggy submission (verdict: Runtime Error):
s = input()

c = 700

for i in range(3):
  if i == ○:
    c += 100
print(c)

Buggy submission (verdict: Runtime Error):
s = str(input())

for i in range(s):
  if i == "○":
    count +=
    
print(700 + count * 100)
Problem p03370 (python)

Fixed submission:
n,x = map(int,input().split())
m = list(int(input()) for i in range(n))

print((x - sum(m)) // min(m) + n)

Buggy submission (verdict: Runtime Error):
n,x = map(int,input())
m = list(int(input()) for i in range(n))

print((x - sum(m)) // min(m) + n)

Buggy submission (verdict: Runtime Error):
n,x = map(int,input())
m = list(int(input()) for i in range(n))

print(x - sum(m) // min(m) + n)
Problem p03399 (python)

Fixed submission:
a,b,c,d = [int(input()) for i in range(4)]

print(min(a,b) + min(c,d))

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

print(min(a,b) + min(c,d))

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

print(map(a,b) + map(c,d))

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

if a >= b && c >= d:
  print(a + c)
  
else:
  print(b + d)
Problem p03456 (python)

Fixed submission:
import sys
a,b = map(str,input().split())
c = int(a + b)

for i in range(1,400):
    if c == i**2:
        print('Yes')
        sys.exit()
print('No')

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

c = int(a + b)

import math

if math.sprt(c).isdigit() == True:
  print("Yes")
  
else:
  print("No")
Problem p02621 (python)

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

Buggy submission (verdict: Runtime Error):
from collections import deque
from decimal import *
n,m,k = [Decimal(int(e)) for e in input().split()]
As = deque([Decimal(int(e)) for e in input().split()])
Bs = deque([Decimal(int(e)) for e in input().split()])
result = 0
while True:
    if (not As) and (not Bs):
        break
        
    if (not As) and (Bs[0]>k):
        break
    if (not As) and (Bs[0]<=k):
        k = k-Bs.popleft()
        result = result + 1
        continue
        
    if (not Bs) and (As[0]>k):
        break
    if (not Bs) and (As[0]<=k):
        k = k-As.popleft()
        result = result + 1
        continue
    
    
    if As[0]+As[1] <= Bs[0]+Bs[1]:
        min_reduce = As.popleft()
    else:
        min_reduce = Bs.popleft()

    if min_reduce > k:
        break
    else:
        k = k-min_reduce
        result = result + 1
print(result)
Problem p02657 (python)

Fixed submission:
a,b = [int(e) for e in input().split(" ")]
print(a*b)

Buggy submission (verdict: Runtime Error):
n = input()
l = [int(e) for e in input().split(" ")]
res = 1
for e in l:
    res = res*e
if res > 1e+18:
    print("-1")
else:
    print(res)
Problem p02765 (python)

Fixed submission:
n,r = map(int,input().split())
if n < 10:
    print(r+(100*(10-n)))
else:
    print(r)

Buggy submission (verdict: Runtime Error):
n,r = input().split()

if n<10:
	print(r-100*(10-n))
else:
	print(r)
Problem p02783 (python)

Fixed submission:
from math import ceil

a,b = map(int,input().split())

print(ceil(a/b))

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

print(ceil(a,b))
Problem p02817 (python)

Fixed submission:
b,a = input().split()
print(''.join([a,b]).strip())

Buggy submission (verdict: Runtime Error):
b,a = input().split()
print(''.join([a,b].strip())
Problem p02885 (python)

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

print(0 if b*2>=a else a-b*2)

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

Fixed submission:
n = int(input())
a = [int(e) for e in input().split()]

ans ='No' if max(a)>= sum([e for e in a])-max(a) else 'Yes'
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(e) for e in input().split()]

ans ='Yes' if max(a)>= sum([e for e in a]-max(a)) else 'No'
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(e) for e in input().split()]

print('Yes' if max(a)>= sum([e for e in a]-max(a)) else 'No')
Problem p03731 (python)

Fixed submission:
n,t = list(map(int,input().split()))
ts = list(map(int,input().split()))
print(sum([min(t, next - prev) for prev, next in zip(ts, ts[1:])], t))

Buggy submission (verdict: Runtime Error):
n,t=list(input())
ts = list(input())
print(sum([min(t, next - prev) for prev, next in zip(ts, ts[1:])], t))
Problem p02621 (python)

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

Buggy submission (verdict: Runtime Error):
[N,M,K]=map(int,(input().split()))
A=[0]*N
B=[0]*M
A=list(map(int,input().split()))
B=list(map(int,input().split()))



Kc=K
bookc=0

Ai=0
Bi=0

while Kc>0:
    if Ai<N:
        if Bi<M:
            if A[Ai]<=B[Bi] and A[Ai]<=Kc:
                bookc+=1
                Kc-=A[Ai]
                Ai+=1

            elif B[Bi]<=Kc:
                bookc+=1
                Kc-=B[Bi]
                Bi+=1
            else:
                break
        elif A[Ai]<=Kc:
            bookc+=1
            Kc-=A[Ai]
            Ai+=1
        else:
            break
    elif Bi<M:
        if B[Bi]<=Kc:
            bookc+=1
            Kc-=B[Bi]
            Bi+=1
        else:
            break
    if Ai==N and Bi==M:
        break

print(bookc)
Problem p02621 (python)

Fixed submission:
a = int(input())

ans = a + a*a + a*a*a
ans = int(ans)

print(ans)

Buggy submission (verdict: Runtime Error):
import math
n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
a.append(10**10)
b.append(10**10)

if a[0]>k and b[0]>k:
  print(0)
else:
  if sum(a)+sum(b)<=k:
    print(n+m)
  else:
    ans=0
    time=0
    for i in range(n+m):
      ans += 1    
      if a[0]<=b[0]:
        time+=a.pop(0)
      else:
        time+=b.pop(0)
      
      if time>k:
        break
    print(ans-1)
Problem p02663 (python)

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

time = c*60+d-a*60-b

if time>=e:
  print(time-e)
else:
  print(0)

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

time = c*60+d-a*60-b

if time>=e:
  print(time-e)
else:
  print(0)
Problem p02696 (python)

Fixed submission:
a,b,n=map(int,input().split())
x=min(b-1,n)
print((a*x)//b-a*(x//b))

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

x = list()
if n<=b:
  for i in range(n+1):
    y = int(a*i/b) - a*int(i/b)
    x.append(y)
else:
  for i in range(b):
    y = int(a*i/b) - a*int(i/b)
    x.append(y)
x = sort(x)
print(x[-1])

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

x = list()
for i in range(n):
  y = int(a*(i+1)/b) - a*int((i+1)/b)
  x.insert(bisect.bisect_left(x,y))

print(x[-1])
Problem p02700 (python)

Fixed submission:
import math
a,b,c,d = map(int,input().split())

a = math.ceil(a/d)
b = math.ceil(c/b)
if a<b:
  print('No')
else:
  print('Yes')

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

a = math.ceil(a//d)
b = math.ceil(b//c)
if = a<=b:
  print('Yes')
else:
  print('No')
Problem p02717 (python)

Fixed submission:
X,Y,Z = map(int,input().split())

print(str(Z) + " " + str(X) + " " + str(Y))

Buggy submission (verdict: Runtime Error):
line = input().split

X = line[0]
Y = line[1]
Z = line[2]

print( str(Y) + " " + str(X) + " " + str(Z) )

Buggy submission (verdict: Runtime Error):
line = input().split

X = line[0]
Y = line[1]
Z = line[2]

print( Z + " " + X + " " + Y )

Buggy submission (verdict: Runtime Error):
line = input().split

X = line[0]
Y = line[1]
Z = line[2]

print( str(Y) + " " + str(X) + " " + str(Z) )

Buggy submission (verdict: Runtime Error):
line = input().split

X = line[0]
Y = line[1]
Z = line[2]

print( Y + " " + X + " " + Z )
Problem p02730 (python)

Fixed submission:
s = input()
n = len(s) // 2

if s[:n] == s[-n:]:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
s = str(input())
k = len(s)

cnt=0
for i in range(k):
  if s[i]=!s[int((n+1)/2)-i]:
    cnt+=1
  if s[int((n+3)/2)+i]=!s[int((3*n+3)/2)-i]:
    cnt+=1

if cnt==0:
  print('Yes')
else:
  print('No')
Problem p02801 (python)

Fixed submission:
c=input()
al='abcdefghijklmnopqrstuvwxyz'
for x in range(26):
    if c==al[x]:
        print(al[x+1])

Buggy submission (verdict: Runtime Error):
c = str(input())

alp = abcdefghijklmnopqrstuvwxyz

k=0
while k<25:
  if c == alp[k]:
    print(alp[k+1])
  else:
    k+=1
Problem p02817 (python)

Fixed submission:
s,t = map(str,input().split())

print(t+s)

Buggy submission (verdict: Runtime Error):
s,t =,map(str,input().split())

x = str(t) + str(s)

print(x)

Buggy submission (verdict: Runtime Error):
s,t =,map(str,input().split())

x = t+s

print(x)
Problem p02909 (python)

Fixed submission:
s = str(input())

w = ['Sunny','Cloudy','Rainy']

print(w[( w.index(s)+1) %3] )

Buggy submission (verdict: Runtime Error):
s = str(input())

w = ['Sunny','Cloudy','Rainy']

print(w[w.index(s)+1])
Problem p02981 (python)

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

print(min(n*a,b))

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

Buggy submission (verdict: Runtime Error):
N = input()
A = input()
B = input()
if ( N*A <= B ){
	print(N*A)
}
else print(B)
Problem p03029 (python)

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

print(int((3*a+p)/2))

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

print int((3*a+p)/2)
Problem p03071 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a<b:
  print(2*b-1)
elif a=b:
  print(2*a)
else:
  print(2*a-1)