Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
k=int(input())
s=str(input())
if len(s) <= k:
  print(s)
else:
  print(s[0:k] + "...")

Fixed submission:
S = str(input())[-1]
tmp = ['0', '1', '6', '8']
if S == '3':
    print('bon')
elif S in tmp:
    print('pon')
else:
    print('hon')

Buggy python submission (verdict: Runtime Error):
s=str(input())[-1]
 
if s in ["2", "4", "5", "7", "9"]:
  print("hon")
else if s == 3:
  print("bon")
else:
  print("pon")

Fixed submission:
S = str(input())[-1]
tmp = ['0', '1', '6', '8']
if S == '3':
    print('bon')
elif S in tmp:
    print('pon')
else:
    print('hon')

Buggy python submission (verdict: Runtime Error):
s=str(int(input()))[-1]
 
if s in ["2", "4", "5", "7", "9"]:
  print("hon")
else if s == 3:
  print("bon")
else:
  print("pon")

Fixed submission:
S = str(input())[-1]
tmp = ['0', '1', '6', '8']
if S == '3':
    print('bon')
elif S in tmp:
    print('pon')
else:
    print('hon')

Buggy python submission (verdict: Runtime Error):
s=str(int(input()))[-1]

if s in [2, 4, 5, 7, 9]:
  print("hon")
else if s == 3:
  print("bon")
else:
  print("pon")

Fixed submission:
S = str(input())[-1]
tmp = ['0', '1', '6', '8']
if S == '3':
    print('bon')
elif S in tmp:
    print('pon')
else:
    print('hon')

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=str(n)
if s[-1] in [2, 4, 5, 7, 9]:
  print("hon")
else if s[-1] == 3:
  print("bon")
else:
  print("pon")

Fixed submission:
S = str(input())[-1]
tmp = ['0', '1', '6', '8']
if S == '3':
    print('bon')
elif S in tmp:
    print('pon')
else:
    print('hon')

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=str(n)
if s[-1] == 2 or 4 or 5 or 7 or 9:
  print("hon")
else if s[-1] == 3:
  print("bon")
else:
  print("pon")

Fixed submission:
S = str(input())[-1]
tmp = ['0', '1', '6', '8']
if S == '3':
    print('bon')
elif S in tmp:
    print('pon')
else:
    print('hon')
Buggy python submission (verdict: Runtime Error):
k=int(input())
s=str(input())
if len(s) <= k:
  print(s)
else:
  print(s in range k + "...")

Fixed submission:
k=int(input())
s=str(input())
if len(s) <= k:
  print(s)
else:
  print(s[0:k] + "...")
Buggy python submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())
if A >= K:
  print(K)
elif A+B >= K:
  print(A)
else:
  print(A-(K-A-B))

Fixed submission:
s=str(input())
t=str(input())
if s == t[:-1] :
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())
if K <= A:
  print(K)
else if A+B >= K:
  print(A)
else:
  print(A-(K-A-B))

Fixed submission:
s=str(input())
t=str(input())
if s == t[:-1] :
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())
if K <= A:
  print(K)
else if A+B >= K:
  print(A)
else:
  print(A-(K-A-B))

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

result = 0
t = min(A, K)
result += t
K -= t
t = min(B, K)
K -= t
t = min(C, K)
result -= t
print(result)

Buggy python submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())
if A >= K:
  print(K)
else if A+B >= K:
  print(A)
else:
  print(A-(K-A-B))

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

result = 0
t = min(A, K)
result += t
K -= t
t = min(B, K)
K -= t
t = min(C, K)
result -= t
print(result)

Buggy python submission (verdict: Runtime Error):
A,B,C,K=map(int, input().split())
if A >= K:
  print(K)
else if A+B >= K:
  print(A)
else:
  print(A-(K-A-B))

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

result = 0
t = min(A, K)
result += t
K -= t
t = min(B, K)
K -= t
t = min(C, K)
result -= t
print(result)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())

t = [0]*n
for i in range(k):
  d = int(input())
  A = list(map(int, input().split()))
  for a in range A:
    t[a - 1] += 1
print(t.count(0))

Fixed submission:
n, k = map(int, input().split())
 
t = [0]*n
for i in range(k):
  d = int(input())
  A = list(map(int, input().split()))
  for a in A:
    t[a - 1] += 1
print(t.count(0))
Buggy python submission (verdict: Runtime Error):
k = input()
a, b = map(int, input().split())
 
for i in range(a,b):
  if i%k == 0:
    print("OK")
    break
else:
  print("NG")

