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

Fixed submission:

N,X = (map(int, input().split()))
m = [0] * N
for i in range(N):
    m[i] = int(input())

for i in range(N):
    X = X - m[i]

min_value = min(m)
ind = m.index(min_value)
count = N

while X - m[ind] >= 0:
    X = X - m[ind]
    count += 1

print(count)

Buggy submission (verdict: Runtime Error):

N,X = (map(int, input().split()))
m = [0] * N
for i in range(N):
    m[i] = int(input())

for i in range(N):
    X = X - m[i]

min_value = min(m)
ind = m.index(min_value)
count = N

while X - m[ind]=> 0:
    X = X - m[ind]
    count += 1

print(count)
Problem p03455 (python)

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

if  c%2 == 0:
    print('Even')
else:
    print('Odd')

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

if  c%2 == 0:
    print('Even')
else:
    print('Odd')
Problem p03469 (python)

Fixed submission:
S = input()

S=S.replace('2017','2018')

print(S)

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


a = -1
b = -1
c = -1

flag = 0

for i in range(N + 1):
    if flag == 1:
        break
    if  Y - 10000 * i  == 0 & i == N:
        a = i
        b = 0
        c = 0
        flag = 1

    #if Y - 10000 * i - 5000 * (N - i) <= 0:
    for j  in range(N-i,N+1):
        if Y - 10000 * i - 5000 * j  - 1000 * (N - i -j)<= 0:
            for k in range(N-i-j,N + 1):
                if Y - 10000 * i - 5000 * j - 1000 * k == 0:
                    a = i
                    b = j
                    c   = k
                    flag = 1
                    break


print(str(a) +' '+ str(b) +' '+ str(c))
Problem p03471 (python)

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


a = -1
b = -1
c = -1

flag = 0

for i in range(N + 1):
    if flag == 1:
        break
    if  Y - 10000 * i  ==0 and i==N:
        a = i
        b = 0
        c = 0
        flag = 1

    if Y - 10000 * i > 0:
        for j  in range(N+1- i):
                k = N - i -j
                if Y - 10000 * i - 5000 * j - 1000 * k == 0:
                    a = i
                    b = j
                    c   = k
                    flag = 1
                    break


print(str(a) +' '+ str(b) +' '+ str(c))

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


a = -1
b = -1
c = -1

flag = 0

for i in range(N + 1):
    if flag == 1:
        break
    if  Y - 10000 * i  == 0:
        a = i
        b = 0
        c = 0
    if  Y - 10000 * i - 5000 * (N - i)>= 0:
        for j in range(N + 1 - i):
            if flag == 1:
                break
                if  Y - 10000 * i - 5000 * j - 1000 *(N - i - j) > =0:
                    for k in range(N + 1 -  i - j):
                        if Y - 10000 * i - 5000 * j - 1000 * k == 0:
                            a = i
                            b = j
                            c = k
                            flag = 1
                            break


print(str(a) +' '+ str(b) +' ' + str(c))

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


a = -1
b = -1
c = -1

flag = 0

for i in range(N + 1):
    if flag == 1:
        break
    if  Y - 10000 * i  == 0:
        a = i
        b = 0
        c = 0
    if  Y - 10000 * i - 5000 * N  >= 0:        
        for j in range(N + 1 - i):
            if flag == 1:
                break
                if  Y - 10000 * i - 5000 * j - 1000 * N > =0:
                    for k in range(N + 1 -  i - j):
                        if Y - 10000 * i - 5000 * j - 1000 * k == 0:
                            a = i
                            b = j
                            c = k
                            flag = 1
                            break


print(str(a) +' '+ str(b) +' ' + str(c))
Problem p03339 (python)

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

w_e = [0] * n
e_w = [0] * n
ans = []

for i in range(n - 1):
    if s[i] == 'W':
        w_e[i + 1] = w_e[i] + 1
    else:
        w_e[i + 1] = w_e[i] + 0

for i in range(n - 2, -1, -1): 
    if s[i + 1] == 'E':
        e_w[i] = e_w[i + 1] + 1
    else:
        e_w[i] = e_w[i + 1] + 0

