Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
H,W=map(int,input().split())
white=0
S=[]
for _ in range(H):
    s=list(input())
    white+=s.count('.')
    S.append(s)

f=[[0 for i in range(W)] for j in range(H)]

def path(i,j):
    s=S[i][j]
    q=[]
    for k in [1,-1]:
        if 0<=i+k<H and f[i+k][j]==0 and S[i+k][j]==s:
            q.append((i+k,j))
        if 0<=j+k<W and f[i][j+k]==0 and S[i][j+k]==s:
            q.append((i,j+k))
    return q

flag=False
if S[0][0]=='.' and S[-1][-1]=='.':
    que = path(0,0)
else:
    que = []
f[0][0]=1

l=1
while len(que)>0 and flag==False:
    l+=1
    tmp=[]
    for q in que:
        tmp+=path(*q)
        f[q[0]][q[1]]=1
        if q==(H-1,W-1):
            flag=True
    que=tmp

if flag:
    print(white-l)
else:
    print(-1)


Fixed submission:
N=int(input())
A=int(input())
if N%500<=A:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Time Limit Exceeded):
H,W=map(int,input().split())
white=0
S=[]
for _ in range(H):
    s=list(input())
    white+=s.count('.')
    S.append(s)

f=[[0 for i in range(W)] for j in range(H)]

def path(i,j):
    s=S[i][j]
    q=[]
    for k in [1,-1]:
        if 0<=i+k<H and f[i+k][j]==0 and S[i+k][j]==s:
            q.append((i+k,j))
        if 0<=j+k<W and f[i][j+k]==0 and S[i][j+k]==s:
            q.append((i,j+k))
    return q

flag=False
if S[0][0]=='.' and S[-1][-1]=='.':
    que = path(0,0)
else:
    que = []
f[0][0]=1

l=1
while len(que)>0 and flag==False:
    l+=1
    tmp=[]
    for q in que:
        tmp+=path(*q)
        f[q[0]][q[1]]=1
        if q==(H-1,W-1):
            flag=True
    que=tmp

if flag:
    print(white-l)
else:
    print(-1)


Fixed submission:
H,W=map(int,input().split())
white=0
S=[]
for _ in range(H):
    s=list(input())
    white+=s.count('.')
    S.append(s)

f=[[0 for i in range(W)] for j in range(H)]

def path(i,j):
    q=[]
    for k in [1,-1]:
        if 0<=i+k<H and f[i+k][j]==0 and S[i+k][j]=='.':
            q.append((i+k,j))
        if 0<=j+k<W and f[i][j+k]==0 and S[i][j+k]=='.':
            q.append((i,j+k))
    return q

flag=False
if S[0][0]=='.' and S[-1][-1]=='.':
    que = path(0,0)
else:
    que = []
f[0][0]=1

l=1
while len(que)>0 and flag==False:
    l+=1
    tmp=[]
    for q in que:
        if f[q[0]][q[1]]==0:
            tmp+=path(*q)
            f[q[0]][q[1]]=1
            if q==(H-1,W-1):
                flag=True
        que=tmp

if flag:
    print(white-l)
else:
    print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())

Dlist = [[0 for i in range(N+1)] for j in range(N+1)]

L2Rdic = {i:[] for i in range(N+1)}
R2Ldic = {i:[] for i in range(N+1)}

flag=True

for _ in range(M):
    L,R,D=map(int,input().split())

    if Dlist[L][R]==0:
        Dlist[L][R]=D
        L2Rdic[L].append(R)
        R2Ldic[R].append(L)
    elif Dlist[L][R]!=D:
        flag=False

    for r in L2Rdic[R]:
        if Dlist[L][r]==0:
            Dlist[L][r]=D+Dlist[R][r]
            L2Rdic[L].append(r)
            R2Ldic[r].append(L)
        elif Dlist[L][r]!=D+Dlist[R][r]:
            flag=False

    for l in R2Ldic[L]:
        if Dlist[l][R]==0:
            Dlist[l][R]=Dlist[l][L]+D
            L2Rdic[l].append(R)
            R2Ldic[R].append(l)
        elif Dlist[l][R]!=Dlist[l][L]+D:
            flag=False

    if flag==False:
        print('No')
        exit()
