Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
ans=0
for i in range(10):
  str_i = str(i)
  i_index==S.find(str_i)
  if i_index==-1:
    continue
  for j in range(10):
    str_j=str(j)
    j_index=S.find(str_j, i_index+1)
    if j_index==-1:
      continue
    for k in range(10):
      str_k=str(k)
      k_index=S.find(str_k, j_index+1) 
      if k_index!=-1:
        ans+=1
print(ans)

Fixed submission:
N=int(input())
S=input()
ans=0
for i in range(10):
  str_i = str(i)
  i_index=S.find(str_i)
  if i_index==-1:
    continue
  for j in range(10):
    str_j=str(j)
    j_index=S.find(str_j, i_index+1)
    if j_index==-1:
      continue
    for k in range(10):
      str_k=str(k)
      k_index=S.find(str_k, j_index+1) 
      if k_index!=-1:
        ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
li = list(map(int,input().split()))
n,m=li[0],li[1]
_list=[int(input()) for i in range(m)]
is_safe = [True] * (n+1)
for a in _list:
  is_safe[a] = False
DP=[1, 1] if is_safe[1] == True else [1, 0]
for i in range(n-1):
  if is_safe[i+2] == False:
    DP+= [0]
  else:
    DP += [DP[i] + DP[i+1]]
print(DP[n]%=1000000007 if DP[n] != 0 else 0)

Fixed submission:
li = list(map(int,input().split()))
n,m=li[0],li[1]
_list=[int(input()) for i in range(m)]
is_safe = [True] * (n+1)
for a in _list:
  is_safe[a] = False
DP=[1, 1] if is_safe[1] == True else [1, 0]
for i in range(n-1):
  if is_safe[i+2] == False:
    DP+= [0]
  else:
    DP += [DP[i] + DP[i+1]]
print(DP[n] % 1000000007 if DP[n] != 0 else 0)

Buggy python submission (verdict: Runtime Error):
li = list(map(int,input().split()))
n,m=li[0],li[1]
_list=[int(input()) for i in range(m)]
is_safe = [True] * (N)
for a in _list:
  is_safe[a] = False
DP=[1, 1] if is_safe[1] == True else [1, 0]
for i in range(n-1):
  if is_safe[i+2] == False:
    DP+= [0]
  else:
    DP += [DP[i] + DP[i+1]]
print(DP[n])

Fixed submission:
li = list(map(int,input().split()))
n,m=li[0],li[1]
_list=[int(input()) for i in range(m)]
is_safe = [True] * (n+1)
for a in _list:
  is_safe[a] = False
DP=[1, 1] if is_safe[1] == True else [1, 0]
for i in range(n-1):
  if is_safe[i+2] == False:
    DP+= [0]
  else:
    DP += [DP[i] + DP[i+1]]
print(DP[n] % 1000000007 if DP[n] != 0 else 0)
Buggy python submission (verdict: Runtime Error):
N, M = map(int,input().split())
state = []
for _ in range(M):
  lst = list(map(int, input().split()))
  state.append(lst[1:])#switch numbers each denkyu
p = list(map(int, input().split()))#numbers switches on %2 == pi 
ans = 0
for i in rage(2**n):
  total = 0
  for j in range(m):
    cnt = 0
    for s in state[j]:
      s -= 1
      if (i >> s) & 1:#全スイッチのパターン一つ一つについて、各電球の各スイッチがオンになっているか
        cnt += 1
    cnt %= 2
    if cnt == p[j]:
      total += 1
  if total == m:
    ans += 1
print(ans)

Fixed submission:
N, M = map(int,input().split())
state = []
for _ in range(M):
  lst = list(map(int, input().split()))
  state.append(lst[1:])#switch numbers each denkyu
p = list(map(int, input().split()))#numbers switches on %2 == pi 
ans = 0
for i in range(2**N):
  total = 0
  for j in range(M):
    cnt = 0
    for s in state[j]:
      s -= 1
      if (i >> s) & 1:#全スイッチのパターン一つ一つについて、各電球の各スイッチがオンになっているか
        cnt += 1
    cnt %= 2
    if cnt == p[j]:
      total += 1
  if total == M:
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
h = list(map(int, input().split()))

DP = [0, abs(h[0]-h[1])]

for i in range(N-2):
  DP += min((DP[-2] + abs(h[i]-h[i+2])),(DP[-1] + abs(h[i+2]-h[i+1])))
  
print(DP[-1])

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