for i in range(n):
    ans.append(w_e[i] + e_w[i])

print(min(ans))

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

for i in range(n - 1):
    
    if s[i] == 'W':
        w_e[i + 1] = w_e[i] + 1
    else:
        w_e[i + 1] = w_e[i] + 0

for i in range(n - 2, -1, -1):
    if s[i + 1] == 'E':
        e_w[i] = e_w[i + 1] + 1
    else:
        e_w[i] = e_w[i + 1] + 0

for i in range(n):
    ans.append(w_e[i] + e_w[i])

print(min(ans))
Problem p03435 (python)

Fixed submission:
c_1 = list(map(int, input().split()))
c_2 = list(map(int, input().split()))
c_3 = list(map(int, input().split()))
c = c_1 + c_2 + c_3
if sum(c) == 3 * (c_1[0] + c_2[1] + c_3[2]):
    print('Yes')
else:
    print('No')

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

price = a * x + b * y

if (a + b) // 2 > c:
    if x >= y:
        price = min(2 * x * c, 2 * y * c + (x - y) * a)

    else:
        price = min(2 * x * c + (y - x) * b,  2 * y * c)

print(price)
Problem p03436 (python)

Fixed submission:
from collections import deque


def bfs(sy, sx, gy, gx):
    # yが下方向，xが右方向
    d = [[float("inf")] * w for _ in range(h)]

    dy = [0, 1, 0, -1]
    dx = [1, 0, -1, 0]

    que = deque([])
    que.append((sy, sx))
    d[sy][sx] = 0

    while que:

        p = que.popleft()

        if p[0] == gy and p[1] == gx:
            break

        for i in range(4):
            ny = p[0] + dy[i]
            nx = p[1] + dx[i]

            if 0 <= ny < h and 0 <= nx < w and maze[ny][nx] != "#" and d[ny][nx] == float("inf"):
                que.append((ny, nx))
                d[ny][nx] = d[p[0]][p[1]] + 1

    if d[gy][gx] == float("inf"):
        return -1
    else:
        return d[gy][gx]


h, w = map(int, input().split())
maze = [list(input()) for _ in range(h)]

res = 0
for y in range(h):
    for x in range(w):
        if maze[y][x] == '#':
            res += 1

dis = bfs(0, 0, h - 1, w - 1)

if dis == -1:
    print(-1)
else:
    print(h * w - res - dis - 1)

Buggy submission (verdict: Runtime Error):
from collections import deque


def bfs(sy, sx, gy, gx):
    # yが下方向，xが右方向
    d = [[float("inf")] * w for _ in range(h)]

    dy = [0, 1, 0, -1]
    dx = [1, 0, -1, 0]

    que = deque([])
    que.append((sy, sx))
    d[sy][sx] = 0

    while que:

        p = que.popleft()

        if p[0] == gy and p[1] == gx:
            break

        for i in range(4):
            ny = p[0] + dy[i]
            nx = p[1] + dx[i]

            if 0 <= ny < h and 0 <= nx < w and maze[ny][nx] != "#" and d[ny][nx] == float("inf"):
                que.append((ny, nx))
                d[ny][nx] = d[p[0]][p[1]] + 1
 
    if d[gy][gx] == float("inf"):
        return -1
    else:
        return [gy][gx]


h, w = map(int, input().split())
maze = [list(input()) for _ in range(h)]

res = 0
for y in range(h):
    for x in range(w):
        if maze[y][x] == '#':
            res += 1

dis = bfs(0, 0, h - 1, w - 1)

if dis == -1:
    print(-1)
else:
    print(h * w - res - dis - 1)
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):
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b = map(int, input().split())
# 出力
if a * b % 2 = 0:
  print('even')
else:
  print('odd')
Problem p03485 (python)

Fixed submission:
a, b = map(int, input().split())
c = (a + b) % 2
d = (a + b) // 2

if c == 0:
  print(d)
else:
  print(d+1)

Buggy submission (verdict: Runtime Error):
s = sorted(input())
t = sorted(input())
t_reverse = t[::-1]
if s < t_reverse:
  print('Yes')
else:
  print('No')
Problem p04043 (python)