print('Yes')


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

L2R = {i:[] for i in range(N+1)}
R2L = {i:[] for i in range(N+1)}

for _ in range(M):
    L,R,D=map(int,input().split())
    L2R[L].append((R,D,L))
    R2L[R].append((L,-D,R))

x = [0 for i in range(N+1)]
f = [True for i in range(N+1)]

for i in range(1,N+1):
    if f[i]:
        f[i]=False
        x[i]=i
        que=L2R[i]+R2L[i]
        while len(que)>0:
            tmp = []
            for end,d,begin in que:
                if f[end]:
                    f[end]=False
                    x[end]=d+x[begin]
                    tmp+=L2R[end]+R2L[end]
                elif x[end]!=d+x[begin]:
                    print('No')
                    exit()
            que=tmp
print('Yes')
Buggy python submission (verdict: Runtime Error):
N,H=map(int,input().split())

d=[]
for _ in range(N):
    d.append(list(map(int,input().split())))

d.sort(key=lambda x:x[0],reverse=True)
a = d[0][0]

d.sort(key=lambda x:x[1],reverse=True)

i=0
dam=0
b_damage=[]

while d[i][1]>a:
    dam+=d[i][1]
    b_damage.append(dam)
    i+=1
    if i==N:
        break

r = H//a + 1
l = 0

def damage(k):
    if k<len(b_damage)+1:
        return b_damage[k-1]
    else:
        l=k-len(b_damage)
        return b_damage[-1]+a*l


while r-l!=1:
    mid=(r+l)//2
    dam = damage(mid)
    if dam >= H:
        r=mid
    else:
        l=mid
print(r)




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

d=[]
for _ in range(N):
    d.append(list(map(int,input().split())))

d.sort(key=lambda x:x[0],reverse=True)
a = d[0][0]

d.sort(key=lambda x:x[1],reverse=True)

i=0
dam=0
b_damage=[]

while d[i][1]>a:
    dam+=d[i][1]
    b_damage.append(dam)
    i+=1
    if i==N:
        break

r = H//a + 1
l = 0

def damage(k):
    if k<len(b_damage)+1:
        return b_damage[k-1]
    elif len(b_damage)==0:
        return a*k
    else:
        l=k-len(b_damage)
        return b_damage[-1]+a*l


while r-l!=1:
    mid=(r+l)//2
    dam = damage(mid)
    if dam >= H:
        r=mid
    else:
        l=mid
print(r)
Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
ans=0
for i in range(1,N+1):
  s=0
  for j in str(i):
    s+=int(j)
  if a<=s<=b:
    ans+=1
print(ans)

Fixed submission:
n,a,b=map(int,input().split())
ans=0
for i in range(1,n+1):
  s=0
  for j in str(i):
    s+=int(j)
  if a<=s<=b :
    ans+=i
print(ans)
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
l=[]
for a in A:
  b=0
  while a%2==0:
    a//=2
    b+=1
  l.append(b)
print(min(b))

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
l=[]

for a in A:
    b=0
    while a%2==0:
        a//=2
        b+=1
    l.append(b)
print(min(l))

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
l=[]
for a in A:
  b=0
  while a%2==0:
    a//=2
  	b+=1
  l.append(b)
print(min(l))

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
l=[]

for a in A:
    b=0
    while a%2==0:
        a//=2
        b+=1
    l.append(b)
print(min(l))
Buggy python submission (verdict: Runtime Error):
Ns=input()
N=int(N)
fX=0
for s in Ns:
  fX+=int(s)
if N%fX==0:
  print('Yes')