DP = [0, abs(h[0]-h[1])]
for i in range(N-2):
  DP += [min(DP[-2] + abs(h[i]-h[i+2]),DP[-1] + abs(h[i+1] - h[i+2]))]
  
print(DP[-1])
Buggy python submission (verdict: Runtime Error):
n=int(input())
abc = [list(map(int, input().split())) for i in range(n)]
#[[10,40,70],[20,50,80],[30,60,90]]
ABC=[[0,0,0]]
#A = [0]
#B = [0]
#C = [0]
for i in range(n):
  a = abc[i][0] + max(ABC[-1][1], ABC[-1][2])#10+max(0,0),20+max(40,70)=90,30+max(120,120)=150
  b = abc[i][1] + max(ABC[-1][0], ABC[-1][2])#40+max(0,0),50+max(10,70)=120,60+max(90,120)=180
  c = abc[i][2] + max(ABC[-1][0], ABC[-1][1])#70+mac(0,0),80+max(10,40)=120,90+max(90,120)=210
  ABC += [[a,b,c]]
  #A += [a]#0,10,90,150
  #B += [b]#0,40,120,180
  #C += [c]#0,70,120,210
print(max(ABC[-1])

Fixed submission:
n=int(input())
abc = [list(map(int, input().split())) for i in range(n)]
#[[10,40,70],[20,50,80],[30,60,90]]
A = [0]
B = [0]
C = [0]
for i in range(n):
  a = abc[i][0] + max(B[-1], C[-1])#10+max(0,0),20+max(40,70)=90,30+max(120,120)=150
  b = abc[i][1] + max(A[-1], C[-1])#40+max(0,0),50+max(10,70)=120,60+max(90,120)=180
  c = abc[i][2] + max(A[-1], B[-1])#70+mac(0,0),80+max(10,40)=120,90+max(90,120)=210
  A += [a]#0,10,90,150
  B += [b]#0,40,120,180
  C += [c]#0,70,120,210
print(max(A[-1], B[-1], C[-1]))

Buggy python submission (verdict: Runtime Error):
n=int(input())
abc = [list(map(int, input().split())) for i in range(n)]
#[[10,40,70],[20,50,80],[30,60,90]]
ABC=[[0,0,0]]
#A = [0]
#B = [0]
#C = [0]
for i in range(n):
  a = abc[i][0] + max(B[-1], C[-1])#10+max(0,0),20+max(40,70)=90,30+max(120,120)=150
  b = abc[i][1] + max(A[-1], C[-1])#40+max(0,0),50+max(10,70)=120,60+max(90,120)=180
  c = abc[i][2] + max(A[-1], B[-1])#70+mac(0,0),80+max(10,40)=120,90+max(90,120)=210
  ABC += [[a,b,c]]
  #A += [a]#0,10,90,150
  #B += [b]#0,40,120,180
  #C += [c]#0,70,120,210
print(max(ABC[-1])

Fixed submission:
n=int(input())
abc = [list(map(int, input().split())) for i in range(n)]
#[[10,40,70],[20,50,80],[30,60,90]]
A = [0]
B = [0]
C = [0]
for i in range(n):
  a = abc[i][0] + max(B[-1], C[-1])#10+max(0,0),20+max(40,70)=90,30+max(120,120)=150
  b = abc[i][1] + max(A[-1], C[-1])#40+max(0,0),50+max(10,70)=120,60+max(90,120)=180
  c = abc[i][2] + max(A[-1], B[-1])#70+mac(0,0),80+max(10,40)=120,90+max(90,120)=210
  A += [a]#0,10,90,150
  B += [b]#0,40,120,180
  C += [c]#0,70,120,210
print(max(A[-1], B[-1], C[-1]))
Buggy python submission (verdict: Runtime Error):
https://atcoder.jp/contests/abc106/scoreN = int(input())
#cnt = 0
ans = 0
for i in range(1, N+1, 2):
    cnt = 0 
    for j in range(1, i+1):
        if i % j == 0:
            cnt += 1
    if cnt == 8:
        ans += 1
print(ans)


Fixed submission:
S = int(input())
ans = 0
count = 0
for i in range(1, S+1, 2):
    for j in range(1, i+1):
        if i % j == 0:
            count += 1
    if count == 8:
        ans += 1
    count = 0
print(ans)
Buggy python submission (verdict: Runtime Error):
L=[1]
n=int(input())
x = 6
y = 9
while x <= n:
  L.append(x)
  x *= 6
while y <= n:
  L.append(y)
  y *= 9
L.sort()#[1,6,9,36,81]
dp = [float("Inf")]*(n+1)
dp[0] = 0
for i in range(n+1):#0~81
  for j in L:#1,6,9
    dp[i+j] = min(dp[i+j],dp[i]+1)#dp=[0,1,...1,.1]
print(dp[n])

Fixed submission:
L=[1]
n=int(input())
x = 6
y = 9
while x <= n:
  L.append(x)
  x *= 6
while y <= n:
  L.append(y)
  y *= 9
L.sort()#[1,6,9,36,81]
dp = [float("Inf")]*(n+1)
dp[0] = 0
for i in range(n+1):#0~81
  for j in L:#1,6,9
    if i+j <= n:
      dp[i+j] = min(dp[i+j],dp[i]+1)#dp=[0,1,...1,.1]
    else:
      break
print(dp[n])
Buggy python submission (verdict: Runtime Error):
A,B,C,X,Y=map(int,input().split)
a=A*X+B*Y
b=max(X,Y)*C*2
p=B if X<Y else A
c=min(X,Y)*2*C+abs(X-Y)*p
print(min(a,b,c))

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

if C*2 >= A+B:
    print(A*X+B*Y)
else:
    if X > Y:
        ans=Y*2*C+(X-Y)*A
        ans=min(ans, X*2*C)
    else:
        ans=X*2*C+(Y-X)*B
        ans=min(ans, C*2*Y)
    print(ans)
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())
res=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:
                res + = 1
print(res)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
res=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:
                res += 1
print(res)

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())
res=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:
              	res + = 1
