Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = list(map(int, input().split()))
min_train = min(N[0],N[1])
min_bus = min(N[2],N[3])
print(min_train+ min_bus)


Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = min(A,B)
F = min(C,D)
print(E+F)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a*b%2==0:
    print('Even')
else:
    print('Odd')


Fixed submission:
a = list(map(int, input().split()))
if a[0]*a[1]%2==0:
    print('Even')
else:
    print('Odd')
Buggy python submission (verdict: Runtime Error):
N = list(map(int, input().split()))
if (N[0]+N[1])%2==0:
    print((N[0]+N[1])//2)
else:
    print(()(N[0]+N[1])//2)+1)


Fixed submission:
N = list(map(int, input().split()))
d = N[0]+N[1]
if d%2==0:
    print(d//2)
else:
    print(d//2+1)

Buggy python submission (verdict: Runtime Error):
N = list(map(int, input().split()))
if (N[0]+N[1])%2==0:
    print((N[0]+N[1])//2)
else:
    print(()(N[0]+N[1])//2)+1)


Fixed submission:
N = list(map(int, input().split()))
d = N[0]+N[1]
if d%2==0:
    print(d//2)
else:
    print(d//2+1)
Buggy python submission (verdict: Time Limit Exceeded):
n,k = list(map(int, input().split()))
s = input()

# print(n, k, s)

prevcCt = 0 # 前に連続逆立ちの数
nextCnt = 0 # 後ろに連続逆立ちの数

# "00010" ⇒ [-3, 1, -1]のような配列に変換

val = 0
vals = []
for i in range(len(s)):
	if s[i] == "0":
		val -= 1
	else:
		val += 1

	#print(i, val, s[i], s[i+1])
	# print(i,len(s))
	if i == len(s) - 1 or s[i] != s[i+1]:
		vals.append(val)
		val = 0

#print(vals)

#操作しやすいようにマイナス要素が偶数になるように先頭に0を追加
if vals[0] < 0:
	vals.insert(0,0)

vals.append(0)
vals.append(0)

#print(vals)

vals = list(map(abs, vals))
#print(vals)


# K回操作できるということは連続した2k+1個の要素の最大値を求めればよい
max = 0

loopCnt = len(vals) - k
if  loopCnt < 1:
	loopCnt = 1

for i in range(loopCnt):
	#print(i, len(vals), k)
	# 偶数の時だけ判定
	if i%2 == 0:
		# print(vals[i:i + 2*k + 1])

		sumVal = sum(vals[i:i + 2*k + 1])
		# for e in vals[i:i + 2*k + 1]:
		# 	sumVal += abs(e)
		if sumVal > max:
			max = sumVal

print(max)


Fixed submission:
n,k = list(map(int, input().split()))
s = input()

# print(n, k, s)

prevcCt = 0 # 前に連続逆立ちの数
nextCnt = 0 # 後ろに連続逆立ちの数

# "00010" ⇒ [-3, 1, -1]のような配列に変換

val = 0
vals = []
for i in range(len(s)):
	if s[i] == "0":
		val -= 1
	else:
		val += 1

	#print(i, val, s[i], s[i+1])
	# print(i,len(s))
	if i == len(s) - 1 or s[i] != s[i+1]:
		vals.append(val)
		val = 0

#print(vals)

#操作しやすいようにマイナス要素が偶数になるように先頭に0を追加
if vals[0] < 0:
	vals.insert(0,0)

vals.append(0)
vals.append(0)

#print(vals)

vals = list(map(abs, vals))
#print(vals)


# K回操作できるということは連続した2k+1個の要素の最大値を求めればよい
max = 0

loopCnt = len(vals) - k
if  loopCnt < 1:
	loopCnt = 1


# 最初の要素をベースとする
sumVal = sum(vals[0:2*k + 1])
max = sumVal

# print(vals)
# print(max)

for i in range(loopCnt):
	#print(i, len(vals), k)
	# 偶数の時だけ判定
	if i%2 == 0 and i>0:
		# 外れた要素の合計値
		outVal = sum(vals[i-2:i])
		# 新たに加わった要素の合計値
		inVal = sum(vals[i + 2*k -1:i + 2*k + 1])
	
		sumVal = sumVal - outVal + inVal

		#print(i, vals[i-2:i], outVal, vals[i + 2*k -1:i + 2*k + 1], inVal, sumVal)
		# print(vals[i:i + 2*k + 1])

		#sumVal = sum(vals[i:i + 2*k + 1])
		# for e in vals[i:i + 2*k + 1]:
		# 	sumVal += abs(e)
		if sumVal > max:
			max = sumVal

print(max)
Buggy python submission (verdict: Runtime Error):
A, B, T = input().split()
print((T/A)*B)

Fixed submission:
A, B, T = map(int, input().split())
print(int(T/A)*B)

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

Fixed submission:
A, B, T = map(int, input().split())
print(int(T/A)*B)

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

Fixed submission:
A, B, T = map(int, input().split())
print(int(T/A)*B)
Buggy python submission (verdict: Runtime Error):
N = input()
H = list(map(int,input().split()))
count = 0
max = 0
for h in H:
  if max<=h:
    count++
    max=h
    
print(count)

Fixed submission:
N = input()
H = list(map(int,input().split()))
count = 0
max = 0
for h in H:
  if max<=h:
    count+=1
    max=h
    
print(count)
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
if e-a<=k:
  print('Yay!')
else:
  print(':(')


Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
  print('Yay!')
else:
  print(':(')

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
if e-a<=k:
  print('Yay!')
  else
  print(':(')


Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
  print('Yay!')
else:
  print(':(')

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
if e-a<k:
  print('Yay!')
  else
  print(':(')


Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
  print('Yay!')
else:
  print(':(')

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
if e-a>k:
  print('Yay!')
  else
  print(':(')

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a<=k:
  print('Yay!')
else:
  print(':(')
Buggy python submission (verdict: Runtime Error):
time=[]
for i in range(5):
  time.append(input())

num=[]
min=10
  
for list in time:
  if list%10==0:
    num.append(list)
  else:
    num.append(list+(10-list%10))
    if min>list%10:
      min=list%10

print(sum(num)-(10-min))
  
  



Fixed submission:
time=[]
for i in range(5):
  time.append(int(input()))

num=[]
min=10
  
for list in time:
  if list%10==0:
    num.append(list)
  else:
    num.append(list+(10-list%10))
    if min>list%10:
      min=list%10

print(sum(num)-(10-min))
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())

if (a > 8 or b>8):
    print(":(")
else
    print("Yay!")

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

if (a > 8 or b>8):
    print(":(")
else:
    print("Yay!")
Buggy python submission (verdict: Runtime Error):
a= input()

if (a >= 1000):
    print ("ABD")
else:
    print("ABC")


Fixed submission:
a= int(input())

if (a >= 1000):
    print ("ABD")
else:
    print("ABC")
Buggy python submission (verdict: Runtime Error):
A, B, T = map(int, input().split)
print(T//A*B)

Fixed submission:
A, B, T = map(int, input().split())
print(T//A * B)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
if A == B:
  print(A　+　B)
elif A > B:
  print(A　*　2　-　1)
else:
  print(B　*　2　-　1)

Fixed submission:
A, B = map(int, input().split())
if A == B:
  print(A+B)
elif A > B:
  print(A*2-1)
else:
  print(B*2-1)
Buggy python submission (verdict: Runtime Error):
a, e = map(int, input().split())

if e - a <= k:
  print('Yay!')
else:
  print(':(')

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e - a <= k:
  print('Yay!')
else:
  print(':(')
Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split)
print(min(C, B//A)

Fixed submission:
A, B, C = map(int, input().split())
print(min(C, B//A))
Buggy python submission (verdict: Runtime Error):
X = int(input())
	if X in [7, 5, 3]:
    	print('YES')
	else:
		print('NO')


Fixed submission:
X = int(input())
if X == 7:
  print('YES')
elif X == 5:
  print('YES')
elif X == 3:
  print('YES')
else:
  print('NO')

Buggy python submission (verdict: Runtime Error):
X = int(input())
	if X in [7, 5, 3]:
    	print('YES')
	else:
		print('NO')

Fixed submission:
X = int(input())
if X == 7:
  print('YES')
elif X == 5:
  print('YES')
elif X == 3:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())

if N == 1:
  print('Hello World')
elif N == 2:
  print(int(A + B))

Fixed submission:
N = int(input())
if N == 1:
  print('Hello World')
  
elif N == 2:
  A = int(input())
  B = int(input())
  print(A + B)
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n % 2 == 0:
  print(n)
elif:
  print(n * 2)

Fixed submission:
n = int(input())
if n % 2 == 0:
  print(n)
else:
  print(n * 2)
Buggy python submission (verdict: Runtime Error):
s = row_input()
print(s.count('+') - s.count('-'))

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

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

Fixed submission:
a, b = map(int, input().split())
if a > b:
  print(a -1)
else:
  print(a)
Buggy python submission (verdict: Runtime Error):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))

for i in range(N):
    if V[i] <= C[i]:
        continue
    Max = Max + V[i] - C[i]
print(Max)

Fixed submission:
A,B,T = map(int,input().split())
print(T//A*B)
Buggy python submission (verdict: Runtime Error):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))

for i in range(N):
    if V[i] <= C[i]:
        continue
    Max = Max + V[i] - C[i]
print(Max)

Fixed submission:
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
Max = 0

#先頭
for i in range(N):
    if V[i] <= C[i]:
        continue
    X,Y = V[i],C[i]
    tmpMax = X - Y
    for j in range(i+1,N):
        if V[j] <= C[j]:
            continue
        if Max < (X + V[j]) - (Y + C[j]):
            X = X + V[j]
            Y = Y + C[j]
            tmpMax = X - Y
    if Max < tmpMax:
        Max = tmpMax
        
print(Max)
Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int,input().split())

counter = 0

for x in range(k+1):
    if s-x > 2 * k:
        continue
    for y in range(k+1):
        if s-x-y > k:
            continue
        elif s-x-y <= k and s-x-y >=0:
            counter += 1
                
print(counter)

Fixed submission:
k,s = map(int,input().split())
counter = 0

for x in range(k+1):
    if s-x > 2*k:
        continue
    for y in range(k+1):
        if s-x-y > k or s-x-y < 0:
            continue
        else:
            counter += 1
            
print(counter)

Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int,input().split())

counter = 0

for x in range(k+1):
    if s-x > 2 * k:
        continue
    for y in range(k+1):
        if s-x-y > k:
            continue
        if s-x-y <= k and s-x-y >=0:
            counter += 1
                
print(counter)

Fixed submission:
k,s = map(int,input().split())
counter = 0

for x in range(k+1):
    if s-x > 2*k:
        continue
    for y in range(k+1):
        if s-x-y > k or s-x-y < 0:
            continue
        else:
            counter += 1
            
print(counter)

Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int,input().split())

counter = 0

for x in range(k+1):
    if s-x > 2 * k:
        continue
    for y in range(k+1):
        if s-x-y > k:
            continue
        for z in range(k+1):
            if s == x+y+z:
                counter += 1
                break
                
print(counter)

Fixed submission:
k,s = map(int,input().split())
counter = 0

for x in range(k+1):
    if s-x > 2*k:
        continue
    for y in range(k+1):
        if s-x-y > k or s-x-y < 0:
            continue
        else:
            counter += 1
            
print(counter)

Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int,input().split())

counter = 0

for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if s == x+y+z:
                counter += 1
                
print(counter)

Fixed submission:
k,s = map(int,input().split())
counter = 0

for x in range(k+1):
    if s-x > 2*k:
        continue
    for y in range(k+1):
        if s-x-y > k or s-x-y < 0:
            continue
        else:
            counter += 1
            
print(counter)

Buggy python submission (verdict: Runtime Error):
k = int(input())
s = int(input())
counter = 0

for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if s == x+y+z:
                counter += 1
                
print(counter)

Fixed submission:
k,s = map(int,input().split())
counter = 0

for x in range(k+1):
    if s-x > 2*k:
        continue
    for y in range(k+1):
        if s-x-y > k or s-x-y < 0:
            continue
        else:
            counter += 1
            
print(counter)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A = int(input())
if A < 1:
    print('×')
else:
    B = int(input())
    if B < 0:
        print('×')
    else:    
        T = int(input())
        if T < 0 and T > 20:
            print('×')
        else:                    
            T+=0.5
            ans = (T // A) *B
            print(ans)

Fixed submission:
hoge = input()

a, b, t = [int(x) for x in hoge.split(' ')]

print(int(((t+0.5)//a)*b))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# AtCoder Beginner Contest 125
# C - GCD on Blackboard

# N-1個の全パターンの最大公約数の最大値でOK

# 最大公約数を計算
# ユークリッドの互除法を用いる
# def gcd(x, y):
#     # 大きい方をaに
#     a, b = (x,y) if x>y else (y,x)
#     if a == b:
#         return a
#     else:
#         return gcd(a-b,b)

# 再帰で書くと数字が大きいときに最大深さを超えてしまう！
def gcd(x, y):
    while x != y:
        x, y = (x-y,y) if x>y else (y-x,x)
    return x
        

# N個の整数に対する最大公約数の計算
def calc(n, an):
    if n == 2:
        return gcd(an[0], an[1])
    else:
        return gcd(an[0], calc(n-1, an[1:]))


n = int(input())
an = [int(x) for x in input().split(' ')]

if n == 2:
    print(max(an))
else:
    #N-1個の組み合わせに対する最大公約数で最大のものを選ぶ
    # N-1個の組み合わせ
    bn = [[an[j] for j in range(n) if i != j] for i in range(n)]
    gcds = [calc(n-1, ary) for ary in bn]
    print(max(gcds))

Fixed submission:
hoge = input()

a, b, t = [int(x) for x in hoge.split(' ')]

print(int(((t+0.5)//a)*b))

Buggy python submission (verdict: Runtime Error):
# 最大公約数を計算
# ユークリッドの互除法を用いる
def gcd(x, y):
    # 大きい方をaに
    a, b = (x,y) if x>y else (y,x)
    if a == b:
        return a
    else:
        return gcd(a-b,b)

# N個の整数に対する最大公約数の計算
def calc(n, an):
    if n == 2:
        return gcd(an[0], an[1])
    else:
        return gcd(an[0], calc(n-1, an[1:]))


n = int(input())
an = [int(x) for x in input().split(' ')]

if n == 2:
    print(max(an))
else:
    #N-1個の組み合わせに対する最大公約数で最大のものを選ぶ
    # N-1個の組み合わせ
    bn = [[an[j] for j in range(n) if i != j] for i in range(n)]
    gcds = [calc(n-1, ary) for ary in bn]
    print(max(gcds))

Fixed submission:
hoge = input()

a, b, t = [int(x) for x in hoge.split(' ')]

print(int(((t+0.5)//a)*b))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# AtCoder Beginner Contest 125
# C - GCD on Blackboard

# N-1個の全パターンの最大公約数の最大値でOK

# 最大公約数を計算
# ユークリッドの互除法を用いる
def gcd(x, y):
    # 大きい方をaに
    a, b = (x,y) if x>y else (y,x)
    if a == b:
        return a
    else:
        return gcd(a-b,b)

# N個の整数に対する最大公約数の計算
def calc(n, an):
    if n == 2:
        return gcd(an[0], an[1])
    else:
        return gcd(an[0], calc(n-1, an[1:]))


n = int(input())
an = [int(x) for x in input().split(' ')]

if n == 2:
    print(max(an))
else:
    #N-1個の組み合わせに対する最大公約数で最大のものを選ぶ
    # N-1個の組み合わせ
    bn = [[j for j in an if i != j] for i in an]
    if len(bn) == 0:
        print(an[0])
    else:
        gcds = [calc(n-1, ary) for ary in bn]
        print(max(gcds))

Fixed submission:
hoge = input()

a, b, t = [int(x) for x in hoge.split(' ')]

print(int(((t+0.5)//a)*b))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
A = [int(v) for v in input().split(' ')]

# 負の数が偶数 -> 全部+にできる
# 負の数が奇数 -> どれか一つが-になる
# 負の数の偶奇チェック
sign = 1
for a in A:
    sign *= a/abs(a)

abs_A = [abs(a) for a in A]

if sign > 0:
    print(sum(abs_A))
else:
    print(sum(abs_A)-min(abs_A)*2)

Fixed submission:

N = int(input())
A = [ int(v) for v in input().split() ]

if N < 2 and 1e5 < N: raise()
for v in A:
    if v < -1e9 and v < 1e9: raise()

abs_list = [abs(v) for v in A]

total = sum( abs_list )
num_of_minus = sum([ True for v in A if v < 0 ])

if num_of_minus % 2 == 1:
    print(total - min( abs_list ) * 2)
else:
    print(total)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
A = [int(v) for v in input().split(' ')]

# 負の数が偶数 -> 全部+にできる
# 負の数が奇数 -> どれか一つが-になる
# 負の数の偶奇チェック
sign = 1
for a in A:
    sign *= a/abs(a)

abs_A = [abs(a) for a in A]

if sign > 0:
    print(sum(abs_A))
else:
    print(sum(abs_A)-min(abs_A))

Fixed submission:

N = int(input())
A = [ int(v) for v in input().split() ]

if N < 2 and 1e5 < N: raise()
for v in A:
    if v < -1e9 and v < 1e9: raise()

abs_list = [abs(v) for v in A]

total = sum( abs_list )
num_of_minus = sum([ True for v in A if v < 0 ])

if num_of_minus % 2 == 1:
    print(total - min( abs_list ) * 2)
else:
    print(total)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N = int(input())
A = [int(v) for v in input().split(' ')]

# 負の数が偶数 -> 全部+にできる
# 負の数が奇数 -> どれか一つが-になる
# 負の数の偶奇チェック
sign = 1
for a in A:
    sign *= a/abs(a)
    
if sign > 0:
    print(sum(A))
else:
    print(sum(A)-min(A))

Fixed submission:

N = int(input())
A = [ int(v) for v in input().split() ]

if N < 2 and 1e5 < N: raise()
for v in A:
    if v < -1e9 and v < 1e9: raise()

abs_list = [abs(v) for v in A]

total = sum( abs_list )
num_of_minus = sum([ True for v in A if v < 0 ])

if num_of_minus % 2 == 1:
    print(total - min( abs_list ) * 2)
else:
    print(total)
Buggy python submission (verdict: Runtime Error):
A,B,C=map(int,input().split)
d=B//A
if d<C:
  print(d)
else:
  print(C)

Fixed submission:
A,B,C=map(int,input().split())
d=B//A
if d<C:
  print(d)
else:
  print(C)

Buggy python submission (verdict: Runtime Error):
A,B,C=map(int,input().split())
d=B//A
if d<=C:
  print(d)
  else:
    print(C)


Fixed submission:
A,B,C=map(int,input().split())
d=B//A
if d<C:
  print(d)
else:
  print(C)

Buggy python submission (verdict: Runtime Error):
A,B,C=map(int,input().split())
d=B//A
if d<C:
  print(d)
  else:
    print(C)

Fixed submission:
A,B,C=map(int,input().split())
d=B//A
if d<C:
  print(d)
else:
  print(C)
Buggy python submission (verdict: Runtime Error):
S=input()
if S<=2019/4/30:
  print(Heisei)
else:
  print(TBD)

Fixed submission:
S=input()
if S<='2019/04/30':
  print('Heisei')
else:
  print('TBD')
Buggy python submission (verdict: Runtime Error):
A,B = int(input().split())
coin = 0
for i in range (2):
  if A>B:
    coin+=A
  else:
    coin+=B
    
print(coin)


Fixed submission:
A,B = input().split()
A= int(A)
B= int(B)
coin = 0
for i in range (2):
  if A>B:
    coin += A
    A-=1
  else:
    coin += B
    B-=1
    
print(coin)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(b*(t/a))

Fixed submission:
a,b,t=map(int,input().split())
print(b*(t//a))
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
List=[a,b,c,d,e]
for i j in range(5):
  if List[i]-List[j]>k:
    print("Yay!")
    break
  else:
    print(":(")

Fixed submission:
List=[int(input()) for i in range(5)]
k=int(input())
if List[-1]-List[0]>k:
    print(":(")
else:
    print("Yay!")
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,int().split())
if a+b>=c:
    print("Yes")
else:
    print("No")

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

res = 0
for i in range(N):
    a = V[i] - C[i]
    if a > 0:
        res = res + a
    else:
        pass

print(res)



Fixed submission:
input = input().split()
A = int(input[0])
B = int(input[1])
T = int(input[2])


print((T//A)*B)

Buggy python submission (verdict: Runtime Error):
src = raw_input()

sp = src.split(" ")

A = int(sp[0])
B = int(sp[1])
T = int(sp[2])
cnt = int(int(T + 0.5) / A )

out = B * cnt
print(out)

Fixed submission:
src = raw_input()

sp = src.split(" ")

A = int(sp[0])
B = int(sp[1])
T = int(sp[2])
cnt = int(int(T + 0.5) / A )

out = B * cnt
print(out)
Buggy python submission (verdict: Runtime Error):
N = raw_input()
V = raw_input()
C = raw_input()

Va = V.split(" ")
Ca = C.split(" ")

Va = map(lambda x: int(x), Va)
Ca = map(lambda x: int(x), Ca)


X = 0
Y = 0
for v, c in zip(Va, Ca):
  if v > c:
    X += v
    Y += c

print(X - Y)



Fixed submission:
N = raw_input()
V = raw_input()
C = raw_input()

Va = V.split(" ")
Ca = C.split(" ")

Va = map(lambda x: int(x), Va)
Ca = map(lambda x: int(x), Ca)


X = 0
Y = 0
for v, c in zip(Va, Ca):
  if v > c:
    X += v
    Y += c

print(X - Y)
Buggy python submission (verdict: Runtime Error):
if int(a) * int(b) % 2 == 0:
  print("Even")
else:
  print("Odd")


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

Buggy python submission (verdict: Runtime Error):
1<=a<=10000
1<=b<=10000
a = input()
b = input()
if int(a) * int(b) % 2 == 0:
  print("Even")
else:
  print("Odd")

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

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
if int(a) * int(b) % 2 == 0:
  print("Even")
else:
  print("Odd")

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

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
if a*b%2==0:
  print("Even")
else:
  print("Odd")

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

Buggy python submission (verdict: Runtime Error):
a = input("aの値を入力")
b = input("bの値を入力")
if (a % 2 == 0 or b % 2 == 0):
  print("Even")
else:
  print("Odd")

Fixed submission:
a,b=map(int,input().split())
if a * b % 2 == 0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())
a  = [int(i) for i in input().split()]
b = np.zeros_like(a)
t = 0
while [i % 2 for i in a] == b:
  a = [i / 2 for i in a]
  t = t + 1
print(t)


Fixed submission:
N = int(input())
a  = [int(i) for i in input().split()]
t = 0
while all(i % 2 == 0 for i in a):
  a = [i / 2 for i in a]
  t = t + 1
print(t)
Buggy python submission (verdict: Runtime Error):
#!python
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    A = [int(input()) for i in range(N)]
    X = [0 for i in range(N)]

    if A[0] != 0:
        print(-1)
        return

    count = 0

    for i in range(N - 1, -1, -1):
        X[i] = X[i + 1] - 1
        if A[i] == X[i]:
            continue

        count += A[i]
        X[i] = A[i]

    print(count)


if __name__ == '__main__':
    main()


Fixed submission:
#!python
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    A = [int(input()) for i in range(N)]
    X = [0 for i in range(N)]
    A += [0]
    X += [0]

    count = 0

    if A[0] != 0:
        print(-1)
        return

    for i in range(N - 1, -1, -1):
        if A[i - 1] + 1 < A[i]:
            print(-1)
            return

        X[i] = max(0, X[i + 1] - 1)
        if A[i] == X[i]:
            continue

        count += A[i]
        X[i] = A[i]

    print(count)


if __name__ == '__main__':
    main()