Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
x = input()
y = x[-1]
if y == 3:
  print("bon")
elif y == 0,:
  print("pon")
elif y == 1:
  print("pon")
elif y == 6:
  print("pon")
elif y == 8:
  print("pon")
else:
  print("hon")

Fixed submission:
x = int(input())
y = x%10
if y == 3:
  print("bon")
elif y == 0:
  print("pon")
elif y == 1:
  print("pon")
elif y == 6:
  print("pon")
elif y == 8:
  print("pon")
else:
  print("hon")

Buggy python submission (verdict: Runtime Error):
x = input()
y = x[-1]
if y == 3:
  print("bon")
elif y == 0,1,6,8:
  print("pon")
else:
  print("hon")

Fixed submission:
x = int(input())
y = x%10
if y == 3:
  print("bon")
elif y == 0:
  print("pon")
elif y == 1:
  print("pon")
elif y == 6:
  print("pon")
elif y == 8:
  print("pon")
else:
  print("hon")
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
U = T[：-1]
if S == U:
  print("Yes")
else:
  print("No")

Fixed submission:
S = input()
T = input()
U = T[:-1]
if S == U:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
U = T-T[-1]
if S == U:
  print("Yes")
else:
  print("No")

Fixed submission:
S = input()
T = input()
U = T[:-1]
if S == U:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
K,S=input().split("\n")
K=int(K)
S=str(S)
longS=len(S)
if longS <= K :
    print(S)
else:
    head=S[0]
    print(head + "...")

Fixed submission:
K=input()
S=input()
K=int(K)
S=str(S)
longS=len(S)
if longS <= K :
    print(S)
else:
    head=S[0:K]
    print(head + "...")
Buggy python submission (verdict: Runtime Error):
a,b=map(int(),input().split())
Hantei=(a * b) % 2
if Hantei == 1:
    print("Odd")
else:
    print("Even")


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

Buggy python submission (verdict: Runtime Error):
a,b=map(int(),imput().split())
Hantei=(a * b) % 2
if Hantei == 1:
    print("Odd")
else:
    print("Even")


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

Buggy python submission (verdict: Runtime Error):
a,b=map(int,imput().split())
Hantei=(a * b) % 2
if Hantei == 1:
    print("Odd")
else:
    print("Even")


Fixed submission:
a,b=input().split()
a=int(a)
b=int(b)
Hantei=(a * b) % 2
if Hantei == 1:
    print("Odd")
else:
    print("Even")
Buggy python submission (verdict: Runtime Error):
n=int(input())
n3=n//3
s3=((n3)*3)(n3+1)//2
n5=n//5
s5=((n5)*5)(n5+1)//2
n15=n//15
s15=((n15)*15)(n15+1)//2

s=n*(n+1)//2
s=s-s3-s5+s15
print(s)

Fixed submission:
n=int(input())
n3=n//3
s3=(n3*3)*(n3+1)//2
n5=n//5
s5=((n5)*5)*(n5+1)//2
n15=n//15
s15=((n15)*15)*(n15+1)//2
 
s=n*(n+1)//2
s=s-s3-s5+s15
print(s)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=input()
r=[0]*n
b=[0]*n
g=[0]*n
cb=0
cg=0
cr=0
for i in range(n-1,-1,-1):
  if s[i]=='R':
    cr+=1
  elif s[i]=='G':
    cg+=1
  else:
    cb+=1
  r[i]=cr
  g[i]=cg
  b[i]=cb
p=0
for i in range(n):
  for j in range(i+1,n-1):
    if( (s[i]=='R' and s[j]=='B') or (s[i]=='B' and s[j]=='R') ):
      p+=g[j+1]
      if j+(j-i)<n and s[j+(j-i)]=='G':
        p-=1
        
    if( (s[i]=='R' and s[j]=='G') or (s[i]=='G' and s[j]=='R') ):
      p+=b[j+1]
      if j+(j-i)<n and s[j+(j-i)]=='B':
        p-=1
     
    if( (s[i]=='G' and s[j]=='B') or (s[i]=='B' and s[j]=='G') ):
      p+=r[j+1]
      if j+(j-i)<n and s[j+(j-i)]=='R':
        p-=1
print(p)

