Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
x,y,l=0,5,len(s)
for _ in range(10**5):
  if x>=l-7:
    if x==l-7 and s[x:l]=='dreamer':
      print('YES')
    elif x==l-6 and s[x:l]=='eraser':
      print('YES')
    elif x==l-5 and (s[x:l]=='dream' or s[x:l]=='erase'):
      print('YES')
    else:
      print('NO')
    exit()
    
  if s[x:y]=='erase':
    x=y+1 if s[y]=='r' else y
    y=x+5
  elif s[x:y]=='dream':
    x=y+2 if s[x:y+2]=='er' else y
    y=x+5
  else:
    print('NO')
    exit()

Fixed submission:
s=input()
x,y,l=0,5,len(s)
for _ in range(10**5):
  if x>=l-7:
    if x==l-7 and s[x:l]=='dreamer':
      print('YES')
    elif x==l-6 and s[x:l]=='eraser':
      print('YES')
    elif x==l-5 and (s[x:l]=='dream' or s[x:l]=='erase'):
      print('YES')
    else:
      print('NO')
    exit()
    
  if s[x:y]=='erase':
    x=y+1 if s[y]=='r' else y
    y=x+5
  elif s[x:y]=='dream':
    x=y if s[y:y+3]=='era' else (y+2 if s[y:y+2]=='er' else y) 
    y=x+5
  else:
    print('NO')
    exit()

Buggy python submission (verdict: Runtime Error):
s=input()
x,y,l=0,5,len(s)
for _ in range(10**5):
  if s[x:y]=='erase':
    x=y+1 if s[y]=='r' else y
    y=x+5
  elif s[x:y]=='dream':
    x=y+2 if s[x:y+2]=='er' else y
    y=x+5
  else:
    print('NO')
    eixt()
  if y>=l:
    if y==l:
       break
    else:
      if x<l:
        print('NO')
        exit()
      else:
        break
print('YES')

Fixed submission:
s=input()
x,y,l=0,5,len(s)
for _ in range(10**5):
  if x>=l-7:
    if x==l-7 and s[x:l]=='dreamer':
      print('YES')
    elif x==l-6 and s[x:l]=='eraser':
      print('YES')
    elif x==l-5 and (s[x:l]=='dream' or s[x:l]=='erase'):
      print('YES')
    else:
      print('NO')
    exit()
    
  if s[x:y]=='erase':
    x=y+1 if s[y]=='r' else y
    y=x+5
  elif s[x:y]=='dream':
    x=y if s[y:y+3]=='era' else (y+2 if s[y:y+2]=='er' else y) 
    y=x+5
  else:
    print('NO')
    exit()
Buggy python submission (verdict: Runtime Error):
import numpy as np

Xin, Yin = input().split()

X = int(Xin)
Y = int(Yin)

a = np.array([[1, 1], [2, 4]])
b = np.array([X, Y])

result = np.linalg.solve(a, b)

if result[0].is_integer() and result[0] >= 0:
    if result[1].is_integer() and result[1] >= 0:
      print('Yes')
    else:
      print('No')
else:
  print('No')

Fixed submission:
data = input().split()

count = 0
for num in data:
    num2 = int(num)
    if num2 == 0:
        result = count
    count += 1

result += 1

print(result)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
import math

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

a.sort()

is_prime = [True]*(10**6 + 1)

is_prime[0] = False

for i in set(a):
    for j in range(2 * i, max(a)+1, i):
        is_prime[j] = False

result = 0
c = Counter(a)

for e in set(a):
        if is_prime[e] and c[e] == 1:
    #        print('e = {}'.format(e))
             result += 1

print(result)



Fixed submission:
from collections import Counter
import math

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

a.sort()

is_prime = [True]*(10**6 + 1)

is_prime[0] = False

maxA = max(a)

for i in set(a):
    for j in range(2 * i, maxA+1, i):
        is_prime[j] = False

result = 0
c = Counter(a)

for e in set(a):
        if is_prime[e] and c[e] == 1:
    #        print('e = {}'.format(e))
             result += 1

print(result)