else:
  print('No')

Fixed submission:
Ns=input()
N=int(Ns)
fX=0
for s in Ns:
  fX+=int(s)
if N%fX==0:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
N=int(input())
C=[]
S=[]
F=[]
from math import ceil
for _ in range(N-1):
    c,s,f=map(int,input().split())
    C.append(c)
    S.append(s)
    F.append(f)
ans=[]
for i in range(0,N-1):
    t=S[i]+C[i]
    sta=i+1
    while sta<N-1:
        if t<=S[sta]:
            t=S[sta]+C[sta]
        else:
            k=ceil((t-S[sta])/F[sta])
            t=S[sta]+k*F[sta]+C[sta]
        sta+=1
    ans.append(t)
for a in ans:
    print(a)
print(0)


Fixed submission:
N=int(input())
F=[list(map(int,input().split())) for _ in range(N)]
P=[list(map(int,input().split())) for _ in range(N)]
from itertools import product
gain=[]
for p in product([0,1,2,3],repeat=5):
    C=[0 for i in range(N)]
    for i in range(5):
        for j in range(N):
            am=F[j][2*i]
            pm=F[j][2*i+1]
            if p[i]==1:
                C[j]+=am
            elif p[i]==2:
                C[j]+=pm
            elif p[i]==3:
                C[j]+=am+pm
    g=0
    for j in range(N):
        g+=P[j][C[j]]
    
    flag=False
    for i in range(5):
        if p[i]!=0:
            flag=True
    if flag:
        gain.append(g)

print(max(gain))
Buggy python submission (verdict: Time Limit Exceeded):
def ans(N):
    if N==0:
        return 2
    elif N==1:
        return 1
    else:
        return ans(N-1)+ans(N-2)

N=int(input())
print(ans(N))


Fixed submission:
def memoize(f):
    cache={}
    def helper(*args):
        if args not in cache:
            cache[args] = f(*args)
        return cache[args]
    return helper

@memoize
def ans(N):
    if N==0:
        return 2
    elif N==1:
        return 1
    else:
        return ans(N-1)+ans(N-2)

N=int(input())
print(ans(N))

Buggy python submission (verdict: Runtime Error):
def memoize(f):
  cache={}
    def helper(*args):
      if args not in cache:
        cache[args] = f(*args)
        return cache[args]
      return helper

@memoize
def ans(N):
  if N==0:
    return 1
  elif N==1:
    return 2
  else:
    return ans(N-1)+ans(N-2)
  
N=int(input())
print(ans(N))

Fixed submission:
def memoize(f):
    cache={}
    def helper(*args):
        if args not in cache:
            cache[args] = f(*args)
        return cache[args]
    return helper

@memoize
def ans(N):
    if N==0:
        return 2
    elif N==1:
        return 1
    else:
        return ans(N-1)+ans(N-2)

N=int(input())
print(ans(N))
Buggy python submission (verdict: Runtime Error):
X,Y=list(input())
if X==Y:
  print('=')
elif X<Y:
  print('<')
else:
  print('>')

Fixed submission:
X,Y=input().split()
if X==Y:
  print('=')
elif X<Y:
  print('<')
else:
  print('>')

Buggy python submission (verdict: Runtime Error):
X,Y=map(int,input().split())
if X==Y:
  print('=')
elif X<Y:
  print('<')
else:
  print('>')

Fixed submission:
X,Y=input().split()
if X==Y:
  print('=')
elif X<Y:
  print('<')
else:
  print('>')
Buggy python submission (verdict: Runtime Error):
def num2(n):
  ans=0
  while n%2==0:
    ans+=1
    n//=2
  return ans

l=[[i,num2(i)] for i in range(1,N+1)]
l.sort(key=lambda x:x[1])

print(l[0][0])

Fixed submission:
def num2(n):
  ans=0
  while n%2==0:
    ans+=1
    n//=2
  return ans