Fixed submission:
k = int(input())
a, b = map(int, input().split())
 
for i in range(a,b+1):
  if i%k == 0:
    print("OK")
    break
else:
  print("NG")

Buggy python submission (verdict: Runtime Error):
k = input()
a, b = map(int, input().split())
 
for i in range(a,b+1):
  if i%k == 0:
    print("OK")
    break
else:
    print("NG")

Fixed submission:
k = int(input())
a, b = map(int, input().split())
 
for i in range(a,b+1):
  if i%k == 0:
    print("OK")
    break
else:
  print("NG")

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

for i in range(a,b+1):
  if i%k == 0:
    print("OK")
    break
  else:
    print("NG")
    

Fixed submission:
k = int(input())
a, b = map(int, input().split())
 
for i in range(a,b+1):
  if i%k == 0:
    print("OK")
    break
else:
  print("NG")
Buggy python submission (verdict: Runtime Error):
n = int(input())
sp = []
for i in range(n):
  s, p = map(int,input().split())
  sp.append([s, int(p), i+1])
sp.sort(key=lambda x:x[1], reverse = True)
sp.sort(key=lambda x:x[0])
for e in sp:
  print(e[2])

Fixed submission:
n = int(input())
sp = []
for i in range(n):
    s,p = map(str,input().split())
    sp.append([s,int(p),i+1])

sp.sort(key=lambda x:x[1],reverse = True)
sp.sort(key=lambda x:x[0])

for e in sp:
    print(e[2])
Buggy python submission (verdict: Runtime Error):
n = int(input())
xy = [map(int, input().split()) for _ in range(n)]
x, y = [list(i) for i in zip(*xy)]

a = 0
for i in range(0,n):
    for j in range(1,n-i):
        c = abs(x[i] - x[i + j]) + abs(y[i] - y[i + j])
        print(c)
        if a >= c:
            a = a
        else:
            a = c
print(a)

    

Fixed submission:
n = int(input())
if n == 0:
    print("1")
else:
    print("0")
Buggy python submission (verdict: Time Limit Exceeded):
s = list(map(int, input().split()))
q = 0
if s[0] > 0 and s[0] - s[1] * s[2] > 0:
    print(s[0] - s[1] * s[2])
elif s[0] < 0 and s[0] + s[1] * s[2] < 0:
    print(-s[0] - s[1] * s[2])
else:
    if s[0] > 0:
        while s[0] - s[2] > 0:
            s[0] = s[0] - s[2]
            q = q + 1
        if (s[1] - q) % 2 == 1:
            print(-s[0]+s[2])
        else:
            print(s[0])
    elif s[0] < 0:
        while s[0] + s[2] < 0:
            s[0] = s[0] + s[2]
            q = q + 1
        if (s[1] - q) % 2 == 1:
            print(s[0]+s[2])
        else:
            print(-s[0])
    else:
        if s[1] % 2 == 1:
            print(s[2])
        else:
            print(s[0])

Fixed submission:
s = list(map(int, input().split()))
r = s[0] // s[2] 
t = s[0] % s[2] 
if s[0] > 0 and s[0] - s[1] * s[2] > 0:
    print(s[0] - s[1] * s[2])
elif s[0] < 0 and s[0] + s[1] * s[2] < 0:
    print(-s[0] - s[1] * s[2])
else:
    if s[0] > 0:
        r = s[0] // s[2] 
        t = s[0] % s[2] 
        if (s[1] - r) % 2 == 1:
            print(-t + s[2])
        else:
            print(t)
    elif s[0] < 0:
        v = (-s[0]) // s[2]
        w = -((-s[0]) % s[2])
        if (s[1] - v) % 2 == 1:
            print(w+s[2])
        else:
            print(-w)
    else:
        if s[1] % 2 == 1:
            print(s[2])
        else:
            print(s[0])
Buggy python submission (verdict: Runtime Error):
i = list(map(int,input().split()))
j = list(map(int,input().split()))
for i in range(0, i[0] - i[1]):
    if j[i] < j[i + 3]:
        print("Yes")
    else:
        print("No")

Fixed submission:
i = list(map(int,input().split()))
j = list(map(int,input().split()))
for p in range(0, i[0] - i[1]):
    if j[p] < j[p + i[1]]:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
n = input()
m = n.split()
print(m)
a = [input() for l in range(0,1)]
b = a[0].split()
print(b)

for i in range(0, len(b)):
    b[i] = int(b[i])

c = sorted(b, reverse=True)
print(c)
p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(int(p))

Fixed submission:
S = input()
if (S.isupper()) == True:
    print ('A')