Buggy python submission (verdict: Time Limit Exceeded):
import copy

N = input()
data = input().split()
original = data.copy()
data2 = original.copy()

res_count = 0
loop_count = 0

for num in data:
    flag = 0
    data2 = original.copy()
    data2.pop(loop_count)
 #   print(original)
#    print(data2)
    for num2 in data2:
        if (int(num) % int(num2)) == 0:
            flag = 1
    
    if flag == 0:
        res_count += 1
 #       print('num = {}  num 2 = {}'.format(num,num2))

    loop_count += 1
    
print(res_count)

   




Fixed submission:
from collections import Counter
import math

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

a.sort()

is_prime = [True]*(10**6 + 1)

is_prime[0] = False

maxA = max(a)

for i in set(a):
    for j in range(2 * i, maxA+1, i):
        is_prime[j] = False

result = 0
c = Counter(a)

for e in set(a):
        if is_prime[e] and c[e] == 1:
    #        print('e = {}'.format(e))
             result += 1

print(result)
Buggy python submission (verdict: Runtime Error):
import math

a, b = map(float, input().split())
if a = 0 or b = 0:
    print(0)
else:
    print(int(a*b))


Fixed submission:
A, B = input().split()
   
A = int(A)
B = int(float(B) * 100 + .5)
   