Fixed submission:
A,B,C=map(int,input().split())
if A==B==5 and C==7:
    print("YES")
elif A==C==5 and B==7:
    print("YES")
elif B==C==5 and A==7:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
A,B,C=map(int,input().split())
if A==B==5 and C==7;
    print("YES")
elif A==C==5 and B==7;
    print("YES")
elif B==C==5 and A==7;
    print("YES")
else;
    print("NO")

Buggy submission (verdict: Runtime Error):
A,B,C=map(int,input().split())
if A==B==5 and C==7;
    print("YES")
elif A==C==5 and B==7;
    print("YES")
elif B==C==5 and A==7;
    print("YES")
else;
    print("NO")
Problem p03448 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
 
num = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500 * i + 100 * j + 50 * k == x:
        num += 1
 
print(num)

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

num = 0
for i in range(a):
  for j in range(b):
    for k in range(c):
      if 500 * i + 100 * j + 50 * k == x
        num += 1

print(num)
Problem p03220 (python)

Fixed submission:
option = int(input())
ref_t, tmp_id = (int(n) for n in input().split())
height = list((int(n) for n in input().split()))

ave_t = []
for i in range(option):
  ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.006)))

print(ave_t.index(min(ave_t)) + 1)

Buggy submission (verdict: Runtime Error):
option = int(input())
ref_t, tmp_id = int(input().split())
height = list((int(n) for n in input().split()))

ave_t = []
for i in range(option):
  ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.06)))

print(ave_t.index(min(ave_t)) + 1)

Buggy submission (verdict: Runtime Error):
option = int(input())
ref_t, tmp_id = int(input().split())
height = (int(n) for n in input().split())

ave_t = []
for i in range(option):
  ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.06)))

print(ave_t.index(min(ave_t)) + 1)

Buggy submission (verdict: Runtime Error):
option = int(input())
ref_t, tmp_id = int(input().split())
height = (int(n) for n in input().split())

ave_t = []
for i in range(option):
  ave_t.append(abs(tmp_id - (ref_t - height[i] * 0.06)))

print(ave_t.index(min(ave_t)) + 1)
Problem p03285 (python)

Fixed submission:
price = int(input())

flag = 0
top = price//4 + 1
for n in range(top+1):
  for m in range(top+1):
    if 4*n + 7*m == price:
      flag = 1
      break

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

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

top = price//4
for n in range(top+1):
  for m in range(top+1):
    if 4*n + 7*m == price:
      flag = 1
      break

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

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

top = price//4
for n in range(top):
  for m in range(top):
    if 4*n + 7*m == price:
      flag = 1
      break

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

Fixed submission:
n = int(input())
nums = [int(num) for num in input().split()]

num_min = nums[0]
num_max = nums[0]
for item in nums:
  if item < num_min:
    num_min = item
  if item > num_max:
    num_max = item

print(num_max - num_min)

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

num_min = nums[0]
num_max = nums[0]
for item in nums:
  if item < num_min:
    num_min = item
  elif item > num_max:
    num_max = item
  else:
    
print(num_max - num_min)

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

num_min = nums[0]
num_max = nums[0]
for item in nums:
  if item < num_min:
    num_min = item
  elif item > num_max:
    num_max = item
  else:

print(num_max - num_min)

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

num_min = nums[0]
num_max = nums[0]
for item in nums:
  if item < num_min:
    num_min = item
  else item > num_max:
    num_max = item

print(num_max - num_min)
Problem p03370 (python)

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

m = []
for i in range(N):
  m.append(int(input()))

total = N
remain = X - sum(m)
total += remain//min(m)

print(total)

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

m = []
for i in range(N):
  m.append(int(input()))
  
m.sort()
i = 0
total = 0
while total<=X:
  total += m[i]
  i += 1
  
print(i)

Buggy submission (verdict: Runtime Error):
N, X = input().split()

m = []
for i in range(int(N)):
  m.append(input())
  
m.sort()
i = 0
while total<=int(X):
  total += m[i]
  i += 1
  
print(i)

Buggy submission (verdict: Runtime Error):
N, X = input().split()
m = []
for i in range(int(N)):
  m.append(int(input()))
  