N=int(input())
l=[[i,num2(i)] for i in range(1,N+1)]
l.sort(key=lambda x:x[1],reverse=True)

print(l[0][0])
Buggy python submission (verdict: Runtime Error):
H,W=map(int,input().split())
N=int(input())
a=list(map(int,input().split()))

ans=''
for i in range(N):
    ans+=str(i+1)*a[i]

for j in range(H):
    s=ans[W*j:W*(j+1)]
    if j%2==0:
        print(' '.join(s))
    else:
        print(' '.join(s[::-1]))

Fixed submission:
N,M=map(int,input().split())
from collections import defaultdict

d1=defaultdict(int)
d2=defaultdict(int)

for _ in range(M):
    a,b=map(int,input().split())
    if a==1:
        d1[b]=1
        if d2[b]==1:
            print('POSSIBLE')
            exit()
    if b==N:
        d2[a]=1
        if d1[a]==1:
            print('POSSIBLE')
            exit()
print('IMPOSSIBLE')
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
l=list(map(int,input().split()))
from itertools import combinations

ans=0
for c in combinations(range(N),K):
  ans=max(ans,sum([l[i] for i in c]))
print(ans)

Fixed submission:
N,K=map(int,input().split())
l=sorted(list(map(int,input().split())),reverse=True)

print(sum(l[:K]))
Buggy python submission (verdict: Runtime Error):
if sotred(list(map(int,input().split())))==[5,5,7]:
  print('YES')
else:
  print('NO')

Fixed submission:
if sorted(list(map(int,input().split())))==[5,5,7]:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
#ABC176
#D - Wizard in Maze

h,w=map(int,input().split())
ch,cw=map(int,input().split())
dh,dw=map(int,input().split())
b=[ch-1,cw-1]
a,c,d,f=[],[],[],[]
c.append(b)
d.append(b)
y=0

for i in range(h):
  a.append(list(input()))

warp=0

def def1():
  global c,d
  if 0<=ch1<h and 0<=cw1<w:
    e=[ch1,cw1]
    if a[ch1][cw1]=="." and d not in e:
      c.append(e)
      d.append(e)
def def2():
  global f
  if 0<=ch2<h and 0<=cw2<w:
    e=[ch2,cw2]
    if a[ch2][cw2]=="." and f not in e:
      f.append(e)

while len(c)>0 or len(f)>0 or y==0:
  while len(c)>0 or y==0:
    ch,cw=c[0]
    if ch==dh-1 and cw==dw-1:
        y=1
    if a[ch][cw]==".":
      a[ch][cw]=str(warp)
    c.pop(0)
    ch1,cw1=ch-1,cw
    def1()
    ch1,cw1=ch+1,cw
    def1()
    ch1,cw1=ch,cw-1
    def1()
    ch1,cw1=ch,cw+1
    def1()

    for i in range(5):
      ch2=ch-2+i
      for j in range(5):
        cw2=cw-2+j
        def2()
  for i in f:
    if i not in d:
      c.append(i)
  f=[]
  warp=warp+1
z=a[dh-1][dw-1]
if z==".":
  print(1)
else:
  print(z)

Fixed submission:
n,x,t=map(int,input().split())
a=n//x

if x*a!=n:
  a=a+1

print(a*t)
Buggy python submission (verdict: Runtime Error):
a=int(input())

b=input()
c=a-1
d=0

for i in range(c):
  for j1 in range(c-i):
    j=j1+i+1

    if b[i]!=b[j]:
      for k1 in range(c-j):
        k=k1+j+1
        #print(i,j,k)

        if b[k]!=b[i] and b[k]!=b[j]:
          if j-i != k-j:
            d=d+1
print(d)

Fixed submission:
a=input()

if "7" in a:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if b * d >= 0:
  print(b * d)
else:
  z = []

  for x in range(a, b + 1):
    for y in range(c, d + 1):
      z.append(x * y)