A *= B
print(A // 100)
Buggy python submission (verdict: Time Limit Exceeded):
import math

A, B, N = map(int, input().split())

i = 1
maxnum = 1
while i <= N:
    if (math.floor(A * (i-1) // B) - A * ((i-1) // B)) < math.floor((A * (i) // B) - A * ((i) // B)):
        maxnum = math.floor((A * (i) // B) - A * ((i) // B))
        i = i + 1

print(maxnum)


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

Buggy python submission (verdict: Time Limit Exceeded):
import math

A, B, N = map(int, input().split())

i = 1
maxnum = 1
while i <= N:
    if ((A * (i-1) // B) - A * ((i-1) // B)) < ((A * (i) // B) - A * ((i) // B)):
        maxnum = ((A * (i) // B) - A * ((i) // B))
        i = i + 1

print(maxnum)


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

Buggy python submission (verdict: Time Limit Exceeded):
import math

A, B, N = map(int, input().split())

i = 1
while i <= N:
    ans = max(((A * (i-1) // B) - A * ((i-1) // B)),((A * (i) // B) - A * ((i) // B)))
    i = i + 1

print(ans)


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

Buggy python submission (verdict: Time Limit Exceeded):
import math

A, B, N = map(int, input().split())

i = 1
while i <= N:
    ans = max(((A * (i-1) // B) - A * ((i-1) // B)),((A * (i) // B) - A * ((i) // B)))
    i = i + 1

print(ans)


Fixed submission:
a, b, n = list(map(int, input().split()))
x = min(b - 1, n)
ans = int(a * x / b)
print(ans)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
 
k, n = map(int, input().split())
A = list(map(int, input().split()))
A += [A[0] + K]
max_gap = max(y - x for x, y in zip(A, A[1:]))
print(K - max_gap)

Fixed submission:
#!/usr/bin/env python3
 
K, N = map(int, input().split())
A = list(map(int, input().split()))
A += [A[0] + K]
max_gap = max(y - x for x, y in zip(A, A[1:]))
print(K - max_gap)
Buggy python submission (verdict: Runtime Error):
#include<bits/stdc++.h>

using namespace std;

int main(){
    int a, b, c; cin >> a >> b >> c;
    if(a == b == c){
        puts("No");
    }else{
        puts("Yes");
    }

}

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

if a==b==c:
    print('No')
elif a==b or b==c or c==a:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import math

A, B = map(int, input().split())
ans = A * B // math.gcd(A,B)

print(ans)

Fixed submission:
from fractions import gcd

A,B = map(int,input().split())
answer = A * B // gcd(A,B)
print(answer)
Buggy python submission (verdict: Runtime Error):
N = int(input())

if N % 2 != 0:
  print('0.6000000000')
else:
  if N == 1:
    print('1.0000000000')
    break
  else:
  	print('0.5000000000')


Fixed submission:
N = int(input())

odd = (N+1)//2
print(odd/N)
Buggy python submission (verdict: Runtime Error):
"""
- N players, K points each player has, Q correct answers
- Substruct Q from K and add score to each players
"""

N,K,Q = map(int,input().split())
A = (int(x) for x in open(0).input().split())

score = [K-Q] * (N+1) 
for x in A:
    score[x] += 1

ans = '\n'.join('No' if x <= 0 else 'Yes' for x in score[1:])
print(ans)


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

#n人にｋ点を配った情報を作成
point = [K] * N

#各クイズごとに正解者に+1点を与える
for i in range(Q):
    score = int(input())
    score = score -1
    point[score] += 1

#クイズが終わった後の得点を調べて結果を出力していく
for i in range(N):
    if point[i] <= Q:
        print("No")
    else:
        print("Yes")
Buggy python submission (verdict: Runtime Error):
r, d, x = map(int,input().split())
print(x = x * r - d  for _ in range(10))


Fixed submission:
r, d, x = map(int,input().split())
for _ in range(10):
    x = x * r - d
    print(x)

Buggy python submission (verdict: Runtime Error):
r, d, x = map(int,input().split())
print((x = x * r - k ) for _ in range(10))

Fixed submission:
r, d, x = map(int,input().split())
for _ in range(10):
    x = x * r - d
    print(x)
Buggy python submission (verdict: Runtime Error):
s = int(input())
l = s / 100
r = s % 100

if(1 <= l && l <= 12):
    if(1 <= r && r <= 12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if(1 <= r && r <= 12):
        print('YYMM')
    else:
        print('NA')

Fixed submission:
s = int(input())
l = s / 100
r = s % 100

if(1 <= l and l <= 12):
    if(1 <= r and r <= 12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if(1 <= r and r <= 12):
        print('YYMM')
    else:
        print('NA')

Buggy python submission (verdict: Runtime Error):
s = int(input())
l = s / 100
r = s % 100

if(1 <= l && <= 12):
    if(1 <= r && r <= 12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if(1 <= r && r <= 12):
        print('YYMM')
    else:
        print('NA')

Fixed submission:
s = int(input())
l = s / 100
r = s % 100

if(1 <= l and l <= 12):
    if(1 <= r and r <= 12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if(1 <= r and r <= 12):
        print('YYMM')
    else:
        print('NA')

Buggy python submission (verdict: Runtime Error):
s = int(input())
l = s / 100
r = s % 100

if(1 <= l && <= 12):
    if(1 <= r && r <= 12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if(1 <= r && r <= 12):
        print('YYMM')
    else:
      print('NA')

Fixed submission:
s = int(input())
l = s / 100
r = s % 100

if(1 <= l and l <= 12):
    if(1 <= r and r <= 12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if(1 <= r and r <= 12):
        print('YYMM')
    else:
        print('NA')
Buggy python submission (verdict: Runtime Error):
n,m,x=map(int,input().split())
s=sum(int(i)<x for i in input().split())
print(min(s,m-s))


Fixed submission:
n,m=map(int,input().split())
S=set(range(1,m+1))
for i in range(n):
    K,*A=map(int,input().split())
    S&=set(A)
print(len(S))
Buggy python submission (verdict: Runtime Error):
def f(s):
	cnt = 0
	st = set()
	cnt += 1
	st.add(s)
  
	while True:
		cnt += 1
    	if s % 2 == 0:
      		tmp = s / 2
    	else:
      		tmp = 3 * s + 1
    	if tmp in st:
      		break
    
    	st.add(tmp)
    	s = tmp
	return cnt
  
s = int(input())
ans = f(s)
print(ans)

Fixed submission:
N = int(input())
s = set([N])
n = N
while 1:
    if n%2:
        n = 3*n + 1
    else:
        n //= 2
    if n in s:
        print(len(s) + 1)
        break
    else:
        s.add(n)
Buggy python submission (verdict: Runtime Error):
S = input()
num = 753
ans = 999

for i in range(len(S) - 2):
  cur = int(S[i:i + 3])
  if (abs(num - cur) < ans):
	ans = abs(num - cur)
print(ans)
      

Fixed submission:
s = input()

answer = 10000
for j in range(len(s)-2):
  t = s[j:j+3]
  answer = min(answer,abs(int(t)-753))

print(answer)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input()for _ in[0]*n]
f = 0
for i in range(1,n):
    f += s[i-1][-1] != s[i][0]
print("No"if f or len(set(s))<n else"Yes")


Fixed submission:
A, B = map(int, input().split())
if A * B % 2 == 0:
  print('No')
else:
  print('Yes')
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()

L = len(S)

bl = False
bl = [True for i in range(L) if S[i:] == T[:L-i] and S[:i] == T[L-i:]:]

answer = 'Yes' if bl else 'No'
print(answer)

Fixed submission:
S = input()
T = input()

L = len(S)

bl = False
for i in range(L):
  if S[i:] == T[:L-i] and S[:i] == T[L-i:]:
    bl = True

answer = 'Yes' if bl else 'No'
print(answer)
Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
sum = 0
tmp = n

while tmp > 0:
    sum += tmp % 10
    tmp /= 10

if n % sum == 0:
    print("Yes")
else:
    print("No")

Fixed submission:
N = int(input())

def S(N):
  if N < 10:
    return N
  return N%10 + S(N//10)

answer = 'No' if N%S(N) else 'Yes'
print(answer)

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
sum = 0
tmp = n

while tmp > 0:
    sum += tmp % 10
    tmp /= 10

if n % sum == 0:
    print "Yes"
else:
    print "No"


Fixed submission:
N = int(input())

def S(N):
  if N < 10:
    return N
  return N%10 + S(N//10)

answer = 'No' if N%S(N) else 'Yes'
print(answer)
Buggy python submission (verdict: Runtime Error):
import math

d, m = map(int,input().split())
print(math.pow(100,d)*n)

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

x = 100**d

ans = x*n
if n == 100:
  ans += x
print(ans)
Buggy python submission (verdict: Runtime Error):
***
「文字列」S を「文字列」X と 「文字列」Y に分割、X と Y 両方に含む文字種類数最大化

「文字列」S を 各位置 で 分割して、「集合」X と 「集合」Y に格納する。
「集合」X と 「集合」Y の 論理積(AND) の 要素数 を 最大化することで求めることができる。
「集合」X と 「集合」Y の 論理積(AND) は X & Y で求めることができる。
***

N = int(input())
S = input()

answer = 0
for L in range(N):
  left = S[:L]
  right = S[L:]
  both = set(left) & set(right)
  answer = max(answer, len(both))

print(answer)

Fixed submission:
'''
「文字列」S を「文字列」X と 「文字列」Y に分割、X と Y 両方に含む文字種類数最大化

「文字列」S を 各位置 で 分割して、「集合」X と 「集合」Y に格納する。
「集合」X と 「集合」Y の 論理積(AND) の 要素数 を 最大化することで求めることができる。
「集合」X と 「集合」Y の 論理積(AND) は X & Y で求めることができる。
'''

N = int(input())
S = input()

answer = 0
for L in range(N):
  left = S[:L]
  right = S[L:]
  both = set(left) & set(right)
  answer = max(answer, len(both))

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

se = set(n**e)
for n in range(32):
    for e in range(2,11):
        if n**e <= X:
            exit()

answer = max(se)
print(answer)

Fixed submission:
X = int(input())
se = set(n**e for n in range(32) for e in range(2,11) if n**e <= X)

answer = max(se)
print(answer)

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

se = set()
for n in range(32):
    for e in range(2,11):
        if n**e <= X:
            se = set(n**e)

answer = max(se)
print(answer)

Fixed submission:
X = int(input())
se = set(n**e for n in range(32) for e in range(2,11) if n**e <= X)

answer = max(se)
print(answer)

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

for n in range(32):
    for e in range(2,11):
        if n**e <= X:
            se = set(n**e)

answer = max(se)
print(answer)

Fixed submission:
X = int(input())
se = set(n**e for n in range(32) for e in range(2,11) if n**e <= X)

answer = max(se)
print(answer)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b, c = map(int, input().split())
print(a+b+c, input())

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

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

Fixed submission:
a, b = map(int, input().split())
if(a * b)% 2:
    print('Odd')
else:
    print('Even')
Buggy python submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int, input().split))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Fixed submission:
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))
Buggy python submission (verdict: Runtime Error):
x, y, z = input(map(int,split())
print(x/(y+z))

Fixed submission:
x,y,z=map(int,input().split())
print((x-z)//(y+z))
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)


Fixed submission:
n = int(input())
k = int(input())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)


Fixed submission:
n = int(input())
k = int(input())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
num = 1
for i in range(n):
    if num*2 < num+k:
        num*2
    else:
        num+k
print(num)


Fixed submission:
n = int(input())
k = int(input())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
num = 1
for i in range(n):
    if num*2 < num+k:
        num += num*2
    else:
        num += num+k
print(num)


Fixed submission:
n = int(input())
k = int(input())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
num = 1
for i in range(n):
    if num*2 < num+k:
        num == num*2
    else:
        num == num+k
print(num)


Fixed submission:
n = int(input())
k = int(input())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
num = 1
for i in range(n):
    if num*2 < num+k:
        num = num*2
    else:
        num = num+k
print(num)


Fixed submission:
n = int(input())
k = int(input())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
num = 1
for i in range(n):
    if num*2 < num+k:
        num = num*2
    else:
        num = num+k
print(num)

Fixed submission:
n = int(input())
k = int(input())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
num = 1
for i in range(n):
    if num*2 < num+k:
        num = num*2
    else:
        num = num+k
print(num)

Fixed submission:
n = int(input())
k = int(input())
num = 1
for i in range(n):
    num = min(num+k,num*2)
print(num)
Buggy python submission (verdict: Runtime Error):
'''
8方向走査

'.' は 空き、 '#' は爆弾の1行から複数行の「文字列」が与えられるので
Minesweeperのように、空きのマスに周囲8方向にある爆弾の数を埋める。
コンテスト中に実装すると、間違えることがあるので、dy や dx それらを使う部分は
予めスニペットなどで直ぐに読み出せるように準備しておく。
8方向走査の他、4方向走査、2方向走査も出題されるので準備しておく。
「文字列」 は 作成後に変更することができない。

ここでは、「文字列」 を 文字 の 「リスト」 とすることで 変更を可能にしている。
行継続文字はバックスラッシュ(円記号)

例えば if 条件 が長くなった場合、バックスラッシュを入れることで
その後の改行が無視されて行が継続していると見なされる。
上記のプログラム
if ny < 0 or H <= ny\
or nx < 0 or W <= nx:
バックスラッシュ無しで改行の場合、SyntaxError になる。
''(空文字).join(「リスト」)

「リスト」の 各要素 を 区切り文字 なし で結合して出力することができる。

' '(半角スペース).join(「リスト」)とすれば
「リスト」の 各要素 を 区切り文字 半角スペース で結合して出力することができる。
'''

# 下、右、上、左、右下、右上、左下、左上
dy = [1, 0, -1, 0, 1, -1, 1, -1]
dx = [0, 1, 0, -1, 1, 1, -1, -1]

H, W = map(int, input().split())
field = []

for i in range(H):
    field.append(list(input()))

for y in range(H):
    for x in range(W):

        if field[y][x] == '#':
            continue

        cnt = 0

        for k in range(8):
            ny = y + dy[k]
            nx = x + dx[k]

            if ny < 0 or H <= ny:
                    or nx < 0 or W <= nx:
                continue

            if field[ny][nx] == '#':
                cnt += 1

        field[y][x] = str(cnt)

for y in range(H):
    print("".join(field[y]))

Fixed submission:
'''
8方向走査

'.' は 空き、 '#' は爆弾の1行から複数行の「文字列」が与えられるので
Minesweeperのように、空きのマスに周囲8方向にある爆弾の数を埋める。
コンテスト中に実装すると、間違えることがあるので、dy や dx それらを使う部分は
予めスニペットなどで直ぐに読み出せるように準備しておく。
8方向走査の他、4方向走査、2方向走査も出題されるので準備しておく。
「文字列」 は 作成後に変更することができない。

ここでは、「文字列」 を 文字 の 「リスト」 とすることで 変更を可能にしている。
行継続文字はバックスラッシュ(円記号)

例えば if 条件 が長くなった場合、バックスラッシュを入れることで
その後の改行が無視されて行が継続していると見なされる。
上記のプログラム
if ny < 0 or H <= ny\
or nx < 0 or W <= nx:
バックスラッシュ無しで改行の場合、SyntaxError になる。
''(空文字).join(「リスト」)

「リスト」の 各要素 を 区切り文字 なし で結合して出力することができる。

' '(半角スペース).join(「リスト」)とすれば
「リスト」の 各要素 を 区切り文字 半角スペース で結合して出力することができる。
'''

# 下、右、上、左、右下、右上、左下、左上
dy = [1, 0, -1, 0, 1, -1, 1, -1]
dx = [0, 1, 0, -1, 1, 1, -1, -1]

H, W = map(int, input().split())
field = []

for i in range(H):
    field.append(list(input()))

for y in range(H):
    for x in range(W):

        if field[y][x] == '#':
            continue

        cnt = 0

        for k in range(8):
            ny = y + dy[k]
            nx = x + dx[k]

            if ny < 0 or H <= ny\
                    or nx < 0 or W <= nx:
                continue

            if field[ny][nx] == '#':
                cnt += 1

        field[y][x] = str(cnt)

for y in range(H):
    print("".join(field[y]))
Buggy python submission (verdict: Runtime Error):
S = str(input())

if S[1:4] = 'YAKI'
    print('Yes')
else:
    print('No')


Fixed submission:
s = input()
answer = 'Yes' if s[:4] == 'YAKI' else 'No'
print(answer)

Buggy python submission (verdict: Runtime Error):
S = str(input())

if S[1:4] = 'YAKI'
	print('Yes')
else:
	print('No')

Fixed submission:
s = input()
answer = 'Yes' if s[:4] == 'YAKI' else 'No'
print(answer)
Buggy python submission (verdict: Runtime Error):
s = input()
print("no" if len(s) - set(s) else "yes")

Fixed submission:
s = input()
print("no" if len(s) - len(set(s)) else "yes")

Buggy python submission (verdict: Runtime Error):
s = input()
print("no" if len(s) - set(s) == 0 else "yes")

Fixed submission:
s = input()
print("no" if len(s) - len(set(s)) else "yes")
Buggy python submission (verdict: Runtime Error):
a, b, c = input().split()
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
 print(’YES’)
else:
 print(’NO’)


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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
	print("YES")
else:
	print("NO")

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


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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
	print("YES")
else:
	print("NO")

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


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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
	print("YES")
else:
	print("NO")

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

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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
	print("YES")
else:
	print("NO")
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print("GREATER" if a>b else "LESS" if a<b else "EQUAL")

Fixed submission:
a=int(input())
b=int(input())
print("GREATER" if a>b else "LESS" if a<b else "EQUAL")

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

Fixed submission:
a=int(input())
b=int(input())
print("GREATER" if a>b else "LESS" if a<b else "EQUAL")
Buggy python submission (verdict: Runtime Error):
c = list(input().split())
print(len(set(c))

Fixed submission:
c = list(input().split())
print(len(set(c)))
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
s={c:list(input()) for c in "abc"}
s="a"
while s[s]:s=s[s].pop(0)
print(s.upper())

Fixed submission:
#!/usr/bin/env python3
S={c:list(input()) for c in "abc"}
s="a"
while S[s]:s=S[s].pop(0)
print(s.upper())

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
s={c:list(input()) for c in "abc"}
s="a"

while s[s]:s=s[s].pop(0)
print(s.upper())

Fixed submission:
#!/usr/bin/env python3
S={c:list(input()) for c in "abc"}
s="a"
while S[s]:s=S[s].pop(0)
print(s.upper())