m.sort()
i = 0
while total<int(X):
  total += m[0]
  i += 1
  
print(i)
Problem p03485 (python)

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

ave = (a + b) / 2  # float
if ave - int(ave) > 0:
  print(int(ave)+1)
else:
  print(int(ave))

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

ave = (a + b)/ 2

print(math.ceil(ave))
Problem p03494 (python)

Fixed submission:
count = int(input())
numbers = [int(num) for num in input().split()]

counter = 0
while True:
  tmp = 0
  for item in numbers:
    tmp += item % 2
  if tmp > 0:
    break
  counter += 1
  numbers = [item / 2 for item in numbers]
print(counter)

Buggy submission (verdict: Runtime Error):
count = int(input())
numbers = [int(num) for num in input().split()]

counter = 0
while True:
  tmp = 0
  for item in numbers:
    tmp += item % 2
  if tmp > 0:
    break
  counter ++
  numbers = [item / 2 for item in numbers]
print(counter)

Buggy submission (verdict: Runtime Error):
count = input()
numbers = [int(num) for num in input().split()]

counter = 0
while True:
  tmp = 0
  for item in numbers:
    tmp += item % 2
  if tmp > 0:
    break
  counter ++
  numbers = [item / 2 for item in numbers]
print(counter)

Buggy submission (verdict: Runtime Error):
count = input()
numbers = (int(num) for num in input().split())

counter = 0
while True:
  tmp = 0
  for item in numbers:
    tmp += item % 2
  if tmp > 0:
    break
  counter ++
  numbers = [item / 2 for item in numbers]
print(counter)

Buggy submission (verdict: Runtime Error):
count = input()
numbers = map(int, input().split())

counter = 0
while True:
  tmp = 0
  for item in numbers:
    tmp += item % 2
  if tmp > 0:
    break
  counter ++
  numbers = [item / 2 for item in numbers]
print(counter)

Buggy submission (verdict: Runtime Error):
count = input()
numbers = list(map(int, input().split(' ')))

counter = 0
while True:
  tmp = 0
  for item in numbers:
    tmp += item % 2
  if tmp > 0:
    break
  counter ++
  numbers = [item / 2 for item in numbers]
print(counter)

Buggy submission (verdict: Runtime Error):
count = input()
numbers = map(int, input().split(' '))

counter = 0
while True:
  tmp = 0
  for item in numbers:
    tmp += item % 2
  if tmp > 0:
    break
  counter ++
  numbers = [item / 2 for item in numbers]
print(counter)

Buggy submission (verdict: Runtime Error):
count = int(input())
numbers = map(int, input().split(' '))

counter = 0
while True:
  for item in numbers:
    if item % 2 == 1:
      break
  	else:
      counter += 1
  numbers = [item / 2 for item in numbers]

print(counter)
Problem p03610 (python)

Fixed submission:
letters = list(input())
new_letters = []

for i, ltr in enumerate(letters, 1):
  if i % 2 == 1:
    new_letters.append(ltr)

print(''.join(new_letters))

Buggy submission (verdict: Runtime Error):
letters = list(input().split())
new_letters = []

for i, item in enumerate(letters, 1)
  if i % 2 != 0:
    new_letters.append(item)
print(''.join(new_letters))

Buggy submission (verdict: Runtime Error):
letters = list(input().split())
new_letters = []

for i, item in enumerate(letters, 1)
  if i % 2 != 0
    new_letters.append(item)
print(''.join(new_letters))
Problem p03644 (python)

Fixed submission:
num = int(input())

count_max = 0
num_max = 0
for i in range(1, num+1):
  tmp = i
  count = 0
  while tmp % 2 == 0:
    tmp = tmp / 2
    count += 1
  if count >= count_max:
    count_max = count
    num_max = i

if num == 1:
  print(1)
else:
  print(num_max)

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

count_max = 0
for i in range(num):
  tmp = i + 1
  count = 0
  while tmp % 2 == 0:
    tmp = tmp / 2
    count += 1
  if count > count_max:
    count_max = count
    num_max = i + 1

print(num_max)

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

