Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
p = list(map(int,input()split()))
if p[0] != p[1] and p[1] != p[2] and p[2] != p[0]:
  print(3)
elif p[0] == p[1] == p[2]:
  print(1)
else:
  print(2)

Fixed submission:
p = list(map(int,input().split()))
if p[0] != p[1] and p[1] != p[2] and p[2] != p[0]:
  print(3)
elif p[0] == p[1] == p[2]:
  print(1)
else:
  print(2)

Buggy python submission (verdict: Runtime Error):
p = list(map(int,input()split()))
if p[0] != p[1] and p[1] != p[2] and p[2] != p[0]:
  print(3)
elif p[0] = p[1] and p[1] = p[2]:
  print(1)
else:
  print(2)

Fixed submission:
p = list(map(int,input().split()))
if p[0] != p[1] and p[1] != p[2] and p[2] != p[0]:
  print(3)
elif p[0] == p[1] == p[2]:
  print(1)
else:
  print(2)

Buggy python submission (verdict: Runtime Error):
p = list(map(int,input()split()))
if (p[1] = p[2] and p[0]!=p[1])or(p[0]=p[1]and p[1]!=p[2])or(p[0]=p[2] and p[0]!=p[1]):
  print("2")
if p[0]!=p[1] and p[0]!=p[2]:
  print("3")
else:
  print("1")

Fixed submission:
p = list(map(int,input().split()))
if p[0] != p[1] and p[1] != p[2] and p[2] != p[0]:
  print(3)
elif p[0] == p[1] == p[2]:
  print(1)
else:
  print(2)
Buggy python submission (verdict: Runtime Error):
s= input()
ss ="CODEFESTIVAL2016"
t = 1
for i in range(ss):
  if s[i]!=ss[i]:
    t +=1
print(t)

Fixed submission:
s= input()
ss ="CODEFESTIVAL2016"
t = 0
for i in range(len(ss)):
  if s[i]!=ss[i]:
    t +=1
print(t)

Buggy python submission (verdict: Runtime Error):
s= input()
ss ="CODEFESTIVAL2016"
t = 1
for i in range(s):
  if s[i]==ss[i]:
    t +=1
print(t)

Fixed submission:
s= input()
ss ="CODEFESTIVAL2016"
t = 0
for i in range(len(ss)):
  if s[i]!=ss[i]:
    t +=1
print(t)

Buggy python submission (verdict: Runtime Error):
s= input()
ss =‘CODEFESTIVAL2016’
t = 1
for i in range(s):
  if s[i]==ss[i]:
    t +=1
print(t)

Fixed submission:
s= input()
ss ="CODEFESTIVAL2016"
t = 0
for i in range(len(ss)):
  if s[i]!=ss[i]:
    t +=1
print(t)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
h = int(input())
s == (a+b)*h/2
print(s)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())
s = (a+b)*h/2
print(int(s))
Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
  if i == 5:
    b = b + 1
  if i == 7:
    c = c+1
if b ==2 and c==1:
  print(YES)
else:
  print(NO)

Fixed submission:
a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
  if i == 7:
    b += 1
  elif i == 5:
    c += 1
 
if b == 1 and c == 2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))
b = 0
c = 0
for i in range(len(a)):
  if a[i] == 5:
    b = b + 1
  if a[i] == 7:
    c = c+1
if b ==2 and c==1:
  print(YES)
else:
  print(NO)

Fixed submission:
a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
  if i == 7:
    b += 1
  elif i == 5:
    c += 1
 
if b == 1 and c == 2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
a = input().split()
x =0
y =0
for i in range(len(a)):
  if len(a[i]) = 5:
    x = x+1
  if len(a[i]) = 7:
    y = y+1
if x =2 and y=1:
  print(YES)
else:
  print(NO)
    

Fixed submission:
a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
  if i == 7:
    b += 1
  elif i == 5:
    c += 1
 