print(max(z))

Fixed submission:
a = int(input())
if a == 0:
  print(1)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if b * d >= 0:
  print(b * d)
else:
  z = []

  for x in range(a, b + 1):
    for y in range(c, d + 1):
      z.append(x * y)
print(max(z))

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

Buggy python submission (verdict: Time Limit Exceeded):
a, b, c, d = map(int, input().split())
z = []

for x in range(a, b + 1):
  for y in range(c, d + 1):
    z.append(x * y)
print(max(z))

Fixed submission:
a, b, c, d = map(int, input().split())
print(max(a * c, a * d, b * c, b * d))
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
if a / d > c / d:
  print('Yes')
else:
  print('No')


Fixed submission:
a, b = map(int, input().split())
if a > b:
  print('safe')
else:
  print('unsafe')

Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
c / b 
a / d
if a / d > c / d:
  print('Yes')
else:
  print('No')

Fixed submission:
a, b = map(int, input().split())
if a > b:
  print('safe')
else:
  print('unsafe')
Buggy python submission (verdict: Runtime Error):
a = input()
if a.count(7) == 0:
  print('Yes')
else:
  print('No')

Fixed submission:
a = input()
if a.count('7') == 0:
  print('No')
else:
  print('Yes')
Buggy python submission (verdict: Runtime Error):
a, b, c = (int, input().split())
print(c, a, b)

Fixed submission:
a, b, c = map(int, input().split())
print(c, a, b)
Buggy python submission (verdict: Runtime Error):
print(x * len(input()))

Fixed submission:
print('x' * len(input()))
Buggy python submission (verdict: Runtime Error):
a, b = map(input().split())
print(b + a)

Fixed submission:
a, b = input().split()
print(b + a)
Buggy python submission (verdict: Runtime Error):
a = int(input())
if a % 1 == 0 or a % 2 == 0 or a % 3 == 0 or a % 4 == 0 or a % 5 == 0 or a % 6 == 0 or a % 7 == 0 or a % 8 == 0 or a % 9 == 0:
  print('Yes')
else:
  print('No')

Fixed submission:
a, b = map(int, input().split())
if a < 10 and b < 10:
  print(a * b)
else:
  print('-1')
Buggy python submission (verdict: Runtime Error):
a = input()
if a[6] > 4:
  print('TBD')
elif a[6] < 3:
  print('heisei')
else:
  if a[8] < 2:
    print('heisei')
  else:
    if a[9] > 0:
      print('heisei')
    else:
      print('TBD')
 

Fixed submission:
a = input()
if int(a[5]) == 1:
  print('TBD')
else:
  if int(a[6]) > 4:
    print('TBD')
  else:
    print('Heisei')
Buggy python submission (verdict: Runtime Error):
a = int(input())
if a == 22:
  print('Christmas Eve Eve Eve')
elif a == 23:
  print('Christmas Eve Eve')
elif a == 24:
  print('Christmas Eve')
else a == 25:
  print('Christmas')


Fixed submission:
a = int(input())
if a == 22:
  print('Christmas Eve Eve Eve')
elif a == 23:
  print('Christmas Eve Eve')
elif a == 24:
  print('Christmas Eve')
elif a == 25:
  print('Christmas')
Buggy python submission (verdict: Runtime Error):
a = input()
pirnt(a.replace('1', '9'))

Fixed submission:
a = input()
print(a.replace('1', 'x').replace('9', '1').replace('x', '9'))
Buggy python submission (verdict: Runtime Error):
a = input
print(a.count('+') - a.count('-'))

Fixed submission:
a = input()
print(a.count('+') - a.count('-'))
Buggy python submission (verdict: Runtime Error):
a, b = map(int, inuput().split())
if a >= 8 and b => 8:
  print('Yay!')
else:
  print(':(')

Fixed submission:
a, b = map(int, input().split())
if a <= 8 and b <= 8:
  print('Yay!')