count_max = 0
for i in range(num):
  tmp = i + 1
  count = 0
  while tmp % 2 == 0:
    tmp = tmp / 2
    count += 1
  if count > count_max:
    count_max = count
    num_max = i + 1

print(num_max)

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

count_max = 0
for i in range(num)
  tmp = i
  count = 0
  while tmp % 2 == 0:
    tmp = tmp / 2
    count += 1
  if conut > count_max:
    count_max = count
Problem p03814 (python)

Fixed submission:
s = list(input())

flag = 0
pos_a, pos_z = 1, 1
length = 0

for i, ltr in enumerate(s, 1):
  if ltr == 'A' and flag == 0:
    pos_a = i
    flag = 1
  elif ltr == 'Z' and flag == 1:
    pos_z = i
    if pos_z - (pos_a -1) > length:
      length = pos_z - (pos_a -1)
    else:
      flag = 0

print(length)

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

flag = 0
pos_a, pos_z = 1, 1
length = 0

for i, ltr in enumerate(s, 1):
  if ltr == 'A':
    pos_a = i
    flag = 1
  elif ltr == 'Z' and flag == 1:
    pos_z = i
      if pos_z - (pos_a -1) > length:
        length = pos_z - (pos_a -1)
      else:
        flag = 0

print(length)

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

flag = 0
pos_a, pos_z = 1, 1
length = 0

for i, ltr in enumerate(s, 1)
  if ltr == 'A':
    pos_a = i
    flag = 1
  elif ltr == 'Z' and flag == 1:
      pos_z = i
      if pos_z - pos_a > length:
        length = pos_z - pos_a
      else:
        flag = 0

print(length)

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

flag = 0
pos_a, pos_z = 1, 1
length = 0

for i, ltr in enumerate(s, 1)
  if ltr == 'A':
    pos_a = i
    flag = 1
  elif ltr == 'Z':
    if flag == 1:
      pos_z = i
      if pos_z - pos_a > length:
        length = pos_z - pos_a
      else:
        flag = 0
        
print(length)

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

flag = 0
pos_a, pos_z = 1
length = 0

for i, ltr in enumerate(s, 1)
  if ltr == 'A':
    pos_a = i
    flag = 1
  elif ltr == 'Z':
    if flag == 1:
      pos_z = i
      if pos_z - pos_a > length:
        length = pos_z - pos_a
      else:
        flag = 0
        
print(length)
Problem p03220 (python)

Fixed submission:
N=int(input())
tmp=input().split()
T=int(tmp[0])
A=int(tmp[1])
H=input().split()
H=[abs(A-(T-0.006*int(H[i]))) for i in range(0,N)]
min=H[0]
index=0
for i in range(1,N):
    if min>H[i]:
        min=H[i]
        index=i
print(index+1)

Buggy submission (verdict: Runtime Error):
N=int(input())
tmp=input().split()
T=int(tmp[0])
A=int(tmp[1])
H=input().split()
H=[abs(A-(T-0.006*int(H[i]))) for i in range(0,N)]
min=H[0]
for i in range(1,N):
    if min>H[i]:
        min=H[i]
        index=i
print(index)
Problem p03369 (python)

Fixed submission:
S=input()
cnt=0
for i in range(0,3):
	if S[i]=="o":
		cnt+=1
print(700+100*cnt)

Buggy submission (verdict: Runtime Error):
S=input().split()
cnt=0
for i in range(0,3):
	if S[i]=="o":
		cnt+=1
print(700+100*cnt)
Problem p03457 (python)

Fixed submission:
N=int(input())
txy=[[0,0,0]]
for i in range(0,N):
    tmp=input().split()
    tmp=[int(s) for s in tmp]
    txy.append(tmp)
cnt=0
for i in range(0,N):
    d=abs(txy[i][1]-txy[i+1][1])+abs(txy[i][2]-txy[i+1][2])
    t=txy[i+1][0]-txy[i][0]
    if d <= t and (t-d)%2==0:
        cnt+=1
    else:
        break
if cnt==N:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
txy=[[0,0,0]]
for i in range(0,N):
    tmp=input().split()
    tmp=[int(s) for s in tmp]
    txy.append(tmp)