else:
    print ('a')
Buggy python submission (verdict: Runtime Error):
import sys
def order (p):
    return (sorted(p))         
def Mix_Juice (p):
    p[1] = K
    a = order (p[2:])
    b = 0
    for i in range (0, K):
        b = b + a[i]
    return b
p = list(map(int, input().split()))
Mix_Juice (p)

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

a = [input() for l in range(0,1)]
b = a[0].split()


for i in range(0, len(b)):
    b[i] = int(b[i])

c = sorted(b, reverse=True)

p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(int(p))

Buggy python submission (verdict: Runtime Error):
import sys
def order (p):
    return (sorted(p))         
def Mix_Juice (p):
    p[0] = len (p)
    p[1] = K
    a = order (p[2:p[0]])
    b = 0
    for i in range (0, K-1):
        b = b + a[i]
    return b
p = list(map(int, input().split()))
Mix_Juice (p)

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

a = [input() for l in range(0,1)]
b = a[0].split()


for i in range(0, len(b)):
    b[i] = int(b[i])

c = sorted(b, reverse=True)

p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(int(p))
Buggy python submission (verdict: Runtime Error):
def adana ('S'):
    return S[0:3]

Fixed submission:
S = input()
print (S[0:3])
Buggy python submission (verdict: Runtime Error):
a = int(input())
)
a = int(a ** 3)
print(a)



Fixed submission:
a = int(input())

b = int(a + a ** 2 + a ** 3)
print(b)
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()

c = int(a) * int(b)

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

Fixed submission:
a = input()
b = a.split(' ')
 
nummm = 1
 
for l in b:
    nummm = int(nummm) * int(l)
 
if int(nummm) % 2 == 0:
    print('Even')
else:
    print('Odd')
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
*A, = map(int, input().split())
d = [0]*(N+1)
for a in A:
    d[a] += 1
    d.sort()
    d.reverse()
    print(sum(d[K:]))


Fixed submission:
i = input()
a = i.count('1')

print(a)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
*A, = map(int, input().split())
d = [0]*(N+1)
for a in A:
    d[a] += 1
    d.sort()
    d.reverse()
    print(sum(d[K:]))


Fixed submission:
i = input()
a = i.count('1')

print(a)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
*A, = map(int, input().split())
d = [0]*(N+1)
for a in A:
    d[a] += 1
    d.sort()
    d.reverse()

print(sum(d[K:]))


Fixed submission:
i = input()
a = i.count('1')

print(a)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
mp = {}
for i in range(n):
    if(a[i] in mp.keys()):
        mp[a[i]] += 1
    else:
        mp[a[i]] = 1
q = int(input())
for i in range(q):
    b, c = map(int, input().split())
    if(b not in mp.keys()):
        mp[b] = 0
    if(c in mp.keys()):
        mp[c] += mp[b]
    else:
        mp[c] = mp[b]
    mp[b] = ans = 0
    for k in mp.keys():
        ans += k * mp[k]
    print(ans)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
mp, ans = {}, 0
for i in range(n):
    if(a[i] in mp.keys()):
        mp[a[i]] += 1
    else:
        mp[a[i]] = 1
for k in mp.keys():
    ans += k * mp[k]
q = int(input())
for i in range(q):
    b, c = map(int, input().split())
    if(b not in mp.keys()):
        mp[b] = 0
        print(ans)
        continue
    if(c in mp.keys()):
        mp[c] += mp[b]
    else:
        mp[c] = mp[b]
    ans += (c-b) * mp[b]
    mp[b] = 0
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
q = int(input())
for i in range(q):
    b, c = map(int, input().split())
    for j in range(n):
        if a[j] == b:
            a[j] = c
    print(sum(a[:]))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
mp, ans = {}, 0
for i in range(n):
    if(a[i] in mp.keys()):
        mp[a[i]] += 1
    else:
        mp[a[i]] = 1
for k in mp.keys():
    ans += k * mp[k]
q = int(input())
for i in range(q):
    b, c = map(int, input().split())
    if(b not in mp.keys()):
        mp[b] = 0
        print(ans)
        continue
    if(c in mp.keys()):
        mp[c] += mp[b]
    else:
        mp[c] = mp[b]
    ans += (c-b) * mp[b]
    mp[b] = 0
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
mp = {}
for i in range(n):
    mp[a[i]] = a[i]
q = int(input())
for i in range(q):
    b, c = map(int, input().split())
    for j in range(n):
        if a[j] == b:
            a[j] = c
    print(sum(a[:]))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