Fixed submission:
n=int(input())
s=input()
r=[0]*n
b=[0]*n
g=[0]*n
cb=0
cg=0
cr=0
for i in range(n-1,-1,-1):
  if s[i]=='R':
    cr+=1
  elif s[i]=='G':
    cg+=1
  else:
    cb+=1
  r[i]=cr
  g[i]=cg
  b[i]=cb
  
fr=[0]*n
fb=[0]*n
fg=[0]*n
cb=0
cg=0
cr=0
for i in range(n):
  if s[i]=='R':
    cr+=1
  elif s[i]=='G':
    cg+=1
  else:
    cb+=1
  fr[i]=cr
  fg[i]=cg
  fb[i]=cb
  
p=0
for i in range(1,n-1):
  if s[i]=='B':
    p+=fg[i-1]*r[i+1]+fr[i-1]*g[i+1]
    j=i-1
    k=i+1
    while (j>-1 and k<n):
      if (s[j]=='G' and s[k]=='R' or s[j]=='R' and s[k]=='G'):
        p-=1
      j-=1
      k+=1
      
  if s[i]=='G':
    p+=fb[i-1]*r[i+1]+fr[i-1]*b[i+1]
    j=i-1
    k=i+1
    while (j>-1 and k<n):
      if (s[j]=='B' and s[k]=='R' or s[j]=='R' and s[k]=='B'):
        p-=1
      j-=1
      k+=1
      
  if s[i]=='R':
    p+=fb[i-1]*g[i+1]+fg[i-1]*b[i+1]
    j=i-1
    k=i+1
    while (j>-1 and k<n):
      if (s[j]=='B' and s[k]=='G' or s[j]=='G' and s[k]=='B'):
        p-=1
      j-=1
      k+=1
  
print(p)
Buggy python submission (verdict: Runtime Error):
n=input()
if a[2]==a[3] and a[4]==a[5]:
  print("Yes")
else:
  print("No")

Fixed submission:
a=input()
if a[2]==a[3] and a[4]==a[5]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())

from sympy import *

x = sympy.Symbol('x') #xを変数xとして定義
f = 2*x -a-b 

solutions=sympy.solve(f,x) # f=0としてxを解き変数solutionsに代入
print(solutions)

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

