Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import math
R, G, B, N = map(int, input().split())
rg_lis = []
ans = 0
cr = math.ceil(N/R)
cg = math.ceil(N/G)
cb = math.ceil(N/B)
for i in range(cr + 1):
    for j in range(cg + 1):
        tmp =  i * R + j * G
        if N - tmp >= 0:
            rg_lis.append(tmp)
        else:
          break
for l in rg_lis:
    if (N - l )% B == 0:
        ans += 1
print(ans)


Fixed submission:
import math
R, G, B, N = map(int, input().split())
ans = 0
cr = math.ceil(N/R)
cg = math.ceil(N/G)
cb = math.ceil(N/B)
for i in range(cr + 1):
    for j in range(cg + 1):
        tmp =  i * R + j * G
        if N - tmp >= 0 and (N - tmp) % B == 0:
           ans += 1
        elif N - tmp < 0:
          break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math
R, G, B, N = map(int, input().split())
rg_lis = []
ans = 0
cr = math.ceil(N/R)
cg = math.ceil(N/G)
cb = math.ceil(N/B)
for i in range(cr + 1):
    for j in range(cg + 1):
        tmp =  i * R + j * G
        if N - tmp >= 0:
            rg_lis.append(tmp)
for l in rg_lis:
    if (N - l )% B == 0:
        ans += 1
print(ans)


Fixed submission:
import math
R, G, B, N = map(int, input().split())
ans = 0
cr = math.ceil(N/R)
cg = math.ceil(N/G)
cb = math.ceil(N/B)
for i in range(cr + 1):
    for j in range(cg + 1):
        tmp =  i * R + j * G
        if N - tmp >= 0 and (N - tmp) % B == 0:
           ans += 1
        elif N - tmp < 0:
          break