if b == 1 and c == 2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
l =input().split()
a=0
b=0
for i in range(0,2):
  if len(i) = 5:
    a = a+1
  if len(i) = 7:
    b = b+1
if a=2 and b=1:
  print("YES")
else:
  print("NO")

Fixed submission:
a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
  if i == 7:
    b += 1
  elif i == 5:
    c += 1
 
if b == 1 and c == 2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
l =input().split()
for i in range(0,2):
  a=0
  b=0
  if len(i) = 5:
    a = a+1
  if len(i) = 7:
    b = b+1
if a=2 and b=1:
  print("YES")
else:
  print("NO")

Fixed submission:
a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
  if i == 7:
    b += 1
  elif i == 5:
    c += 1
 
if b == 1 and c == 2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
l =input().split()
for i in range(len(l)-1):
  a=0
  b=0
  if len(i) = 5:
    a = a+1
  if len(i) = 7:
    b = b+1
if a=2 and b=1:
  print("YES")
else:
  print("NO")

Fixed submission:
a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
  if i == 7:
    b += 1
  elif i == 5:
    c += 1
 
if b == 1 and c == 2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
a,b,c =input().split()
if len(a)*len(b)*len(c) =175:
  print("YES")
else:
  print("NO")

Fixed submission:
a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
  if i == 7:
    b += 1
  elif i == 5:
    c += 1
 
if b == 1 and c == 2:
  print("YES")
else:
  print("NO")

Buggy python submission (verdict: Runtime Error):
a,b,c =map(int,input().split())
if a*b*c = 175:
  print("YES")
else:
  print("NO")

Fixed submission:
a = list(map(int,input().split()))
b = 0
c = 0
for i in a:
  if i == 7:
    b += 1
  elif i == 5:
    c += 1
 
if b == 1 and c == 2:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
i = list(map(int,input().split()))

if i[0] <= i[3]:
	saidai=1*i[0]
elif:
	saidai=1*i[3]
else:
if i[2] >= (i[3]-i[0]-i[1]):
	saidai=saidai-1*(i[3]-i[0]-i[1])

print (saidai)
	

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

if i [0] >= i[3]:
	saidai=1*i[3]
else:
	saidai=1*i[0]-1*(i[3]-i[0]-i[1])
print (saidai)
Buggy python submission (verdict: Runtime Error):
line = input().split()
a=int(line[0])
b=int(line[1])
c=int(line[2])
d=int(line[3])
e=c//b
f=a//d
if e>=f:
  g=e
else:
  g=f
h=int(c)
j=int(a)
for i in range(ｇ):
	h=h-b
	j=j-d
	if h <= 0:
		print("Yes")
	elif j <= 0:
		print("No")

Fixed submission:
line = input().split()
s=int(line[0])
w=int(line[1])
if s<=w:
  print("unsafe")
else:
  print("safe")