print(res)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
res=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:
                res += 1
print(res)
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
c = a * b
if c % 2 == 0:
	print('Even')
  else:
  	print('Odd')

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

Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split)
c = a * b
if c % 2 == 0:
	print('Even')
  else:
  	print('Odd')

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

Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split)
c = a * b
if c % 2 == 0:
	print(Even)
  else:
  	print(Odd)

Fixed submission:
a,b = map(int, input().split())
c = a * b
if c % 2 == 0:
	print('Even')
else:
  	print('Odd')
Buggy python submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
ans = 0
for i in range(n+1):
      if a <= sum(list(map(int, list(str(i)))) <= b:
          ans += i
print(ans)

Fixed submission:
n, a, b = map(int, input().split())
ans = 0
for i in range(1, n+1):
      if a <= sum([int(c) for c in str(i)]) <= b:
          ans += i
print(ans)

Buggy python submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
ans = 0
for i in range(n):
      if a <= sum(list(map(int, list(str(i)))) <= b:
          ans += i
print(ans)

Fixed submission:
n, a, b = map(int, input().split())
ans = 0
for i in range(1, n+1):
      if a <= sum([int(c) for c in str(i)]) <= b:
          ans += i
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
A = 0
B = 0
C = 0

if a == 1:
  	A = 1

if b == 1:
  	B = 1

if c == 1:
  	C = 1

print(A+B+C)


Fixed submission:
print(input().count("1"))

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
if a == 1:
  	A = 1
else:
  	A = 0
if b == 1:
  	B = 1
else:
  	B = 0
if c == 1:
  	C = 1
else:
  	C = 0
print(A+B+C)


Fixed submission:
print(input().count("1"))

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
if a == 1:
  A = 1
else:
  A = 0
if b == 1:
  B = 1
else:
  B = 0
if c == 1:
  C = 1
else:
  C = 0
print(A+B+C)


Fixed submission:
print(input().count("1"))
Buggy python submission (verdict: Runtime Error):
N = input()
A = list(map(int, input().split()))
cnt = 0
while all(a%2==0 for a in A):
  	A = [a/2 for a in A]
    cnt += 1
print(cnt)

Fixed submission:
N = input()
A = list(map(int, input().split()))
cnt = 0
while all(a%2==0 for a in A):
    A = [a/2 for a in A]
    cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
n = input()
op_cnt = len(n) - 1
for i in range(2 ** op_cnt):
  op = ['-'] * op_cnt#['-', '-', '-']
  for j in range(op_cnt):
    if ((i >> j) & 1):
      op[-1-j] = '+'
      formula = ''
  for p_n, p_o in zip(n, op + ['']):#(1,+),(2,+),(3,+),(4,'')
    formula += (p_n + p_o)
  if eval(formula) == 7:#'1+2+3+4'
    print(formula + '=7')
    break

Fixed submission:
n = input()
op_cnt = len(n) - 1
for i in range(2 ** op_cnt):
  op = ['-'] * op_cnt#['-', '-', '-']
  for j in range(op_cnt):
    if ((i >> j) & 1):
      op[-1-j] = '+'
  formula = ''
  for p_n, p_o in zip(n, op + ['']):#(1,+),(2,+),(3,+),(4,'')
    formula += (p_n + p_o)
  if eval(formula) == 7:#'1+2+3+4'
    print(formula + '=7')
    break

Buggy python submission (verdict: Runtime Error):
n = [int(x) for x in input()]
op_cnt = len(n) - 1
for i in range(2 ** op_cnt):
	op = ['-'] * op_cnt#['-', '-', '-']
    for j in range(op_cnt):
      if ((i >> j) & 1):
        op[-1-j] = '+'
    formula = ''
    for p_n, p_o in zip(n, op + ['']):#(1,+),(2,+),(3,+),(4,'')
      formula += (p_n + p_o)
    if eval(formula) == 7:#'1+2+3+4'
      print(formula + '=7')
      break

Fixed submission:
n = input()
op_cnt = len(n) - 1
for i in range(2 ** op_cnt):
  op = ['-'] * op_cnt#['-', '-', '-']
  for j in range(op_cnt):
    if ((i >> j) & 1):
      op[-1-j] = '+'
  formula = ''
  for p_n, p_o in zip(n, op + ['']):#(1,+),(2,+),(3,+),(4,'')
    formula += (p_n + p_o)
  if eval(formula) == 7:#'1+2+3+4'
    print(formula + '=7')
    break
Buggy python submission (verdict: Runtime Error):
N = int(input())
import math
if N == 1:
    print(1)
else:
    for a in reversed(range(1, (int(math.sqrt(N)))+1)):
        if N % a == 0:
            b = N/a
            ans=max(len(str(int(a))), len(str(int(b))))
            break
print(ans)



Fixed submission:
N = int(input())
import math
if N == 1:
    print(1)
else:
    for a in reversed(range(1, (int(math.sqrt(N)))+1)):
        if N % a == 0:
            b = N/a
            ans=max(len(str(int(a))), len(str(int(b))))
            break
    print(ans)

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

if N == 1:
    print(1)
else:
    for a in reversed(range(1, (N//2)+1)):
        if N % a == 0:
            b = N/a
            ans=max(len(str(int(a))), len(str(int(b))))
            break
print(ans)



Fixed submission:
N = int(input())
import math
if N == 1:
    print(1)
else:
    for a in reversed(range(1, (int(math.sqrt(N)))+1)):
        if N % a == 0:
            b = N/a
            ans=max(len(str(int(a))), len(str(int(b))))
            break
    print(ans)
Buggy python submission (verdict: Runtime Error):
_ = raw_input()
tests = [int(test) for test in raw_input().split(" ")]
total_time = sum(tests)
drinks = raw_input()
for _ in range(drinks):
    i = raw_input().split(" ")
    no, time = i[0], i[1]
    print total_time - (tests[no] - time)


Fixed submission:
s = raw_input()
print eval(s)
Buggy python submission (verdict: Runtime Error):
_ = raw_input()
tests = [int(test) for test in raw_input().split(" ")]
total_time = sum(tests)
drinks = raw_input()
for _ in range(drinks):
    i = raw_input().split(" ")
    no, time = i[0], i[1]
    print total_time - (tests[no - 1] - time)


Fixed submission:
_ = raw_input()
tests = [int(test) for test in raw_input().split(" ")]
total_time = sum(tests)
drinks = int(raw_input())
for _ in range(drinks):
    i = [int(x) for x in raw_input().split(" ")]
    no, time = i[0], i[1]
    print total_time - (tests[no - 1] - time)
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
x = -(-c // b)
y = -(-a // d)
if x <= y:
    print('Yes')
else:
    print('No')


Fixed submission:
s, w = map(int, input().split())
if s <= w: print('unsafe')
else     : print('safe')
Buggy python submission (verdict: Runtime Error):
s = input()
if s[3]==s[4] and s[5]==s[6]:
    print('Yes')
else:
    print('No')

Fixed submission:
s = input()
if s[2] == s[3] and s[4] == s[5]:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
s = input()
if s[3] == s[4] and s[5] == s[6]:
    print('Yes')
else:
    print('No')

Fixed submission:
s = input()
if s[2] == s[3] and s[4] == s[5]:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
n=len(s)
x=n//2
a=s[0:x]
b=s[x+1:]
if a==b:print('Yes')
else:print('No')

Fixed submission:
s=input()
n=len(s)
x=n//2
a=s[0:x]
b=s[x+1:]
if a==b:print('Yes')
else:print('No')
Buggy python submission (verdict: Runtime Error):
s = input()
if s=='AAA' or s==s'BBB:
    print('No')
else:
    print('Yes')

Fixed submission:
s = input()
if s=='AAA' or s=='BBB':
    print('No')
else:
    print('Yes')

Buggy python submission (verdict: Runtime Error):
s = input()
if s[1]!=s[2] and s[2]!=s[3]:
    print('Yes')
else:
    print('No')

Fixed submission:
s = input()
if s=='AAA' or s=='BBB':
    print('No')
else:
    print('Yes')

Buggy python submission (verdict: Runtime Error):
s = input()
if not s[1]==s[2]==s[3]:
    print('Yes')
else:
    print('No')

Fixed submission:
s = input()
if s=='AAA' or s=='BBB':
    print('No')
else:
    print('Yes')

Buggy python submission (verdict: Runtime Error):
s = input()
if not s[1]==s[2] and s[2]==s[3]:
    print('No')
else:
    print('Yes')

Fixed submission:
s = input()
if s=='AAA' or s=='BBB':
    print('No')
else:
    print('Yes')

Buggy python submission (verdict: Runtime Error):
s = input()
if not s[1]==s[2]==s[3]:
    print('No')
else:
    print('Yes')

Fixed submission:
s = input()
if s=='AAA' or s=='BBB':
    print('No')
else:
    print('Yes')
Buggy python submission (verdict: Runtime Error):
n = int(input())

if n%2 == 0: print({}.format(n/2))
else:        print({}.format(n/2+1))

Fixed submission:
from decimal import Decimal, ROUND_HALF_UP

n = int(input())
print(Decimal(n/2).quantize(Decimal(0), rounding=ROUND_HALF_UP))
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split)
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):
print(int(input(**2))


Fixed submission:
r = int(input())
print(r**2)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
lst=[k<h int(h) for h in input().split()]
x=len(lst)
print(x)

Fixed submission:
n, k = map(int, input().split())
lst = [int(i) for i in input().split()]
print(len([j for j in lst if j >= k]))

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
print=(len.list[x for x in int(input()) if k<x])


Fixed submission:
n, k = map(int, input().split())
lst = [int(i) for i in input().split()]
print(len([j for j in lst if j >= k]))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
ans = c-(a-b)
if ans >= 0:
    print(ans)
else:
    print(o)


Fixed submission:
a, b, c = map(int, input().split())
ans = c-(a-b)
if ans >= 0:
    print(ans)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
n=int(input())
p = list(map(int, input().split()))
ans=0
x=0
for i in range(n+1):
	if p[x] < p[x+1]:
		ans+=1
		x+=1
print(ans)

Fixed submission:
n=int(input())
p = list(map(int, input().split()))
ans=0

for i in range(1,n-1):
  if p[i-1]<p[i]<p[i+1] or p[i+1]<p[i]<p[i-1]:
    ans+=1
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input)
p = list(map(int, input().split()))
ans=0
x=0
for i in range(n+1):
	if p[x] < p[x+1]:
		ans+=1
		x+=1
print(ans)

Fixed submission:
n=int(input())
p = list(map(int, input().split()))
ans=0

for i in range(1,n-1):
  if p[i-1]<p[i]<p[i+1] or p[i+1]<p[i]<p[i-1]:
    ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
s = list(map(int, input().split()))
if s[0] != s[1] and s[1] != s[2] and s[2] != s[3]:
    print('Good')
else:
    print('Bad')


Fixed submission:
s = list(input())
if s[0] != s[1] and s[1] != s[2] and s[2] != s[3]:
    print('Good')
else:
    print('Bad')

Buggy python submission (verdict: Runtime Error):
s = list(map(int, input().split()))
if s[0] != s[1] != s[2] != s[3]:
    print('Good')
else:
    print('Bad')


Fixed submission:
s = list(input())
if s[0] != s[1] and s[1] != s[2] and s[2] != s[3]:
    print('Good')
else:
    print('Bad')
Buggy python submission (verdict: Runtime Error):
r,t,x=map(int,input().split())
print(a=r*x-t)
print(b=r*a-t)
print(c=r*b-t)
print(d=r*c-t)
print(e=r*d-t)
print(f=r*e-t)
print(g=r*f-t)
print(h=r*g-t)
print(i=r*h-t)
print(j=r*i-t)


Fixed submission:
r,t,x=map(int,input().split())
a=r*x-t
b=r*a-t
c=r*b-t
d=r*c-t
e=r*d-t
f=r*e-t
g=r*f-t
h=r*g-t
i=r*h-t
j=r*i-t
print(a)
print(b)
print(c)
print(d)
print(e)
print(f)
print(g)
print(h)
print(i)
print(j)
Buggy python submission (verdict: Runtime Error):
ab,c=map(int,input().split())
print(a*b//2)

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


Fixed submission:
n = int(input())
if n == 1:
    print('Hello World')
else:
    a = int(input())
    b = int(input())
    print(a+b)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
 
diff = B - A
height_A = diff * (diff - 1) // 2
 
ans = height_A - A
 
print(ans)

Fixed submission:
n=int(input())
print('ABC' if n < 1000 else 'ABD')
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=int(input())
if n%500=<a:
	print('Yes')
else:
	print('No')


Fixed submission:
n=int(input())
a=int(input())
if n%500 <= a:
	print('Yes')
else:
	print('No')
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
if b>c:
    print(b-c-a)
elif:
    print(0)

Fixed submission:
a,b,c,d=map(int,input().split())
if min(b,d)-max(a,c)>0:
    print(min(b,d)-max(a,c))
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
import re
s = input()
x = s[8:-8]
print('{}''{}''{}'.format('A', *re.findall('[A-Z]', x), 'C'))


Fixed submission:
s = input()
print('A'+s[8]+'C')
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

if s.count('5') == 2 and s.count('7') == 1:
    print("Yes")
else:
    print("No")

Fixed submission:
s = input().split(" ")
if s.count('5') == 2 and s.count('7') == 1:
	print("YES")
else:
	print("NO")

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

s = a + b + c

if s.count('5') == 2 and s.count('7') == 1:
    print("Yes")
else:
    print("No")

Fixed submission:
s = input().split(" ")
if s.count('5') == 2 and s.count('7') == 1:
	print("YES")
else:
	print("NO")

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

if a + b + c == 5, 5, 7:
    print("Yes")
else:
    print("No")

Fixed submission:
s = input().split(" ")
if s.count('5') == 2 and s.count('7') == 1:
	print("YES")
else:
	print("NO")

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

if a + b + c == 17:
    print("Yes")
else:
    print("No")

Fixed submission:
s = input().split(" ")
if s.count('5') == 2 and s.count('7') == 1:
	print("YES")
else:
	print("NO")

Buggy python submission (verdict: Runtime Error):
a = int(input("ここに数値を入力してください:"))
b = int(input("ここに数値を入力してください:"))
c = int(input("ここに数値を入力してください:"))

if a + b + c == 17:
    print("Yes")
else:
    print("No")

Fixed submission:
s = input().split(" ")
if s.count('5') == 2 and s.count('7') == 1:
	print("YES")
else:
	print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
#-------------------------------------
n = int(input())
v = n
ammount = 0
for i in range(v):
    ammount += v
    v -= 1

print(ammount-n)

Fixed submission:
import sys
input = sys.stdin.readline
#-------------------------------------
n = int(input())
print((n+1) * (n//2) + (n%2)*(n//2+1) - n)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
#-------------------------------------
v = int(input())
n = [i+1 for i in range(v)]
p = n[::-1]

ammount = 0
for i in range(v):
    ammount += n[i]

print(ammount-v)

Fixed submission:
import sys
input = sys.stdin.readline
#-------------------------------------
n = int(input())
print((n+1) * (n//2) + (n%2)*(n//2+1) - n)
Buggy python submission (verdict: Runtime Error):

import sys
input = sys.stdin.readline
#-------------------------------------
import math

a,b,c,d = map(int,input().split())
cd = c*d
bcnt = b-(b//c+b//d-b//(cd//math.gcd(c,d)))
acnt = 0
if a>1:
        a -= 1
        acnt = a-(a//c+a//d-a//(cd//math.gcd(c,d)))

print(bcnt-acnt)

Fixed submission:
import sys
input = sys.stdin.readline
#-------------------------------------
def gcd( x, y ):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)

a,b,c,d = map(int,input().split())
cd = c*d
bcnt = b-(b//c+b//d-b//(cd//gcd(c,d)))
acnt = 0
if a>1:
        a -= 1
        acnt = a-(a//c+a//d-a//(cd//gcd(c,d)))

print(bcnt-acnt)