mp, ans = {}, 0
for i in range(n):
    if(a[i] in mp.keys()):
        mp[a[i]] += 1
    else:
        mp[a[i]] = 1
for k in mp.keys():
    ans += k * mp[k]
q = int(input())
for i in range(q):
    b, c = map(int, input().split())
    if(b not in mp.keys()):
        mp[b] = 0
        print(ans)
        continue
    if(c in mp.keys()):
        mp[c] += mp[b]
    else:
        mp[c] = mp[b]
    ans += (c-b) * mp[b]
    mp[b] = 0
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
Ai = list(map(int, input().split()))
sum_ans = 0
divied_num = 10**9 + 7
for i in range(n-1):
    for j in range(i+1, n):
        sum_ans += Ai[i] * Ai[j]
        sum_ans = sum_ans % divied_num

print(sum_ans)

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

sum_ans = sum(Ai)
ans = 0
mod = 1000000007

for i in range(n-1):
    sum_ans -= Ai[i]
    ans += sum_ans * Ai[i]
    ans %= mod

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
Ai = list(map(int, input().split()))
sum_ans = 0
for i in range(n-1):
    for j in range(i+1, n):
        sum_ans += Ai[i] * Ai[j]
        sum_ans = sum_ans % (10**9 + 7)

print(sum_ans)

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

sum_ans = sum(Ai)
ans = 0
mod = 1000000007

for i in range(n-1):
    sum_ans -= Ai[i]
    ans += sum_ans * Ai[i]
    ans %= mod

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
Ai = list(map(int, input().split()))
sum_ans = 0
for i in range(n-1):
    for j in range(i+1, n):
        sum_ans += Ai[i] * Ai[j]
    sum_ans = sum_ans % (10**9 + 7)

print(sum_ans)

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

sum_ans = sum(Ai)
ans = 0
mod = 1000000007

for i in range(n-1):
    sum_ans -= Ai[i]
    ans += sum_ans * Ai[i]
    ans %= mod

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
aN = list(map(int, input().split()))
sum_board = 0
for i in range(1,n):
    if aN[i] < max(aN[:i]):
        sum_board +=  max(aN[:i]) - aN[i]

print(sum_board)

Fixed submission:
n = int(input())
aN = list(map(int, input().split()))
sum_board = 0
aN_max = aN[0]
for i in range(1,n):
    if aN[i] < aN_max:
        sum_board +=  aN_max - aN[i]
    else:
        aN_max = aN[i]

print(sum_board)
Buggy python submission (verdict: Runtime Error):
k = int(input())

a = [0]*k
a[0] = 7
cnt = 0

for i in range(1, k):
    a[i] = (10*a[i-1]+7) % k

print(a.index(0) + 1 if k % 2 != 0 else -1 )

Fixed submission:
import sys
k = int(input())

a = [0]*k
a[0] = 7 % k

for i in range(1, k):
    a[i] = (10*a[i-1]+7) % k

for i in range(k):
    if a[i] == 0:
        print(i+1)
        sys.exit()
print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
n = int(input())
An = list(map(int, input().split()))
ans = 1
for i in range(0,n):
    ans = ans * An[i]

print(ans if ans <= 10**18 else '-1')

Fixed submission:
n = int(input())
An = list(map(int, input().split()))
An.sort()
ans = 1
for i in range(0,n):
    ans = ans * An[i]
    if ans > 10**18:
        ans = -1
        break

    if An[i] == 0:
        break

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math
k = int(input())
sum_gcd = 0

for a in range(1,k+1):
    for b in range(1,k+1):
        for c in range(1,k+1):

            sum_gcd += math.gcd(math.gcd(a,b) , c)

print(sum_gcd)

Fixed submission:
import math
k = int(input())
sum_gcd = 0

for a in range(1,k+1):
    for b in range(1,k+1):
        for c in range(1,k+1):

            sum_gcd += math.gcd(math.gcd(a,b) , c)

print(sum_gcd)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int,input().split()))
count = 1
for i in range(1,p.index(min(p))+1):
    if p[i] == min(p[:i+1]):
        count += 1
print(count)


Fixed submission:
n = int(input())
p = list(map(int,input().split()))
count = 0
t = p[0]
for i in range(n):
    if p[i] <= t:
        count += 1
        t = p[i]
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int,input().split()))
count = 1
for i in range(1,p.index(min(p))+1):
    if p[i] == min(p[:i+1]):
        count += 1
print(count)