if (a+b)%2 == 0:
  print((a+b)//2)
else:
  print('IMPOSSIBLE')
Buggy python submission (verdict: Runtime Error):
A,P= map(int, input().split())
G=0
G=(3*A+P)//2
print(G)

Fixed submission:
A,P= map(int, input().split())
G=0
G=(3*A+P)//2
print(G)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = a%10
print(b)
if b == 2 or b == 4 or b == 5 or b == 7 or b == 9:
  print("hon")
elsif b == 0 or b == 1 or b == 6 or b == 8:
  print("pon")
else:
  print("bon")

Fixed submission:
a = int(input())
b = a%10
if b == 2 or b == 4 or b == 5 or b == 7 or b == 9:
  print("hon")
elif b == 0 or b == 1 or b == 6 or b == 8:
   print("pon")
else:
  print("bon")

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = a%10
print(b)
if b == 2 or b == 4 or b == 5 or b == 7 or b == 9:
  print("hon")
elsif b == 0 or b == 1 or b == 6 or b == 8:
   print("pon")
else:
  print("bon")


Fixed submission:
a = int(input())
b = a%10
if b == 2 or b == 4 or b == 5 or b == 7 or b == 9:
  print("hon")
elif b == 0 or b == 1 or b == 6 or b == 8:
   print("pon")
else:
  print("bon")

Buggy python submission (verdict: Runtime Error):
import networkx as nx
N, M = map(int, input().split())

edge_list = s = [input().split() for i in range(M)]
G = nx.Graph()
G.add_edges_from(edge_list)

if [] in nx.shortest_path(G, target=str(1)).values():
  print("No")
else:
  print("Yes")
  for i in range(len(list(nx.shortest_path(G, target=str(1)).values()))-1):
    print(nx.shortest_path(G, target=str(1))[str(i+2)][1])
      

Fixed submission:
a = input()
a = int(a)

if a % 10 == 2 or a % 10 == 4 or a % 10 == 5 or a % 10 == 7 or a % 10 == 9:
    print("hon")
elif a % 10 == 0 or a % 10 == 1 or a % 10 == 6 or a % 10 == 8:
    print("pon")
else:
    print("bon")
Buggy python submission (verdict: Runtime Error):
import math

A = int(input())
B = int(input())
H = int(input())
M = int(input())

alpha = (H + M/60)/12 * 2*math.pi
beta = M/60 * 2*math.pi

X = A*math.cos(alpha) - B*math.cos(beta)
Y = A*math.sin(alpha) - B*math.sin(beta)

distance = math.sqrt(X*X + Y*Y)

print(distance)


Fixed submission:
import math

A, B, H, M = [int(i) for i in input().split()]

alpha = (H + M/60)/12 * 2*math.pi
beta = M/60 * 2*math.pi

X = A*math.cos(alpha) - B*math.cos(beta)
Y = A*math.sin(alpha) - B*math.sin(beta)

print(math.sqrt(X*X + Y*Y))
Buggy python submission (verdict: Runtime Error):
num == int(input())
num_1 == num % 10
if num_1 == 3:
  print('bon')
elif num_1 <= 1 or num_1 == 6 or num_1 == 8:
  print('pon')
else:
  print('hon')

Fixed submission:
num = int(input())
num_1 = num % 10
if num_1 == 3:
  print('bon')
elif num_1 <= 1 or num_1 == 6 or num_1 == 8:
  print('pon')
else:
  print('hon')

Buggy python submission (verdict: Runtime Error):
num == int(input())
num_1 == num % 10
if num_1 == 3:
  print('bon')
elif num_1 <= 1 or num_1 == 6 or num_1 == 8:
  print('pon')
else:
  print('hon')

Fixed submission:
num = int(input())
num_1 = num % 10
if num_1 == 3:
  print('bon')
elif num_1 <= 1 or num_1 == 6 or num_1 == 8:
  print('pon')
else:
  print('hon')

Buggy python submission (verdict: Runtime Error):
num = int(input())
num_1 = num % 10
if num_1 == 2,4,5,7,9:
  print('hon')
elif num_1 == 0,1,6,8:
  print('pon')
else:
  print('bon')

Fixed submission:
num = int(input())
num_1 = num % 10
if num_1 == 3:
  print('bon')
elif num_1 <= 1 or num_1 == 6 or num_1 == 8:
  print('pon')
else:
  print('hon')

Buggy python submission (verdict: Runtime Error):
num = int(input())
num_1 = num % 10
if num_1 = 2,4,5,7,9:
  print('hon')
elif num_1 = 0,1,6,8:
  print('pon')
else:
  print('bon')

Fixed submission:
num = int(input())
num_1 = num % 10
if num_1 == 3:
  print('bon')
elif num_1 <= 1 or num_1 == 6 or num_1 == 8:
  print('pon')
else:
  print('hon')
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = list(map(int, input().split()))
 
goukei = sum(A)
 
if goukei > N:
  print(-1)
  
else:
  print(N-goukei)

Fixed submission:
# -*- coding: utf-8 -*-
import math
 
inp = float(input())
 
print(inp*2*math.pi)
Buggy python submission (verdict: Time Limit Exceeded):
N, X, Y = map(int,input().split())
dis = Y-X

lists = [0 for i in range(N-1)]
for i in range(1,N+1):
    for j in range(i+1,N+1):
        if i <= X and Y <= j:
            pro = j-i-dis+1
            lists[pro-1] += 1
        elif i <= X and X <= j <= Y:
            pro = X+Y-i-j+1
            sta = j-i
            lists[min(pro,sta)-1] += 1
        elif X <= i <= Y and Y <= j:
            pro = i+j-X-Y+1
            sta = j-i
            lists[min(pro,sta)-1] += 1
        elif X <= i <= Y and X <= j <= Y:
            pro = i-j-X+Y+1
            sta = j-i
            lists[min(pro,sta)-1] += 1
        else:
            lists[j-i-1] += 1
            
for i in lists:
    print(i)

Fixed submission:
N, X, Y = map(int,input().split())
dis = Y-X

lists = [0 for i in range(N-1)]
for i in range(1,Y):
    for j in range(i+1,N+1):
        if i <= X and Y <= j:
            pro = j-i-dis+1
            lists[pro-1] += 1
        elif i <= X and X <= j <= Y:
            pro = X+Y-i-j+1
            sta = j-i
            lists[min(pro,sta)-1] += 1
        elif X <= i <= Y and Y <= j:
            pro = i+j-X-Y+1
            sta = j-i
            lists[min(pro,sta)-1] += 1
        elif X <= i <= Y and X <= j <= Y:
            pro = i-j-X+Y+1
            sta = j-i
            lists[min(pro,sta)-1] += 1
        else:
            lists[j-i-1] += 1

for i in range(1,N-Y+1):
    lists[i-1] += N-Y-i+1
    
for i in lists:
    print(i)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
sc_list = []
for i in range(M):
    s, c = map(int, input().split())
    sc_list.append([s,c])
ans = ""
flag = 0
num_slot = [-1 for i in range(N)]
for lists in sc_list:
    if num_slot[lists[0]-1] != -1 and num_slot[lists[0]-1] != lists[1]:
        print(-1)
        flag = 1
        break
    else:
        num_slot[lists[0]-1] = lists[1]
if flag == 0:
    for i in range(N):
        if num_slot[i] != -1:
            ans += str(num_slot[i])
        else:
            if i == 0:
                ans += "1"
            else:
                ans += "0"
if ans[0] == "0":
    print(-1)
else:
    print(int(ans))

Fixed submission:
N, M = map(int, input().split())
sc_list = []
for i in range(M):
    s, c = map(int, input().split())
    sc_list.append([s,c])
ans = ""
flag = 0
num_slot = ["X" for i in range(N)]
for lists in sc_list:
    if num_slot[lists[0]-1] != "X" and num_slot[lists[0]-1] != lists[1]:
        print(-1)
        flag = 1
        break
    else:
        num_slot[lists[0]-1] = lists[1]
if flag == 0:
    for i in range(N):
        if num_slot[i] != "X":
            ans += str(num_slot[i])
        else:
            if i == 0:
                ans += "1"
            else:
                ans += "0"
    if ans[0] == "0" and ans != "0":
        print(-1)
    elif N == 1 and M == 0:
        print(0)
    else:
        print(int(ans))

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
sc_list = []
for i in range(M):
    s, c = map(int, input().split())
    sc_list.append([s,c])
ans = ""
flag = 0
num_slot = [-1 for i in range(N)]
for lists in sc_list:
    if num_slot[lists[0]-1] != -1 and num_slot[lists[0]-1] != lists[1]:
        print(-1)
        flag = 1
        break
    else:
        num_slot[lists[0]-1] = lists[1]
if flag == 0:
    for i in range(N):
        if num_slot[i] != -1:
            ans += str(num_slot[i])
        else:
            if i == 0:
                ans += "1"
            else:
                ans += "0"
if ans[0] == "0":
    print(-1)
else:
    print(ans)

Fixed submission:
N, M = map(int, input().split())
sc_list = []
for i in range(M):
    s, c = map(int, input().split())
    sc_list.append([s,c])
ans = ""
flag = 0
num_slot = ["X" for i in range(N)]
for lists in sc_list:
    if num_slot[lists[0]-1] != "X" and num_slot[lists[0]-1] != lists[1]:
        print(-1)
        flag = 1
        break
    else:
        num_slot[lists[0]-1] = lists[1]
if flag == 0:
    for i in range(N):
        if num_slot[i] != "X":
            ans += str(num_slot[i])
        else:
            if i == 0:
                ans += "1"
            else:
                ans += "0"
    if ans[0] == "0" and ans != "0":
        print(-1)
    elif N == 1 and M == 0:
        print(0)
    else:
        print(int(ans))
Buggy python submission (verdict: Runtime Error):
N = int(input())
dicta = {}
for i in range(N):
    word = input()
    dicta.setdefault(word, 0)
    dicta[word] += 1
word_c = list(dicta.items())
word_c.sort(key=lambda tup: tup[1], reverse=True)
max_len_word = [word_c[0][0]]
for j in range(1,N):
    if word_c[j][1] == word_c[0][1]:
        max_len_word.append(word_c[j][0])
    else:
        break
max_len_word.sort()
for word in max_len_word:
    print(word)

Fixed submission:
N = int(input())
dicta = {}
for i in range(N):
    word = input()
    dicta.setdefault(word, 0)
    dicta[word] += 1
word_c = list(dicta.items())
word_c.sort(key=lambda tup: tup[1], reverse=True)
max_len_word = [word_c[0][0]]
for j in range(1,len(word_c)):
    if word_c[j][1] == word_c[0][1]:
        max_len_word.append(word_c[j][0])
    else:
        break
max_len_word.sort()
for word in max_len_word:
    print(word)
Buggy python submission (verdict: Runtime Error):
N = int(input())
lists = list(map(int, input().split()))
count = 1
mins = lists[0]
for i in range(1,N):
	if lists[i] <= mins:
    	count = count + 1
		mins = lists[i]
print(count)

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

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
lists = list(map(int, input().split()))
count = 0
for i in range(0,N):
    for j in range(0,i):
        if lists[i] > lists[j]:
            break
    else:
        count = count + 1
print(count)

Fixed submission:
N = int(input())
lists = list(map(int, input().split()))
count = 1
mins = lists[0]
for i in range(1,N):
    if lists[i] <= mins:
        count = count + 1
        mins = lists[i]
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
lists = [str(i) for i in range(1,N+1)]
count = 0
for i in range(0,N):
    for j in range(i,N):
        if lists[i][0] == lists[j][-1] and lists[i][-1] == lists[j][0]:
            if lists[i] == lists[j]:
                count = count + 1
            else:
                count = count + 2
print(count)

Fixed submission:
N = int(input())
lists = [str(i) for i in range(1,N+1)]
count = 0
for i in range(1,10):
    for j in range(i,10):
        s_cnt, t_cnt = 0, 0
        si, sj = str(i), str(j)
        for k in lists:
            if k[0] == si and k[-1] == sj:
                s_cnt += 1
            elif k[0] == sj and k[-1] == si:
                t_cnt += 1
        if i != j:
            count += s_cnt * t_cnt * 2
        elif i == j:
            count += s_cnt ** 2
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
import heapq
def main():
    x, y, a, b, c = map(int,input().split())
    p_ins = list(map(int,input().split()))
    q_ins = list(map(int,input().split()))
    r_ins = list(map(int,input().split()))
    p = select(p_ins, x)
    q = select(q_ins, y)
    r = select(r_ins, min(c, x + y))
    res = 0
    for _ in range(x + y):
        if p[-1] <= r[-1] and q[-1] <= r[-1]:
            t = r.pop()
            res += t
        elif p[-1] <= q[-1]:
            t = q.pop()
            res += t
        else:
            t = p.pop()
            res += t
    print(res)

def select(array, length):
    ins = []
    res_l = []
    for part in array:
        heapq.heappush(ins,-part)
    for _ in range(length):
        res = heapq.heappop(ins)
        res_l = [-res] + res_l
    return [0] + res_l


if __name__ == "__main__":
    main()


Fixed submission:
import heapq
def main():
    x, y, a, b, c = map(int,input().split())
    p = list(map(int,input().split()))
    q = list(map(int,input().split()))
    r = list(map(int,input().split()))
    pp = select(p, x)
    qq = select(q, y)
    res = select(pp + qq + r, x + y)
    print(sum(res))



def select(array, length):
    ins = []
    res_l = []
    for part in array:
        heapq.heappush(ins,-part)
    for _ in range(length):
        res = heapq.heappop(ins)
        res_l.append(-res)
    return res_l


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def counter(list_1,list_2,length):
    w = list_1.pop()
    count = 0
    while True:
        for x,y in list_2:
            if x == w:
                if not list_1:
                    return count * length + y
                w = list_1.pop()
        count += 1
s = input()
le_s = len(s)
t = input()
l_t = [x for x in t]
l_t.reverse()
s_t = set(l_t)
l_s = []
s_s =set()
i = 1
for y in s:
    if y in s_t:
        l_s.append((y,i))
        s_s.add(y)
    i += 1
if s_t != s_s:
    print(-1)
    exit()
print(counter(l_t,l_s,le_s))


Fixed submission:
def counter(list_1,list_2,length):
    count = 0
    m = 0
    for n in list_1:
        if m == length:
            count += 1
            m = 0
        m = list_2[n][m]
        if m == -1 :
            count += 1
            m = list_2[n][0]
    return count * length + m
s = input()
le_s = len(s)
t = input()
l_t = [ord(x)-97 for x in t]
s_t = set(l_t)
l_s = [[-1 for p in range(le_s)] for _ in range(26)]
s_s =set()
i = 1
l_c = [0 for _ in range(26)]
for y in s:
    z = ord(y)-97
    if z in s_t:
        l_s[z][l_c[z]:i] = [i for a in range(i - l_c[z])]
        l_c[z] = i
        s_s.add(z)
    i += 1
if s_t != s_s:
    print(-1)
    exit()
print(counter(l_t,l_s,le_s))
Buggy python submission (verdict: Runtime Error):
job = list()
salary = list()
m_total = 0
j = 0
n,m = map(int,input().split())
for i in range(n):
    a,b = map(int,input().split())
    job.append((a,b))
    job.sort(reverse = True)
for i in range(n):
    a,b = job[i]
    salary.append(b)
    if a + j > m :
        salary.remove(min(salary))
        continue
    j += 1
print(sum(salary))


Fixed submission:
a,b = map(int,input().split())
ab_list = list()
ab_list.append(a + b)
ab_list.append(a - b)
ab_list.append(a * b)
print(max(ab_list))
Buggy python submission (verdict: Time Limit Exceeded):
p = int(input())
b_list = [0 for _ in range(p)]
a_list = list(map(int,input().split()))
if a_list[0] == 1:
    a_list[0] = 0
    b_list[0] = 1
    b_list[p-1] = -1
c = 0
for i in a_list:
    t = i
    for j in range(p-1):
        b_list[p-j-1] -= t
        t = (t*c)%p
    c += 1
for j in b_list:
    print(j % p,end = ' ')


Fixed submission:
p = int(input())
b_list = [0 for _ in range(p-1)]
a_list = list(map(int,input().split()))
def frac(n):
    if a_list[n] == 1:
        t = 1
        for j in range(p-1):
            b_list[j] -= t
            t = (t*n)%p
if a_list[0] == 1:
    b_list[0] -= 1
for i in range(p-1):
    frac(i+1)
b_list.reverse()
print(a_list[0],end = ' ')
for j in b_list:
    print(j % p,end = ' ')

Buggy python submission (verdict: Time Limit Exceeded):
p = int(input())
b_list = [0 for _ in range(p)]
a_list = list(map(int,input().split()))
if a_list[0] == 1:
    a_list[0] = 0
    b_list[0] = 1
    b_list[p-1] = -1
c = 0
for i in a_list:
    if i == 1:
        for j in range(p-1):
            b_list[j+1] -= c**(p-j-2)
    c += 1
for j in b_list:
    print(j % p,end = ' ')


Fixed submission:
p = int(input())
b_list = [0 for _ in range(p-1)]
a_list = list(map(int,input().split()))
def frac(n):
    if a_list[n] == 1:
        t = 1
        for j in range(p-1):
            b_list[j] -= t
            t = (t*n)%p
if a_list[0] == 1:
    b_list[0] -= 1
for i in range(p-1):
    frac(i+1)
b_list.reverse()
print(a_list[0],end = ' ')
for j in b_list:
    print(j % p,end = ' ')
Buggy python submission (verdict: Runtime Error):
import math
A,B,H,M=map(int,input().split())
cen=(60*H+M)/2-6*M
cen_cos=math.cos(math.radian(cen))

print(A**2+B**2-2*cen_cos*A*B)


Fixed submission:
import math
A,B,H,M=map(int,input().split())
cen=(60*H+M)/2-6*M
cen_cos=math.cos(math.radians(cen))

print((A**2+B**2-2*cen_cos*A*B)**0.5)

Buggy python submission (verdict: Runtime Error):
import math
A,B,H,M=map(int,input().split())
cen=(60*H+M)/2-6M
cen_cos=math.cos(cen)

print(A**2+B**2-2*cen_cos*A*B)

Fixed submission:
import math
A,B,H,M=map(int,input().split())
cen=(60*H+M)/2-6*M
cen_cos=math.cos(math.radians(cen))

print((A**2+B**2-2*cen_cos*A*B)**0.5)
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input()
print("No") if N%2!==0  else print("No") if S[:(N/2)+1:] != S[(N/2)+1::]
      else print("Yes")

Fixed submission:
N = int(input())
S = input()
print("Yes" if S[:N//2] == S[N//2:] else "No")
Buggy python submission (verdict: Runtime Error):
m,n=[int(input()) for i in range(2)]
print((m-1)*(n-1))

Fixed submission:
m,n= map(int,input().split())
print((m-1)*(n-1))
Buggy python submission (verdict: Runtime Error):
N=int(input())
M=int(math.factorial(N))
L=10**9+7
print(M%L)

Fixed submission:
import math
N=int(input())
print(math.factorial(N) % (10**9+7))
Buggy python submission (verdict: Runtime Error):
s=input()
A=str(A+s[8]+C)
print(str(A))

Fixed submission:
s=input()
print("A"+s[8]+"C")