Buggy python submission (verdict: Time Limit Exceeded):
a, b , n= input().split() 
a = int(a)
b = int(b)
n = int(n)
if b > n :
    print(a*n//b)
else:
    max = 0
    for i in range(1,n,1):
        r = (a*i // b) - a* (i//b)
        if r > max:
            max = r

    print(max)


Fixed submission:
a, b , n= input().split() 
a = int(a)
b = int(b)
n = int(n)
p = min(b,n)
if p % b ==0:
    print(int(a*(p-1)/b))
else:
    print(int(a*p/b))

Buggy python submission (verdict: Time Limit Exceeded):
a, b , n= input().split() 
a = int(a)
b = int(b)
n = int(n)
if b > n :
    print(a*n//b)
else:
    max = 0
    for i in range(1,b,1):
        r = (a*i // b) - a* (i//b)
        if r > max:
            max = r

    print(max)


Fixed submission:
a, b , n= input().split() 
a = int(a)
b = int(b)
n = int(n)
p = min(b,n)
if p % b ==0:
    print(int(a*(p-1)/b))
else:
    print(int(a*p/b))

Buggy python submission (verdict: Time Limit Exceeded):
a, b , n= input().split() 
a = int(a)
b = int(b)
n = int(n)
if b > n :
    print(a*n//b)
else:
    max = 0
    for i in range(1,int(n)+1,1):
        r = (int(a)*i // int(b)) - (int(a)* (i//int(b)))
        if r > max:
            max = r

    print(max)


Fixed submission:
a, b , n= input().split() 
a = int(a)
b = int(b)
n = int(n)
p = min(b,n)
if p % b ==0:
    print(int(a*(p-1)/b))
else:
    print(int(a*p/b))

Buggy python submission (verdict: Time Limit Exceeded):
a, b , n= input().split() 

max = 0
for i in range(1,int(n)+1,1):
    r = (int(a)*i // int(b)) - (int(a)* (i//int(b)))
    if r > max:
        max = r

print(max)


Fixed submission:
a, b , n= input().split() 
a = int(a)
b = int(b)
n = int(n)
p = min(b,n)
if p % b ==0:
    print(int(a*(p-1)/b))
else:
    print(int(a*p/b))
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/python3

(n, x, y) = map(int, input().split())

cs = [0 for i in range(n)]

for i in range(1, n + 1):
    for j in range(i + 1, n + 1):
        d = min(abs(j - i), abs(x - i) + 1 + abs(j - y), abs(y - i) + 1 + abs(j - x))
        if d == (abs(y - i) + 1 + abs(j - x)):
            print(i, j, d)
        cs[d] += 1

for i in range(1, n):
    print(cs[i])


Fixed submission:
#!/usr/bin/python3

(n, x, y) = map(int, input().split())

cs = [0 for i in range(n)]

for i in range(1, n + 1):
    for j in range(i + 1, n + 1):
        d = min(abs(j - i), abs(x - i) + 1 + abs(j - y))
        cs[d] += 1

for i in range(1, n):
    print(cs[i])
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/python3
import copy

def minOp(h, w, k, yl, s):
    xl = []
    ks = [ 0 for i in range(len(yl) + 1) ]

    for x in range(w):
        py = 0
        cks = [ 0 for i in range(len(yl) + 1) ]
        for idx, y in enumerate(yl + [h - 1]):
            for yy in range(py, y + 1):
                if s[yy][x] == '1':
                    cks[idx] += 1

            py = y + 1

        over = False
        for idx, kk in enumerate(ks):
            if kk + cks[idx] > k:
                over = True

        if over:
            xl.append(x - 1)
            ks = copy.copy(cks)
        else:
            ks = list(map(lambda a, b: a + b, ks, cks))

    return len(xl) + len(yl)
    

def devideVertical(h, w, k, cy, yl, s):
    m = (h - 1) + (w - 1)
    for y in range(cy, h - 1):
        nyl = copy.copy(yl)
        nyl.append(y)
        m = min(m, devideVertical(h, w, k, y + 1, nyl, s))
    
    m = min(m, minOp(h, w, k, yl, s))
    return m

(h, w, k) = map(int, input().split())
s = []
for i in range(h):
    s.append(input())

print(devideVertical(h, w, k, 0, [], s))




Fixed submission:
#!/usr/bin/python3
import copy

def minOp(h, w, k, yl, s):
    xl = []
    ks = [ 0 for i in range(len(yl) + 1) ]

    for x in range(w):
        py = 0
        cks = [ 0 for i in range(len(yl) + 1) ]
        for idx, y in enumerate(yl + [h - 1]):
            for yy in range(py, y + 1):
                if s[yy][x] == '1':
                    cks[idx] += 1

            py = y + 1

        over = False
        for idx, kk in enumerate(ks):
            if kk + cks[idx] > k:
                over = True

        if over:
            for ck in cks:
                if ck > k:
                    return (h - 1) + (w - 1)
            xl.append(x - 1)
            ks = copy.copy(cks)
        else:
            ks = list(map(lambda a, b: a + b, ks, cks))
            
    return len(xl) + len(yl)
    

def devideVertical(h, w, k, cy, yl, s):
    m = (h - 1) + (w - 1)
    for y in range(cy, h - 1):
        nyl = copy.copy(yl)
        nyl.append(y)
        m = min(m, devideVertical(h, w, k, y + 1, nyl, s))
    
    m = min(m, minOp(h, w, k, yl, s))
    return m

(h, w, k) = map(int, input().split())
s = []
for i in range(h):
    s.append(input())

print(devideVertical(h, w, k, 0, [], s))
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/python3

(n, p) = map(int, input().split())
s = input()

c = 0
if p == 2 or p == 5:
    for i in range(n - 1, -1, -1):
        if int(s[i]) % p == 0:
            c += i + 1

else:
    mm = {}
    for i in range(n - 1, -1, -1):
        u = int(s[i:])
        r = u % p
        if r in mm:
            c += mm[r]
            mm[r] += 1
        else:
            mm[r] = 1

        if r == 0:
            c += 1
        
print(c)


Fixed submission:
#!/usr/bin/python3

(n, p) = map(int, input().split())
s = input()

c = 0
if p == 2 or p == 5:
    for i in range(n - 1, -1, -1):
        if int(s[i]) % p == 0:
            c += i + 1

else:
    mm = {}
    r = 0
    mten = 1
    for i in range(n - 1, -1, -1):
        ch = int(s[i])
        r = (r + ch * mten) % p
        mten = (mten * 10) % p
        if r in mm:
            c += mm[r]
            mm[r] += 1
        else:
            mm[r] = 1

        if r == 0:
            c += 1
        
print(c)

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python3

(n, p) = map(int, input().split())
s = input()

c = 0
if p == 2 or p == 5:
    for i in range(n - 1, -1, -1):
        if int(s[i]) % p == 0:
            c += i + 1

else:
    mm = {}
    for i in range(n - 1, -1, -1):
        u = int(s[i:])
        r = u % p
        if r in mm:
            c += l
            mm[r] += 1
        else:
            mm[r] = 1

        if r == 0:
            c += 1
        
print(c)


Fixed submission:
#!/usr/bin/python3

(n, p) = map(int, input().split())
s = input()

c = 0
if p == 2 or p == 5:
    for i in range(n - 1, -1, -1):
        if int(s[i]) % p == 0:
            c += i + 1

else:
    mm = {}
    r = 0
    mten = 1
    for i in range(n - 1, -1, -1):
        ch = int(s[i])
        r = (r + ch * mten) % p
        mten = (mten * 10) % p
        if r in mm:
            c += mm[r]
            mm[r] += 1
        else:
            mm[r] = 1

        if r == 0:
            c += 1
        
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import copy

# 整数の入力
n = int(input())

ninzu = []

for inpcnt in range(5):
    ninzu.append(int(input()))

toshi = [n,0,0,0,0,0]
next_toshi = copy.deepcopy(toshi)
time = 0

while toshi[5] != n:
    # print("toshi[0]:{},[1]:{},[2]:{},[3]:{},[4]:{},[5]:{}".format(toshi[0],toshi[1],toshi[2],toshi[3],toshi[4],toshi[5]))
    time += 1
    for i in range(len(toshi)-1):
        if toshi[i] != 0:
            if toshi[i] > ninzu[i]:
                next_toshi[i] = next_toshi[i] - ninzu[i]
                next_toshi[i+1] = toshi[i+1]  + ninzu[i]
            else:
                next_toshi[i] = next_toshi[i] - toshi[i]
                next_toshi[i+1] = toshi[i+1] + toshi[i] 
        # print("toshi[{}]:{},toshi[{}]:{}".format(i,next_toshi[i],i+1,next_toshi[i+1]))
    toshi = copy.deepcopy(next_toshi)
    # print("next_toshi[0]:{},[1]:{},[2]:{},[3]:{},[4]:{},[5]:{}".format(next_toshi[0],next_toshi[1],next_toshi[2],next_toshi[3],next_toshi[4],next_toshi[5]))
        
print(str(time))


Fixed submission:
# -*- coding: utf-8 -*-
import copy
import math

# 整数の入力
n = int(input())

capa = []

capa=[int(input()) for i in range(5)]

# 各交通機関のうち、運べる人数が一番少ないものをベースとする
capa_min = min(capa)

ans = n//capa_min 

# if n <= capa_min:
#     amari = 0
# else:
amari = n % capa_min

# 人数が割り切れたら
if amari != 0:
    ans += 5
else:
    ans += 4
    
print (str(ans))



# 以下の処理だとタイムオーバーになるからNG
# toshi = [n,0,0,0,0,0]
# next_toshi = copy.deepcopy(toshi)
# time = 0

# while toshi[5] != n:
#     # print("toshi[0]:{},[1]:{},[2]:{},[3]:{},[4]:{},[5]:{}".format(toshi[0],toshi[1],toshi[2],toshi[3],toshi[4],toshi[5]))
#     time += 1
#     for i in range(len(toshi)-1):
#         if toshi[i] != 0:
#             if toshi[i] > capa[i]:
#                 next_toshi[i] = next_toshi[i] - capa[i]
#                 next_toshi[i+1] = toshi[i+1]  + capa[i]
#             else:
#                 next_toshi[i] = next_toshi[i] - toshi[i]
#                 next_toshi[i+1] = toshi[i+1] + toshi[i] 
#         # print("toshi[{}]:{},toshi[{}]:{}".format(i,next_toshi[i],i+1,next_toshi[i+1]))
#     toshi = copy.deepcopy(next_toshi)
#     # print("next_toshi[0]:{},[1]:{},[2]:{},[3]:{},[4]:{},[5]:{}".format(next_toshi[0],next_toshi[1],next_toshi[2],next_toshi[3],next_toshi[4],next_toshi[5]))
        
# print(str(time))
Buggy python submission (verdict: Runtime Error):
K = input("")
A, B = map(int, input().split())
number = False
for i in range(A, B+1):
    if number % K == 0:
        number = True
        
print("OK" if number else "NG")

Fixed submission:
K = int(input(""))
A, B = map(int, input().split())
number = False
for i in range(A, B+1):
    if i % K == 0:
        number = True

print("OK" if number else "NG")
Buggy python submission (verdict: Runtime Error):
input = input()

a = int(input[0])
b = int(input[1])
c = int(input[2])

if (a+b+c < 22): print("bust")
else: print("win")

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

a = int(input[0])
b = int(input[1])
c = int(input[2])

if (a + b + c < 22): print("win")
else: print("bust")

Buggy python submission (verdict: Runtime Error):
a,b,c = int(input().split(" "))
if (a+b+c < 22): print("bust")
else: print("win")

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

a = int(input[0])
b = int(input[1])
c = int(input[2])

if (a + b + c < 22): print("win")
else: print("bust")
Buggy python submission (verdict: Runtime Error):
str = input
count = 0

for i in range(len(str)):
  if str[i] != str[len(str)-1-1]:
    count += 1
    
print(count/2)
    


Fixed submission:
str = input()
count = 0

for i in range(len(str)):
  if str[i] != str[len(str)-1-i]:
    count += 1
    
print(int(count/2))
Buggy python submission (verdict: Runtime Error):
inp = input()
inp = int(float(inp))
aaa = 0
bbb = 0
yyy = 0

if 0 <= inp and inp <= 10**9:
  if 500 <= inp:
    big = inp // 500
    aaa = big * 1000
    amari = inp % 500
    if 5 <= amari:
      smo = amari //5
      bbb = smo *5
    print(aaa+bbb)
  else if 5 <= inp:
    hhh = inp // 5
    yyy = hhh * 5
    print(yyy)
else:
  print(0)

Fixed submission:
inp = input()
inp = int(float(inp))
aaa = 0
bbb = 0
yyy = 0

if 0 < inp and inp <= 10**9:
  if 500 <= inp:
    big = inp // 500
    aaa = big * 1000
    amari = inp % 500
    if 5 <= amari:
      smo = amari //5
      bbb = smo *5
    print(aaa+bbb)
  elif 5 <= inp:
    hhh = inp // 5
    yyy = hhh * 5
    print(yyy)
else:
  print(0)

Buggy python submission (verdict: Runtime Error):
inp = int(input())
aaa =0
bbb =0
nega = 0

if 0 <= inp and inp <= 10**9:
  if 500 <= inp:
    big = int(inp / 500)
    
    sma = inp-(big *500)
    if 5 <= sma:
      nega = int(sma / 5)
      
  aaa = 1000*big
  bbb = 5*nega
  print(aaa + bbb)
      

Fixed submission:
inp = input()
inp = int(float(inp))
aaa = 0
bbb = 0
yyy = 0

if 0 < inp and inp <= 10**9:
  if 500 <= inp:
    big = inp // 500
    aaa = big * 1000
    amari = inp % 500
    if 5 <= amari:
      smo = amari //5
      bbb = smo *5
    print(aaa+bbb)
  elif 5 <= inp:
    hhh = inp // 5
    yyy = hhh * 5
    print(yyy)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
k=int(input())
s=input()
l=len(s)
if(l<=k):
  print(s)
else:
  s=s[k:]
  print(s,end=" ",...)


Fixed submission:
k=int(input())
s=input()
l=len(s)
if(l<=k):
  print(s)
else:
  s=s[:k]
  s=s+"..."
  print(s)
Buggy python submission (verdict: Runtime Error):
import math
t = input().split()
t = [int(i) for i in t]
r = math.sqrt(t[0]*t[0]+ t[1]*t[1])
h = t[2]
m = t[3]
if (h == 12):
    h = 0
if (m == 60):
    m = 0
hour_angle = 0.5 * (h * 60 + m) 
minute_angle = 6 * m 
angle = abs(hour_angle - minute_angle) 
angle = min(360 - angle, angle)
print(math.sqrt(r*r - 2*t[0]*t[1]*math.cos(angle(2*math.pi/360))))

Fixed submission:
import math
t = input().split()
t = [int(i) for i in t]
r = math.sqrt(t[0]*t[0]+ t[1]*t[1])
h = t[2]
m = t[3]
if (h == 12):
    h = 0
if (m == 60):
    m = 0
hour_angle = 0.5 * (h * 60 + m) 
minute_angle = 6 * m 
angle = abs(hour_angle - minute_angle) 
angle = min(360 - angle, angle)
print(math.sqrt(r*r - 2*t[0]*t[1]*math.cos(angle*(2*math.pi/360))))

Buggy python submission (verdict: Runtime Error):
mport math
t = input().split()
t = [int(i) for i in t]
r = math.sqrt(t[0]*t[0]+ t[1]*t[1])
h = t[2]
m = t[3]
if (h == 12):
    h = 0
if (m == 60):
    m = 0
hour_angle = 0.5 * (h * 60 + m) 
minute_angle = 6 * m 
angle = abs(hour_angle - minute_angle) 
angle = min(360 - angle, angle)
print(math.sqrt(r*r - 2*t[0]*t[1]*math.cos(angle(2*math.pi/360))))

Fixed submission:
import math
t = input().split()
t = [int(i) for i in t]
r = math.sqrt(t[0]*t[0]+ t[1]*t[1])
h = t[2]
m = t[3]
if (h == 12):
    h = 0
if (m == 60):
    m = 0
hour_angle = 0.5 * (h * 60 + m) 
minute_angle = 6 * m 
angle = abs(hour_angle - minute_angle) 
angle = min(360 - angle, angle)
print(math.sqrt(r*r - 2*t[0]*t[1]*math.cos(angle*(2*math.pi/360))))
Buggy python submission (verdict: Runtime Error):
N A B = list(map(int, input().split()))

total_cost = N * A

if total_cost > B:
  total_cost = B
  
print(total_cost)


Fixed submission:
N, A, B = list(map(int, input().split()))
 
total_cost = N * A
 
if total_cost > B:
  total_cost = B
  
print(total_cost)
Buggy python submission (verdict: Runtime Error):
password = input()

result = 'Good'

for i in range(len(password)-1):
  ):
    if password[i] == password[i+1]:
      result = 'Bad'
      break
      
print(result)
  

Fixed submission:
password = input()

result = 'Good'

for i in range(len(password)-1):
    if password[i] == password[i+1]:
      result = 'Bad'
      break
      
print(result)
Buggy python submission (verdict: Runtime Error):
# coding:UTF-8

# 入力値の受け取り
'''
input_list[0]→A
input_list[1]→B
input_list[2]→T
'''
input_list = input().split()

# 合計枚数の算出
print((input_list[2] + 0.5) // input_list[0] * input_list[1])

Fixed submission:
# coding:UTF-8

# 入力値の受け取り
input_list = input().split()

num_A = int(input_list[0])
num_B = int(input_list[1])
num_T = int(input_list[2])

# 合計枚数の算出
output_answer = int((num_T + 0.5) // num_A * num_B)
print(output_answer)
Buggy python submission (verdict: Runtime Error):
#coding:UTF-8

# ２つのボタンのコイン獲得枚数を取得
buttons = list(map(int, input().split()))

# 最大獲得コイン取得用領域
max_coin = 0

for _ in range(2):
  if buttons[0] > buttons[1]:
    max_coin += buttons[0]
    button[0] -= 1
  else:
    max_coin += button[1]
    buttons[1] -= 1
    
# 結果出力
print(max_coin)

Fixed submission:
# coding:UTF-8

# ２つのボタンのコイン獲得枚数を取得
buttons = list(map(int, input().split()))

# 最大獲得コイン取得用領域
max_coin = 0

for _ in range(2):
    if buttons[0] > buttons[1]:
        max_coin += buttons[0]
        buttons[0] -= 1
    else:
        max_coin += buttons[1]
        buttons[1] -= 1

# 結果出力
print(max_coin)
Buggy python submission (verdict: Time Limit Exceeded):
import bisect,collections,copy,heapq,itertools,math,numpy,string,decimal
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def SS(): return map(str,sys.stdin.readline().rstrip().split())
def II(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N,K = II()
A = LI()
past = []
past.append(0)
now = 0
cnt = 1
for k in range(K):
  now = A[now]-1
  if now in past:
    past = past[past.index(now)::]
    print(past[(K - cnt) % len(past)]+1)
    exit()
  cnt += 1
  past.append(now)
print(now+1)

Fixed submission:
import bisect,collections,copy,heapq,itertools,math,numpy,string,decimal
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def SS(): return map(str,sys.stdin.readline().rstrip().split())
def II(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
 
N,K = II()
A = LI()
flag = [False]*N
past = []
past.append(0)
now = 0
cnt = 1
for k in range(K):
  now = A[now]-1
  if flag[now]:
    past = past[past.index(now)::]
    print(past[(K - cnt) % len(past)]+1)
    exit()
  flag[now] = True
  cnt += 1
  past.append(now)
print(now+1)
Buggy python submission (verdict: Runtime Error):
l = map(int,input().split())

print(l[2],l[0],l[1])

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

print(l[2],l[0],l[1])
Buggy python submission (verdict: Runtime Error):
1000000000000000000 1

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

N = N % K

if K - N > N:
  print(N)
  exit()
print(K - N)