Fixed submission:
n = int(input())
p = list(map(int,input().split()))
count = 0
t = p[0]
for i in range(n):
    if p[i] <= t:
        count += 1
        t = p[i]
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int,input().split()))
count = 1
for i in range(1,p.index(min(p))+1):
    if p[i] == min(p[:i+1]):
        count += 1
print(count)

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
count = 0
t = p[0]
for i in range(n):
    if p[i] <= t:
        count += 1
        t = p[i]
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int,input().split()))
count = 1
for i in range(1,n):
    if p[i] == min(p[:i+1]):
        count += 1
print(count)

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
count = 0
t = p[0]
for i in range(n):
    if p[i] <= t:
        count += 1
        t = p[i]
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int,input().split()))
temp = [0]*n
count = 1
for i in range(1,n):
    temp = p[:i+1]
    if p[i] == min(temp):
        count += 1
print(count)

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
count = 0
t = p[0]
for i in range(n):
    if p[i] <= t:
        count += 1
        t = p[i]
print(count)
Buggy python submission (verdict: Runtime Error):
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, [0]*input_num
    count = [1 for i in range(input_num) if a_i[0] == a_i[i]]
    frag = False if sum(count) >= 2 else True
    value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)] if frag == True else [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()
    


Fixed submission:
def func():
    input_num = int(input(''))
    return 3*input_num**2


if __name__ == "__main__":
    print(func())

Buggy python submission (verdict: Runtime Error):
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, [0]*input_num
    count = [1 for i in range(input_num) if a_i[0] == a_i[i]]
    frag = False if sum(count) >= 2 else True
    value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)] if frag == True else [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()
    


Fixed submission:
def func():
    input_num = int(input(''))
    return 3*input_num**2


if __name__ == "__main__":
    print(func())

Buggy python submission (verdict: Runtime Error):
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, [0]*input_num
    count = [1 for i in range(input_num) if a_i[0] == a_i[i]]
    frag = False if sum(count) >= 2 else True
    value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)] if frag == True else [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()

Fixed submission:
def func():
    input_num = int(input(''))
    return 3*input_num**2


if __name__ == "__main__":
    print(func())

Buggy python submission (verdict: Runtime Error):
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, 0
    for i in range(input_num):
        if a_i[0] == a_i[i]:
            count += 1
    if count == input_num:
         frag = False
    if frag == True:
        value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)]
    else:
        value = [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()

Fixed submission:
def func():
    input_num = int(input(''))
    return 3*input_num**2


if __name__ == "__main__":
    print(func())
Buggy python submission (verdict: Runtime Error):
    input_line = list(str(input('Put any literal: ')))
    for i in range(len(input_line)):
        for j in range(i+1,len(input_line)):
            if input_line[i] == input_line[j]:
                print('Yes')
                return
    print('No')


Fixed submission:
def func():
    input_line = list(str(input('')))
    flag = 0
    for i in range(len(input_line)):
        for j in range(i+1,len(input_line)):
            if input_line[i] == input_line[j]:
                flag += 1
    if flag == 2:
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    func()
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
a, b = map(int, input().split())
i = a / k
ans = 'NG'

while k * i <= b:
    if a <= k * i <= b: ans = 'OK'

print(ans)


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

if a <= int(b / k) * k: print('OK')
else: print('NG')

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
a, b = map(int, input().split())
i = 1
ans = 'NG'

while k * i <= b:
    if a <= k * i <= b: ans = 'OK'

print(ans)

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

if a <= int(b / k) * k: print('OK')
else: print('NG')
Buggy python submission (verdict: Runtime Error):
import math

r  = int(input())
print(2 * math.PI * r)

Fixed submission:
r  = int(input())
print(2 * 3.14 * r)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, list(input().split())))

for i in range(1, n + 1):
    print(a.count(i))



Fixed submission:
n = int(input())
a = list(map(int, list(input().split())))
result = [0 for i in range(n + 1)]

for i in range(0, n -1):
    result[a[i]] = result[a[i]] + 1

for j in range(1, n + 1):
    print(result[j])
Buggy python submission (verdict: Runtime Error):
rt = int(inut())

if rt >= 30:
    print("Yes")
else:
    print("No")

Fixed submission:
rt = int(input())

if rt >=30:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
ans = 1
for i in range(1,N+1):
  ans += ans+i
print(answer)

Fixed submission:
N = int(input())
ans = 0
 
for i in range(1,N+1):
  ans += i
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b=input(),input()
aa=int(a)
bb=int(b)

c=int((3*aa+bb)/2)
print(c)

Fixed submission:
import math

a,b=map(int,input().split())
aa=int(a)
bb=int(b)

c=math.floor(int((3*aa+bb)/2))
print(c)