print(ans)
Buggy python submission (verdict: Runtime Error):
import stdin from sys
n = int(stdin.readline().rstrip())
li = [int(stdin.readline().rstrip()) for _ in range(5)]
m = min(li)
if n % m == 0:
    print(n//m + 4)
else:
    print(n//m + 5)


Fixed submission:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
m = min(a,b,c,d,e)
if n % m == 0:
    print(n//m + 4)
else:
    print(n//m + 5)

Buggy python submission (verdict: Runtime Error):
import stdin from sys
n = int(stdin.readline().rstrip())
li = [int(stdin.readline().rstrip() for _ in range(5))]
m = min(li)
if n % m == 0:
    print(n//m + 4)
else:
    print(n//m + 5)

Fixed submission:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
m = min(a,b,c,d,e)
if n % m == 0:
    print(n//m + 4)
else:
    print(n//m + 5)

Buggy python submission (verdict: Runtime Error):
import stdin from sys
n = int(stdin.readline())
li = int(stdin.readlines())
m = min(li)
if n % m == 0:
    print(n//m + 4)
else:
    print(n//m + 5)

Fixed submission:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
m = min(a,b,c,d,e)
if n % m == 0:
    print(n//m + 4)
else:
    print(n//m + 5)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
m = min(a,b,c,d,e)
print(ceil(n/m) + 4)

Fixed submission:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
m = min(a,b,c,d,e)
if n % m == 0:
    print(n//m + 4)
else:
    print(n//m + 5)
Buggy python submission (verdict: Runtime Error):
A,B,C = map(int,input().split())
if A == b and B == C:
  print('Yes')
else:
  print('No')


Fixed submission:
A,B,C = map(int,input().split())
if A == B and B == C:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
A,B,C = map(int,input())
if A == b and B == C:
  print('Yes')
else:
  print('No')

Fixed submission:
A,B,C = map(int,input().split())
if A == B and B == C:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
S = list(int(input()))
a = S.count(0)
b = S.count(1)
ans = 2 * min(a, b)
print(ans)


Fixed submission:
S = list(input())
a = S.count('0')
b = S.count('1')
ans = 2 * min(a, b)
print(ans)

Buggy python submission (verdict: Runtime Error):
S = list(int(input()))
a = S.counter(0)
b = S.counter(1)
ans = 2 * min(a, b)
print(ans)


Fixed submission:
S = list(input())
a = S.count('0')
b = S.count('1')
ans = 2 * min(a, b)
print(ans)
Buggy python submission (verdict: Runtime Error):
K, A, B = map(int, input().split())
if B - A =< 2 :
  print(K + 1)
elif K < A + 1:
  print(K + 1)
else :
  ans = B 
  count = K - A - 1
  loop = count // (A + 2)
  amari = count % (A + 2)
  ans += B * loop + amari
  print(ans)
  


Fixed submission:
K, A, B = map(int, input().split())
if B - A <= 2 :
  print(K + 1)
elif K < A + 1:
  print(K + 1)
elif K == A + 1:
  print(B)
else:
  count = K - (A + 1)
  if count % 2 == 0:
    ans = count // 2 * (B - A) + B
  else:
    ans = count//2 * (B - A) + B + 1
  print(ans)

Buggy python submission (verdict: Runtime Error):
K, A, B = map(int, input(),split())
if B - A =< 2 :
  print(K + 1)
elif K < A + 1:
  print(K + 1)
else :
  ans = B 
  count = K - A - 1
  loop = count // (A + 2)
  amari = count % (A + 2)
  ans += B * loop + amari
  print(ans)
  

Fixed submission:
K, A, B = map(int, input().split())
if B - A <= 2 :
  print(K + 1)
elif K < A + 1:
  print(K + 1)
elif K == A + 1:
  print(B)
else:
  count = K - (A + 1)
  if count % 2 == 0:
    ans = count // 2 * (B - A) + B
  else:
    ans = count//2 * (B - A) + B + 1
  print(ans)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
X = sorted(list(map(int, input().split())))
if N >= M :
  print(0)
else:
  length = [0] * (M-1)
  for i in range(M-1):
    length[i](X[i+1]-X[i])
  length.sort()
  print(sum(length[:(M-N)]))

Fixed submission:
N, M = map(int, input().split())
X = sorted(list(map(int, input().split())))
if N >= M :
  print(0)
else:
  length = [0] * (M-1)
  for i in range(M-1):
    length[i] = (X[i+1]-X[i])
  length.sort()
  print(sum(length[:(M-N)]))

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
X = list(map(int, input().split()))
if N >= M :
  print(0)
else:
  length = [0] * (M-1)
  for i in range(M-1):
    length[i](X[i+1]-X[i])
  length.sort()
  print(sum(length[:(M-N)]))

Fixed submission:
N, M = map(int, input().split())
X = sorted(list(map(int, input().split())))
if N >= M :
  print(0)
else:
  length = [0] * (M-1)
  for i in range(M-1):
    length[i] = (X[i+1]-X[i])
  length.sort()
  print(sum(length[:(M-N)]))

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
X = list(map(int, input().split()))
if N >= M :
  print(0)
else:
  length = [0] * (M-1)
  for i in range(M-1):
    length[i](X[i+1]-X[i])
  length.sort()
  print(sum(length[:M-N]))

Fixed submission:
N, M = map(int, input().split())
X = sorted(list(map(int, input().split())))
if N >= M :
  print(0)
else:
  length = [0] * (M-1)
  for i in range(M-1):
    length[i] = (X[i+1]-X[i])
  length.sort()
  print(sum(length[:(M-N)]))
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
h = list(map(int, input().split()))
t = pow(10,10)
dp_h = [t] * N
dp_h[1] = abs(h[1] - h[0])
for i in range(2,N):
  for j in range(min(i, K)):
    tmp = abs(h[i] - h[i - j - 2]) + dp_h[i-j-2]
    if h[i] - h[i-j-2] == 0:
      tmp_min = tmp
      break
    if tmp < tmp_min:
      tmp_min = tmp
  dp_h[i] = tmp_min
print(dp_h[N-1])


Fixed submission:
import numpy as np
N, K = map(int, input().split())
h = list(map(int, input().split()))
h = np.array(h)
dp = np.zeros(N, dtype = int)
for i in range(1, N):
  j = max(0,i - K)
  dp[i] = np.min(dp[j:i] + np.abs(h[i] - h[j:i]))
print(dp[N-1])

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
h = list(map(int, input().split()))
dp_h = [0] * N
dp_h[1] = abs(h[1] - h[0])
for i in range(2,N):
  tmp_min = abs(h[i] -h[i-1]) + dp_h[i-1]
  for j in range(min(i-1, K-1)):
    tmp = abs(h[i] - h[i - j - 2]) + dp_h[i-j-2]
    if h[i] - h[i-j-2] == 0:
      tmp_min = tmp
      break
    if tmp < tmp_min:
      tmp_min = tmp
  dp_h[i] = tmp_min
print(dp_h[N-1])

Fixed submission:
import numpy as np
N, K = map(int, input().split())
h = list(map(int, input().split()))
h = np.array(h)
dp = np.zeros(N, dtype = int)
for i in range(1, N):
  j = max(0,i - K)
  dp[i] = np.min(dp[j:i] + np.abs(h[i] - h[j:i]))
print(dp[N-1])

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
h = list(map(int, input().split()))
dp_h = [0] * N
dp_h[1] = abs(h[1] - h[0])
for i in range(2,N):
  tmp_min = abs(h[i] -h[i-1]) + dp_h[i-1]
  for j in range(min(i-1, K-1)):
    tmp = abs(h[i] - h[i - j - 2]) + dp_h[i-j-2]
    if tmp < tmp_min:
      tmp_min = tmp
  dp_h[i] = tmp_min
print(dp_h[N-1])
    


Fixed submission:
import numpy as np
N, K = map(int, input().split())
h = list(map(int, input().split()))
h = np.array(h)
dp = np.zeros(N, dtype = int)
for i in range(1, N):
  j = max(0,i - K)
  dp[i] = np.min(dp[j:i] + np.abs(h[i] - h[j:i]))
print(dp[N-1])
Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())
total = []
dp = np.zeros((3,N), dtype = int)
for i in range(N):
  tmp = list(map(int,input().split()))
  if i == 0:
    dp[i][0] = tmp[0]
    dp[i][1] = tmp[1]
    dp[i][2] = tmp[2]
  else:
    dp[i][0] = max(dp[i-1][1], dp[i-1][2]) + tmp[0]
    dp[i][1] = max(dp[i-1][0], dp[i-1][2]) + tmp[1]
    dp[i][2] = max(dp[i-1][0], dp[i-1][1]) + tmp[2]
print(max(dp[N-1][0],dp[N-1][1],dp[N-1][2]))

Fixed submission:
import numpy as np
N = int(input())
total = []
dp = np.zeros((N,3), dtype = int)
for i in range(N):
  tmp = list(map(int,input().split()))
  if i == 0:
    dp[i][0] = tmp[0]
    dp[i][1] = tmp[1]
    dp[i][2] = tmp[2]
  else:
    dp[i][0] = max(dp[i-1][1], dp[i-1][2]) + tmp[0]
    dp[i][1] = max(dp[i-1][0], dp[i-1][2]) + tmp[1]
    dp[i][2] = max(dp[i-1][0], dp[i-1][1]) + tmp[2]
print(max(dp[N-1][0],dp[N-1][1],dp[N-1][2]))
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
h = [(int(input()) for _ in range(N)]
fin = h[K-1] - h[0]
for i in range(1, N-K+1):
  t = h[i+K-1] - h[i]
  if fin > t :
    fin = t
print(fin)


Fixed submission:
N, K = map(int, input().split())
h = sorted(list(int(input()) for _ in range(N)))
fin = h[K-1] - h[0]
for i in range(1, N-K+1):
  t = h[i+K-1] - h[i]
  if fin > t :
    fin = t
print(fin)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
h = [(int(input()) for _ in range(N)]
fin = h[K-1] - h[0]
for i in range(1, N-K+1):
  t = h[i+K-1] - h[i]
  if fin > t :
    fin = t
print(fin)


Fixed submission:
N, K = map(int, input().split())
h = sorted(list(int(input()) for _ in range(N)))
fin = h[K-1] - h[0]
for i in range(1, N-K+1):
  t = h[i+K-1] - h[i]
  if fin > t :
    fin = t
print(fin)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
h = [(int(input()) for _ in range(N))]
fin = h[K-1] - h[0]
for i in range(1, N-K+1):
  t = h[i+K-1] - h[i]
  if fin > t :
    fin = t
print(fin)


Fixed submission:
N, K = map(int, input().split())
h = sorted(list(int(input()) for _ in range(N)))
fin = h[K-1] - h[0]
for i in range(1, N-K+1):
  t = h[i+K-1] - h[i]
  if fin > t :
    fin = t
print(fin)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
h = [list(int(input()) for _ in range(N))]
fin = h[K-1] - h[0]
for i in range(1, N-K+1):
  t = h[i+K-1] - h[i]
  if fin > t :
    fin = t
print(fin)

Fixed submission:
N, K = map(int, input().split())
h = sorted(list(int(input()) for _ in range(N)))
fin = h[K-1] - h[0]
for i in range(1, N-K+1):
  t = h[i+K-1] - h[i]
  if fin > t :
    fin = t
print(fin)
Buggy python submission (verdict: Runtime Error):
N = int(input())
def dfs(s): # 文字列 s で始まる七五三数の個数 if int(s) > N:
return 0
ret = 1 if all(s.count(c) > 0 for c in '753') else 0 # s 自体が七五三数なら +1 for c in '753':
         ret += dfs(s + c)
     return ret
print(dfs('0')) # 本当は dfs('') と書きたいが 4 行目でのエラーを防ぐため仕方なく


Fixed submission:
N = int(input())
def dfs(s):
  if int(s) > N :
    return 0
  if all(s.count(c)>0 for c in '753'):
    ret = 1
  else:
    ret = 0
  for c in '753':
    ret += dfs(s+c)
  return ret
print(dfs('0'))
Buggy python submission (verdict: Runtime Error):
import math
N, X = map(int,input().split())
x = list(map(int,input().split()))
ma = 0
for i in range(N):
  ma = math.gcd(ma,abs(x[i]-X))
print(ma)

Fixed submission:
import fractions
N, X = map(int, input().split())
x = list(map(int, input().split()))
tmp = abs(x[0] - X)
for i in range(1,N):
  tmp = fractions.gcd(tmp,abs(x[i]-X))
print(tmp)

Buggy python submission (verdict: Runtime Error):
import math
N, X = map(int,input().split())
x = list(map(int,input().split()))
for i in range(N):
  x[i] = abs(x[i]-X)
if N != 1:
  print(math.gcd(x))
else:
  print(x[0])

Fixed submission:
import fractions
N, X = map(int, input().split())
x = list(map(int, input().split()))
tmp = abs(x[0] - X)
for i in range(1,N):
  tmp = fractions.gcd(tmp,abs(x[i]-X))
print(tmp)
Buggy python submission (verdict: Time Limit Exceeded):
import bisect
ans = 0
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort()
B.sort()
C.sort()
lis_B = [0] * N
for i in range(N):
  tmp = bisect.bisect_right(C, B[i])
  if tmp  == N:
    break
  lis_B[i] = N - tmp
for i in range(N):
  tmp = bisect.bisect_right(B, A[i])
  if tmp == N:
    break
  ans += sum(lis_B[tmp:N])
print(ans)

Fixed submission:
import bisect
ans = 0
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort()
B.sort()
C.sort()
for i in range(N):
  tmp_1 = bisect.bisect_right(C, B[i])
  tmp_2 = bisect.bisect_left(A, B[i])
  ans += (N - tmp_1) * tmp_2
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
count = 0
up = 0
down = 0
before = A[0]
tmp = 0
for i in range(1,N):
  tmp = A[i]
  if (up == 0) and (down == 0):
    if tmp > before:
      up = 1
      before = tmp
    elif tmp < before:
      down = 1
      before = tmp
    else:
      continue
  elif up == 1:
    if tmp < before:
      count += 1
      up = 0
      before = tmp
  elif down = 1:
    if tmp > before:
      count += 1
      down = 0
      before = tmp
count += 1
print(count)
      


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
count = 0
up = 0
down = 0
before = A[0]
tmp = 0
for i in range(1,N):
  tmp = A[i]
  if (up == 0) and (down == 0):
    if tmp > before:
      up = 1
      before = tmp
    elif tmp < before:
      down = 1
      before = tmp
    else:
      continue
  elif up == 1:
    if tmp < before:
      count += 1
      up = 0
      before = tmp
    else:
      before = tmp
  elif down == 1:
    if tmp > before:
      count += 1
      down = 0
      before = tmp
    else:
      before = tmp
count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
count = 0
up = 0
down = 0
before = A[0]
tmp = 0
for i in range(1,N):
  tmp = A[i]
  if (up == 0) and (down == 0):
    if tmp > before:
      up = 1
      before = tmp
    elif tmp < before:
      down = 1
      before = tmp
    else:
      continue
  elif up == 1:
    if tmp < before:
      count += 1
      up = 0
      before = tmp
  elif down = 1:
    if tmp > before:
      count += 1
      down = 0
      before = tmp
count += 1
print(count)
      

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
count = 0
up = 0
down = 0
before = A[0]
tmp = 0
for i in range(1,N):
  tmp = A[i]
  if (up == 0) and (down == 0):
    if tmp > before:
      up = 1
      before = tmp
    elif tmp < before:
      down = 1
      before = tmp
    else:
      continue
  elif up == 1:
    if tmp < before:
      count += 1
      up = 0
      before = tmp
    else:
      before = tmp
  elif down == 1:
    if tmp > before:
      count += 1
      down = 0
      before = tmp
    else:
      before = tmp
count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
#深さ優先探索
N, M = map(int,input().split())
graph = [[] for j in range(N)]
for i in range(M):
  a, b = map(int,input().split())
  graph[a-1].append(b-1)
  graph[b-1].append(a-1)
judge = [False]*N

def dfs(v,judge):#vは今いる場所
  if all(judge):
    return 1
  res = 0
  for nv in graph(v):#vと隣り合っている場所
    if judge[nv] == True:#すでに探索済み
      continue #if文の初めに戻る
    judge[nv] = True
    res += dfs(nv,judge)
    judge[nv] = False
  return res
print(dfs(0,judge))

Fixed submission:
#深さ優先探索
N, M = map(int,input().split())
graph = [[] for j in range(N)]
for i in range(M):
  a, b = map(int,input().split())
  graph[a-1].append(b-1)
  graph[b-1].append(a-1)
judge = [False]*N
judge[0] = True

def dfs(v,judge):#vは今いる場所
  if all(judge):
    return 1
  res = 0
  for nv in graph[v]:#vと隣り合っている場所
    if judge[nv]:#すでに探索済み
      continue #if文の初めに戻る
    judge[nv] = True
    res += dfs(nv,judge)
    judge[nv] = False
  return res
print(dfs(0,judge))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=list(map(int,input().split()))
for i in range(1,N+1):
  print(L.index(i)+1,end="")
  if i<N:
    print(" ",end="")
print()

Fixed submission:
N=int(input())
L=[0]*N
for x,i in enumerate(list(map(int,input().split()))):
  L[i-1]=str(x+1)
print(' '.join(L))
Buggy python submission (verdict: Runtime Error):
if int(input())>8 or int(input())>8:
  print(":(")
else:
  print("Yay!")

Fixed submission:
if max(list(map(int,input().split()))) >8:
  print(":(")
else:
  print("Yay!")
Buggy python submission (verdict: Runtime Error):
a=input()
if a[1]=="+":
  print(int(a[0])+int(a[2]))
else:
  print(int(a[0])-int(a[2]))


Fixed submission:
a=input().split()
if a[1]=="+":
  print(int(a[0])+int(a[2]))
else:
  print(int(a[0])-int(a[2]))

Buggy python submission (verdict: Runtime Error):
a=input()
if a[1]=="+":
  print(a[0]+a[2])
else:
  print(a[0]-a[2])


Fixed submission:
a=input().split()
if a[1]=="+":
  print(int(a[0])+int(a[2]))
else:
  print(int(a[0])-int(a[2]))

Buggy python submission (verdict: Runtime Error):
a=input()
if a[1]=="+":
  print(a+b)
else:
  print(a-b)

Fixed submission:
a=input().split()
if a[1]=="+":
  print(int(a[0])+int(a[2]))
else:
  print(int(a[0])-int(a[2]))
Buggy python submission (verdict: Runtime Error):
a,b,c=int(input()),int(input()),int(input())
if a+b==c or a+c==b or b+c==a:
  print("Yes")
else:
  print("No")

Fixed submission:
a,b,c=map(int,input().split())
if a+b==c or a+c==b or b+c==a:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):

def main():
    s = input()
    if s = 'ABC':
        print('ARC')
    else:
        print('ARC')


if __name__ == "__main__":
    main()


Fixed submission:

def main():
    s = input()
    if s == 'ABC':
        print('ARC')
    else:
        print('ABC')


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):

def main():
    s, w = map(int, input())
    if w >= s:
        print('unsafe')
    else:
        print('safe')


if __name__ == "__main__":
    main()


Fixed submission:

def main():
    s, w = map(int, input().split())
    if w >= s:
        print('unsafe')
    else:
        print('safe')


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):

def main():
    s, w = map(int, input())
    if w >= s:
        print('unsafe')
    else:
        print('safe')


if __name__ == "__main__":
    main()


Fixed submission:

def main():
    s, w = map(int, input().split())
    if w >= s:
        print('unsafe')
    else:
        print('safe')


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):

def main():
    n = int(input())
    if n % 2 = 1:
        print(n // 2 + 1)
    else:
        print(n / 2)


if __name__ == "__main__":
    main()


Fixed submission:

def main():
    n = int(input())
    if n % 2 == 1:
        print(n // 2 + 1)
    else:
        print(n // 2)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):

def main():
    n, r = map(int, input().split())
    if n >= 10:
        print(r)
    else:
        print(100 * (10 - k))


if __name__ == "__main__":
    main()


Fixed submission:

def main():
    n, r = map(int, input().split())
    if n >= 10:
        print(r)
    else:
        print(r + (100 * (10 - n)))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
 = input().split()
syou = x[0] / x[1]
amari = x[0] % x[1]

if(amari > 0 ):
    print(syou+1)
else:
    print(syou)

Fixed submission:
A, B = map(int, input().split())

num = 1
res = 0

while num < B:
    res += 1
    num += A-1

print(res)
Buggy python submission (verdict: Runtime Error):

def main():
    s = input()
    s_ = list(set(s))
    if s.count(s_[0]) == 2 and len(s_) == 2i:
        print('Yes')
    else:
        print('No')
   

if __name__ == "__main__":
    main()


Fixed submission:

def main():
    s = input()
    s_ = list(set(s))
    if s.count(s_[0]) == 2 and len(s_) == 2:
        print('Yes')
    else:
        print('No')
   

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):

def main():
    x, a = map(int, input().split())
    if x < a:
        print(0)
    else:
        print(10i)
   

if __name__ == "__main__":
    main()


Fixed submission:

def main():
    x, a = map(int, input().split())
    if x < a:
        print(0)
    else:
        print(10)
   

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):

def main():
    x, a = map(int, input().split())
    if x < 0:
        print(0)
    elif x >= a:
        print(10i)
    

if __name__ == "__main__":
    main()


Fixed submission:

def main():
    x, a = map(int, input().split())
    if x < a:
        print(0)
    else:
        print(10)
   

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):

def main():
    a, b = map(int, input())
    if a >= 13:
        print(b)
    elif 6 <= a <= 12:
        print(b // 2)
    else:
        print(0)


if __name__ == "__main__":
    main()


Fixed submission:

def main():
    a, b = map(int, input().split())
    if a >= 13:
        print(b)
    elif 6 <= a <= 12:
        print(b // 2)
    else:
        print(0)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):

def main():
    a, b = map(int, input().split())
    if b / a % 0:
        print(a + b)
    else:
        print(b - a)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    a, b = map(int, input().split())
    if b % a == 0:
        print(a + b)
    else:
        print(b - a)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):

def main():
    a, b = map(int, input().split())
    if b / a %i 0:
        print(a + b)
    else:
        print(b - a)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    a, b = map(int, input().split())
    if b % a == 0:
        print(a + b)
    else:
        print(b - a)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):

def main():
    n = int(input())
    a = int(input())
    b = int(input())
    if n == 1:
        print('Hello World')
    else:
        print(a + b)


if __name__ == "__main__":
    main()


Fixed submission:

def main():
    n = int(input())
    if n == 1:
        print('Hello World')
    else:
        a = int(input())
        b = int(input())
        print(a + b)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):

def main():
    x, y = map(int, input().split())
    print(abs((x // y + x % y) - (x // y)))


if __name__ == "__main__":
    main()
i

Fixed submission:

def main():
    x, y = map(int, input().split())
    if x % y != 0:
        print(abs((x // y + 1) - (x // y)))
    else:
        print(abs((x // y) - (x // y)))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):

def main():
    x = int(input())
    a = int(input())
    b = int(input())
    print((x - a) - (b * ((x - a) // b)))


if __name__ == "__main__":
    main()
i

Fixed submission:

def main():
    x = int(input())
    a = int(input())
    b = int(input())
    print((x - a) - (b * ((x - a) // b)))


if __name__ == "__main__":
    main()