else:
  print(':(')
Buggy python submission (verdict: Runtime Error):
a = input()
print(700 + int(input()).count('o'))

Fixed submission:
print(700 + int(input().count('o')) * 100)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
print(a[0] + b[1] + c[2])

Fixed submission:
print(input()[0] + input()[1] + input()[2])
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
print(x = a - b // c)


Fixed submission:
a = int(input())
b = int(input())
c = int(input())
print((a - b) % c)
Buggy python submission (verdict: Runtime Error):
a = input()
a[3] = '8'
print(a)


Fixed submission:
a = input()
print('2018' + a[4:])

Buggy python submission (verdict: Runtime Error):
a = input()
a[4] = '8'
print(a)

Fixed submission:
a = input()
print('2018' + a[4:])
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
import math
print(math.ceil(a + b / 2)

Fixed submission:
a, b = map(int, input().split())
import math
print(math.ceil((a + b) / 2))
Buggy python submission (verdict: Runtime Error):
a = input()
print(a.count(1))

Fixed submission:
print(input().count('1'))
Buggy python submission (verdict: Runtime Error):
a, b = input()
if a == b:
  print('=')
elif a > b:
  print('>')
else:
  print('<')

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

Fixed submission:
a = int(input())
b = int(input())
print(a * a - b)

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
x = a * a
print(x - b)


Fixed submission:
a = int(input())
b = int(input())
print(a * a - b)

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input()split())
x = a * a
print(x - b)

Fixed submission:
a = int(input())
b = int(input())
print(a * a - b)
Buggy python submission (verdict: Runtime Error):
a = input()
if 9 in a:
  print('Yes')
else:
  print('No')

Fixed submission:
a = input()
if '9' in a:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
a = int(input())
if a == a[::-1]:
  print('Yes')
else:
  print('No')

Fixed submission:
a = input()
if a[0] == a[2]:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
a = int(input())
if a == a[::-1]:
  print('Yes')
else:
  print('No')

Fixed submission:
a = input()
if a[0] == a[2]:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
a = input()
print(s[0] + str(len(s) - 2) + s[-1])

Fixed submission:
a = input()
print(a[0] + str(len(a) - 2) + a[-1])
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
x = a + b
if x % 3 == 0:
  print('Possible')
else('Impossidle')

Fixed submission:
a, b = map(int, input().split())
if (a + b) % 3 == 0 or b % 3 == 0 or a % 3 == 0:
    print("Possible")
else:
    print("Impossible")
Buggy python submission (verdict: Runtime Error):
a, b, c = map(input().split())
int(x) = a + b + c
if x % 4 == 0:
  print('YES')
else:
  print('NO')

Fixed submission:
a, b, c = map(int, input().split())
x = str(a) + str(b) + str(c)
if int(x) % 4 == 0:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
a, b, c = input().split()
print((s1[0] + s2[0] + s3[0]).upper())

Fixed submission:
a, b, c = input().split()
print((a[0] + b[0] + c[0]).upper())
Buggy python submission (verdict: Runtime Error):
a, b, c, d = int(input().split())
x = a * b
y = c * d
if x == y:
  print(x)
elif x > y:
  print(x)
elif y > x:
  print(y)

Fixed submission:
a, b, c, d = map(int, input().split())
x = a * b
y = c * d
if x == y:
  print(x)
elif x > y:
  print(x)
elif y > x:
  print(y)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(input().split())
a = int(a)
c = int(c)
if b == '+':
  print(a + c)
else:
  print(a - c)


Fixed submission:
a, b, c = input().split()
a = int(a)
c = int(c)
if b == '+':
  print(a + c)
else:
  print(a - c)

Buggy python submission (verdict: Runtime Error):
a, b, c = map(input().split())
a = int(a)
c = int(c)
if b == +:
  print(a + c)
else:
  print(a - c)

Fixed submission:
a, b, c = input().split()
a = int(a)
c = int(c)
if b == '+':
  print(a + c)
else:
  print(a - c)

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if b == +:
  print(a + c)
else:
  print(a - c)


Fixed submission:
a, b, c = input().split()
a = int(a)
c = int(c)
if b == '+':
  print(a + c)
else:
  print(a - c)

Buggy python submission (verdict: Runtime Error):
a, b, c = map(input().split())
if b == +:
  print(a + c)
else:
  print(a - c)

Fixed submission:
a, b, c = input().split()
a = int(a)
c = int(c)
if b == '+':
  print(a + c)
else:
  print(a - c)

Buggy python submission (verdict: Runtime Error):
a = input()
print(int(a))


Fixed submission:
a, b, c = input().split()
a = int(a)
c = int(c)
if b == '+':
  print(a + c)
else:
  print(a - c)

Buggy python submission (verdict: Runtime Error):
a = input()
print(int(input()))

Fixed submission:
a, b, c = input().split()
a = int(a)
c = int(c)
if b == '+':
  print(a + c)
else:
  print(a - c)
Buggy python submission (verdict: Runtime Error):
n = input()
print(n * (n + 1) / 2)

Fixed submission:
n = int(input())
print (n * (n + 1) // 2)
Buggy python submission (verdict: Time Limit Exceeded):
MOD = 10**9+7

n = int(input())
a = list(map(int, input().split()))

# print(n, a)

res = 0

for i in range(0, n-1):
    for j in range(i+1, n):
        # print(a[i], a[j], a[i]*a[j])
        res += a[i]*a[j]
   
print(res%MOD)

Fixed submission:
MOD = 10**9+7

n = int(input())
a = list(map(int, input().split()))

a1 = sum(a)
a2 = sum([x*x for x in a])

print(((a1**2-a2)//2)%MOD)
Buggy python submission (verdict: Time Limit Exceeded):
a = input()
b = input()

cnt = 0

i=0

while(i<len(a)):
  if(a[i]!=b[i]):
    cnt+=1
  cnt+=1

print(cnt)

Fixed submission:
a = input()
b = input()

cnt = 0

i=0

while(i<len(a)):
    if(a[i]!=b[i]):
      cnt+=1
    i+=1

print(cnt)
Buggy python submission (verdict: Runtime Error):
k = int(input())
a,b = map(int, input().split())
bool flag=true
for i in range(a,b+1):
  if(a%k==0):
    print("OK")
    flag=false
  	break
if(flag):
   print("NG")

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

flag=1
while(a<=b):
    if(a%k==0):
        print("OK")
        flag=0
        break
    a+=1
if(flag):
	print("NG")
Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())
p = 100
cnt=0
while(p!=a):
  cnt+=1
print(cnt)

Fixed submission:
a = int(input())
p = 100
cnt=0
while(1):
  cnt+=1
  p+=p//100
  if(p>=a):
    break
print(cnt)
Buggy python submission (verdict: Runtime Error):
th, ts, ah,as  = map(int, input().spilt())
turn = 1
#1 represent takashi monster turn
#0 represent aoki monster turn
while(1):
  if(turn):
    ah-=ts
    if(ah<=0):
      print("No")
      break
  else:
    th-=as
    if(th<=0):
      print("Yes")
      break
  turn^=1
 

Fixed submission:
th, tMon, ah, aMon  = map(int, input().split())
turn = 1
#1 represent takashi monster turn
#0 represent aoki monster turn
while(1):
  if(turn):
    ah-=tMon
    if(ah<=0):
      print("Yes")
      break
  else:
    th-=aMon
    if(th<=0):
      print("No")
      break
  turn^=1
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
if(a<9 && b<9):
  print("Yay!")
else:
  print(":(")

Fixed submission:
a,b = map(int, input().split())
if(a<9 and b<9):
    print("Yay!")
else:
    print(":(")