for i in range(0,N):
    t1=abs(txy[i][1]-txy[i+1][1])+abs(txy[i][2]-txy[i+1][2])
    t2=txy[i+1][0]-txy[i][0]
    if t1 <= t2 and (t2-t1)%2=0:
    else:
        print('NG')
        break
print('OK')
Problem p03285 (python)

Fixed submission:
N = int(input())
for i in range(N//4+1):
    if (N - 4*i)%7 == 0:
        print('Yes')
        exit()
print('No')

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

for i in range(0,N//4+1):
    if (N - 4*i)%7 == 0:
        print('Yes')
        sys.exit()
print('No')

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

for i in range(0,N//4):
    if (N - 4*i)%7 == 0:
        print('Yes')
        sys.exit()
print('No')
Problem p03485 (python)

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

x = (a+b)/2

if x != int(x):
	print(int(x) + 1)
else:
	print(int(x))

Buggy submission (verdict: Runtime Error):
s = list(input())
t = list(input())
s.sort()
t.sort()
s = ''.join(s)
t = ''.join(t)

[print('Yes') if s < t else print('No')]
Problem p03486 (python)

Fixed submission:
s = list(input())
t = list(input())
s.sort()
t.sort(reverse = True)
s = ''.join(s)
t = ''.join(t)

[print('Yes') if s < t else print('No')]

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

for s_, t_ in zip(s,t):
	if s_ < t_ :
		print('Yes')
		sys.exit()

if len(s) < len(t):
	print('Yes')
else:
	print('No')
Problem p03730 (python)

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

for i in range(b):
	if (i+1)*a%b == c:
		print('YES')
		sys.exit()

print('NO')

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

for i in range(b):
	if (i+1)*a%(b) == c:
		print('YES')
		sys.exit()

print('NO')

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

for i in range(b):
	if (i+1)*a%(b) == c:
		print('YES')
		sys.exit()

print('NO')

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

for i in range(b):
	if i*a%(b+1) == c:
		print('YES')
		sys.exit()

print('NO')

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

for i in range(b):
	if i*a%b == c:
		print('YES')
		sys.exit()

print('NO')
Problem p03369 (python)

Fixed submission:
a = input()
b = 700
for x in a:
    if x == "o":
       b += 100
    else:
        pass
print(b)

Buggy submission (verdict: Runtime Error):
a = input()
b = 700
for x in a:
	if x == "o":
    	b += 100
	else:
    	pass
print(b)
Problem p03485 (python)

Fixed submission:
import math
a,b = map(int,input().split())
print(math.ceil((a+b)/2))

Buggy submission (verdict: Runtime Error):
import math
 
a = list(map(int,input().split()))
 
c = reduce((lambda x,y: (x+y)/2 ,a)
 
print(math.ceil(c))

Buggy submission (verdict: Runtime Error):
import math
 
a = list(map(int,input().split()))
 
c = reduce((lambda x,y: (x+y)/2 ,a)
 
print(math.cell(c))

Buggy submission (verdict: Runtime Error):
import math

a = int(input())
b = int(input())

c = (a + b)/2 

print(math.cell(c))

Buggy submission (verdict: Runtime Error):
import math

a = int(input())
b = int(input())

c = a * b / 2
print(math.cell(c))
Problem p03606 (python)

Fixed submission:
a =int( input())
d = 0

for x in range(a):
    b ,c = map(int,input().split())
    d += c-b+1
print(d)

Buggy submission (verdict: Runtime Error):
a = input()
d = 0
for x in range(a):
    b ,c = map(int,input().split())
    d = c-b+1
print(d)
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]+len(a)-2+a[-1])
Problem p03693 (python)

Fixed submission:
a = int(input().replace(' ' ,''))
if a%4 == 0:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
c = list(map(int,input().split()))
a = reduce((lambda x , y: x * y),c)
if a%4 == 0:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
c = list(map(int,input().split()))
a = reduce(lambda x , y: x * y),c)
if a%4 == 0:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
c = list(map(int,input().split()))
print(reduce(lambda x , y: x * y),c)