Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split]

total=0
for i in a:
    total+=i

hei=total/n

count=0
for i in a:
    if i <= hei:
        count+=1
        
print(count)


Fixed submission:
while(1):
	n=int(input())
	if n==0:
		break	
	a=[int(i) for i in input().split()]

	total=0
	for i in a:
		total+=i
	
	hei=total/n
	count=0
	for i in a:
		if i <=hei:
			count+=1
	print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

A = [0] * n
for i in range(n):
    A[i] = int(input())

def is_prime(n):
    if n < 2:
        return False
    if n == 2:
        return True
    if n % 2 == 0:
        return False
    for i in range(3, n, 2):
        if n % i == 0:
            return False
    return True

print(len([x for x in A if is_prime(x)]))

Fixed submission:
import math
n = int(input())

A = [0] * n
for i in range(n):
    A[i] = int(input())

# Naive method
def is_prime(n):
    if n < 2:
        return False
    elif n == 2 or n == 3 or n == 5 or n == 7:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(math.sqrt(n))+1, 2):
            if n % i == 0:
                return False
    return True

print(len([x for x in A if is_prime(x)]))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
n = int(input())

R = [0] * n
for i in range(n):
    R[i] = int(input())

# Naive Algorithm
max_gap = R[1] - R[0]
for i in range(n):
    for j in range(i+1, n):
        if R[j]-R[i] > max_gap:
            max_gap = R[j]-R[i]

print(max_gap)

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

R = [0] * n
for i in range(n):
    R[i] = int(input())

# Naive Algorithm
# mx = R[1] - R[0]
# for i in range(n):
#     for j in range(i+1, n):
#         if mx < A[j] - A[i]:
#             mx = A[j] - A[i]

# O(N) Algorithm
mx = R[1] - R[0]
mn = min(R[:2])

for r in R[2:]:
    if mx < r-mn:
        mx = r-mn
    elif mn > r:
        mn = r

print(mx)
Buggy python submission (verdict: Runtime Error):
a, b = tuple([int(x) for x in input().split()])
if a < b:
    print("a < b")
elif a > b:
    print("a > b")
else
    print("a == b")
    

Fixed submission:
a, b = tuple([int(x) for x in input().split()])
if a < b:
    print("a < b")
elif a > b:
    print("a > b")
else:
    print("a == b")
Buggy python submission (verdict: Runtime Error):
import math
if __name__ == "__main__":
    r = int(input())
    equivalent_of_circle = math.pi*(r**2)
    len_of_circle = math.pi*r*2
    print("%0.6f %0.6f"%(equivalent_of_circle,len_of_circle))

Fixed submission:
import math
if __name__ == "__main__":
    r = float(input())
    equivalent_of_circle = math.pi*(r**2)
    len_of_circle = math.pi*r*2
    print("%0.6f %0.6f"%(equivalent_of_circle,len_of_circle))

Buggy python submission (verdict: Runtime Error):
if __name__ == "__main__":
    import math
    r = int(input())
    equivalent_of_circle = math.pi*(r**2)
    len_of_circle = math.pi*r*2
    print("%0.6f %0.6f"%(equivalent_of_circle,len_of_circle))

Fixed submission:
import math
if __name__ == "__main__":
    r = float(input())
    equivalent_of_circle = math.pi*(r**2)
    len_of_circle = math.pi*r*2
    print("%0.6f %0.6f"%(equivalent_of_circle,len_of_circle))
Buggy python submission (verdict: Runtime Error):
def calc_t(i,j):
    global t,c
    if i<0 or j<0:
        return n+2
    #print("get t["+str(i)+","+str(j)+"]")
    if t[i][j]==n+1:
        t[i][j]=min(calc_t(i-1,j),calc_t(i,j-c[i])+1)
    return t[i][j]

ri=raw_input().split(" ")
n=int(ri[0])
m=int(ri[1])
ri=raw_input().split(" ")
c=[0]*m
t=[0]*m
for i in range(m):
    c[i]=int(ri[i])
    t[i]=[0]+[n+1]*n if i!=0 else range(n+1)
#print(c)
#print(t)
print(calc_t(m-1,n))

Fixed submission:
def calc_t(i,j):
    global t,c
    if i<0 or j<0:
        return n+2
    #print("get t["+str(i)+","+str(j)+"]")
    if t[i][j]==n+1:
        t[i][j]=min(calc_t(i-1,j),calc_t(i,j-c[i])+1)
    return t[i][j]

ri=raw_input().split(" ")
n=int(ri[0])
m=int(ri[1])
ri=raw_input().split(" ")
c=[0]*m
t=[0]*m
for i in range(m):
    c[i]=int(ri[i])
    t[i]=[0]+[n+1]*n if i!=0 else range(n+1)
c=sorted(c)
#print(c)
#print(t)
for a in range(n+1):
    for b in range(m):
        calc_t(b,a)
print(calc_t(m-1,n))
Buggy python submission (verdict: Time Limit Exceeded):
n,q = map(int,input().split())
A = [list(map(str,input().split())) for i in range(n)]
time = 0
flag = 1
while flag == 1:
    if int(A[0][1]) <= q: #プロセスが完了する場合
        time += int(A[0][1])
        print(A[0][1],time)
        del A[0]
    else: #プロセスが完了しない場合
        time += q
        A.append(A[0])
        del A[0]
    if len(A) == 0:
        flag = 0


Fixed submission:
n,q = map(int,input().split())
A = [list(map(str,input().split())) for i in range(n)]
time = 0
flag = 1
while len(A) > 0:
    if int(A[0][1]) <= q: #プロセスが完了する場合
        time += int(A[0][1])
        print(A[0][0],time)
        del A[0]
    else: #プロセスが完了しない場合
        time += q
        A[0][1] = str(int(A[0][1])-q)
        A.append(A[0])
        del A[0]
Buggy python submission (verdict: Runtime Error):
N = int(input())
U = [input() for i in range(N)]
M = int(input())
T = [input() for i in range(M)]

opened = False
for T_i in T:
    if T_i in U:
        if opened == True:
            print('Closed by ' + T_i)
            opened == False
        else:
            print('Opened by ' + T_i)
            opened == True


Fixed submission:
N = int(input())
U = [input() for i in range(N)]
M = int(input())
T = [input() for i in range(M)]

opened = False
for T_i in T:
    if T_i in U:
        if opened == True:
            print('Closed by ' + T_i)
            opened = False
        else:
            print('Opened by ' + T_i)
            opened = True
    else:
        print('Unknown ' + T_i)

Buggy python submission (verdict: Runtime Error):
N = int(input())
U = [input() for i in range(N)]
M = int(input())
T = [input() for i in range(M)]

opened = False
for T_i in T:
    if T_i in U:
        if opened == True:
            print('Closed by ' + T_i)
            opened == False
        else:
            print('Opened by ' + T_i)
            opened == True


Fixed submission:
N = int(input())
U = [input() for i in range(N)]
M = int(input())
T = [input() for i in range(M)]

opened = False
for T_i in T:
    if T_i in U:
        if opened == True:
            print('Closed by ' + T_i)
            opened = False
        else:
            print('Opened by ' + T_i)
            opened = True
    else:
        print('Unknown ' + T_i)

Buggy python submission (verdict: Runtime Error):
N = int(input())
U = [input() for i in range(N)]
M = int(input())
T = [input() for i in range(M)]

opened = False
for T_i in T:
    if T_i in U:
        if opened == True:
            print('Closed by ' + T_i)
            opened = False
        else:
            print('Opened by ' + T_i)
            opened = True


Fixed submission:
N = int(input())
U = [input() for i in range(N)]
M = int(input())
T = [input() for i in range(M)]

opened = False
for T_i in T:
    if T_i in U:
        if opened == True:
            print('Closed by ' + T_i)
            opened = False
        else:
            print('Opened by ' + T_i)
            opened = True
    else:
        print('Unknown ' + T_i)

Buggy python submission (verdict: Runtime Error):
N = int(input())
U = [input() for i in range(N)]
M = int(input())
T = [input() for i in range(M)]

opened = False
for T_i in T:
    if T_i in U:
        if opened == True:
            print('Closed by ' + T_i)
            opened = False
        else:
            print('Opened by ' + T_i)
            opened = True


Fixed submission:
N = int(input())
U = [input() for i in range(N)]
M = int(input())
T = [input() for i in range(M)]

opened = False
for T_i in T:
    if T_i in U:
        if opened == True:
            print('Closed by ' + T_i)
            opened = False
        else:
            print('Opened by ' + T_i)
            opened = True
    else:
        print('Unknown ' + T_i)
Buggy python submission (verdict: Runtime Error):
a,b = raw_input().split("\n")
print int(a)*int(b)

Fixed submission:
a,b = raw_input().strip().split(" ")
print int(a)*int(b),(int(a)+int(b))*2

Buggy python submission (verdict: Runtime Error):
a,b = raw_input().sprit().split(" ")
print int(a)*int(b)

Fixed submission:
a,b = raw_input().strip().split(" ")
print int(a)*int(b),(int(a)+int(b))*2
Buggy python submission (verdict: Runtime Error):
a,b = int(raw_input().strip().split(" "))
a = int(a)
b = int(b)
if a > b:
    print "a > b"
elif a < b:
    print "a < b"
else:
    print "a == b"

Fixed submission:
a,b = raw_input().strip().split(" ")
a = int(a)
b = int(b)
if a > b:
    print "a > b"
elif a < b:
    print "a < b"
else:
    print "a == b"
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
# Here your code !




def main(N,k):
    p = 0
    for i in range(N-1):
        p2 = p
        while p2-1-p2//k != p:
            p2+=1
        p=p2
    return p




if __name__ == '__main__':
    N,k=input().split()
    print(main(int(N),int(k)))

Fixed submission:
# coding: utf-8
# Here your code !

def main(N,k):
    p = 0
    p2 = 0
    memo = 0
    for i in range(N-1):
        p, p2 = p2, k*(p2+1)//(k-1) - 2
        while p2-1-p2//k != p:
            p2+=1
    return p2

if __name__ == '__main__':
    N,k=input().split()
    print(main(int(N),int(k)))
Buggy python submission (verdict: Runtime Error):
a = input().split(' ')

while a != ['0','0']:
    recomend = [0 for _ in range(int(a[1]))]
    for i in range(int(a[0])):
        b = input().split(' ')
        if recomend[int(b[0])-1] < int(b[1]):
            recomend[int(b[0])-1] = int(b[1])
    print(sum(recomend))
    a = input().split(' ')


Fixed submission:
a = input().split(' ')
tour = int(a[0])-1
no_vs = 0

if int(a[1]) != 0:
    absent = []
    for _ in range(int(a[1])):
        absent.append(int(input()))
    num = int(int(a[0])/2)
    while absent != []:
        next_absent = []
        for n in range(num):
            if 2*n in absent or 2*n+1 in absent:
                no_vs+=1
                if 2*n in absent and 2*n+1 in absent:
                    next_absent.append(n)
        absent = next_absent
        num = int(num/2)
            
print(tour-no_vs)

Buggy python submission (verdict: Runtime Error):
def make_alphabet(now_alphabet, alphabet):
    next_alphabet = []
    for n_al in now_alphabet:
        for al in alphabet:
            next_alphabet.append(n_al+al)
    return next_alphabet

a = int(input())
b = []
for a in range(a):
    b.append(input())
alphabet = [chr(ch) for ch in range(97,123)]
now_alphabet = alphabet
count=0
flag=0

while flag==0:
    letter = []
    for word in b:
        for i in range(len(word)-count):
            letter.append(word[i:i+1+count])
    rem = list(set(now_alphabet) - set(letter))
    if rem!=[]:
        print(sorted(rem)[0])
        flag=1
    count+=1
    now_alphabet = make_alphabet(now_alphabet, alphabet)
            
            



Fixed submission:
a = input().split(' ')
tour = int(a[0])-1
no_vs = 0

if int(a[1]) != 0:
    absent = []
    for _ in range(int(a[1])):
        absent.append(int(input()))
    num = int(int(a[0])/2)
    while absent != []:
        next_absent = []
        for n in range(num):
            if 2*n in absent or 2*n+1 in absent:
                no_vs+=1
                if 2*n in absent and 2*n+1 in absent:
                    next_absent.append(n)
        absent = next_absent
        num = int(num/2)
            
print(tour-no_vs)
Buggy python submission (verdict: Time Limit Exceeded):
def make_alphabet(now_alphabet, alphabet):
    next_alphabet = []
    for n_al in now_alphabet:
        for al in alphabet:
            next_alphabet.append(n_al+al)
    return next_alphabet

a = int(input())
b = []
for a in range(a):
    b.append(input())
alphabet = [chr(ch) for ch in range(97,123)]
now_alphabet = alphabet
count=0
flag=0

while flag==0:
    letter = []
    for word in b:
        for i in range(len(word)-count):
            letter.append(word[i:i+1+count])
    letter = list(set(letter))
    for al in now_alphabet:
        if al not in letter:
            print(al)
            flag=1
            break
    count+=1
    now_alphabet = make_alphabet(now_alphabet, alphabet)
            


Fixed submission:
def make_alphabet(now_alphabet, alphabet):
    next_alphabet = []
    for n_al in now_alphabet:
        for al in alphabet:
            next_alphabet.append(n_al+al)
    return next_alphabet

a = int(input())
b = []
for a in range(a):
    b.append(input())
alphabet = [chr(ch) for ch in range(97,123)]
now_alphabet = alphabet
count=0
flag=0

while flag==0:
    letter = []
    for word in b:
        for i in range(len(word)-count):
            letter.append(word[i:i+1+count])
    rem = list(set(now_alphabet) - set(letter))
    if rem!=[]:
        print(sorted(rem)[0])
        flag=1
    count+=1
    now_alphabet = make_alphabet(now_alphabet, alphabet)
Buggy python submission (verdict: Runtime Error):
print(input()**3)


Fixed submission:
print(int(input())**3)

Buggy python submission (verdict: Runtime Error):
print(input()**3)



Fixed submission:
print(int(input())**3)
Buggy python submission (verdict: Runtime Error):
t=int(input)
print('{}:{}:{}'.format(t//3600,t//60%60,t%60))



Fixed submission:
t=int(input())
print('{}:{}:{}'.format(t//3600,t//60%60,t%60))
Buggy python submission (verdict: Runtime Error):
s = float(i)**2 * 3.14159265359
l = float(i)*2*3.14159265359
print(s, l)



Fixed submission:
r = float(input())
s = r**2 * 3.14159265359
l = r*2 * 3.14159265359
print(s, l)
Buggy python submission (verdict: Runtime Error):
n,m,l = map(int, input().split())
a=[]
b=[]
ans=[[0 for _ in range(n)] for _ in range(l)]
for _ in range(n):
    a.append(list(map(int, input().split())))
for _ in range(m):
    b.append(list(map(int, input().split())))
for i in range(n):
    for j in range(l):
        for k in range(m):
            ans[i][j] = ans[i][j] + a[i][k] * b[k][j]
for ans_row in ans:
    print(*ans_row)



Fixed submission:
n, m, l = map(int, input().split())
a = []
b = []
ans = [[0 for _ in range(l)] for _ in range(n)]
for _ in range(n):
    a.append(list(map(int, input().split())))
for _ in range(m):
    b.append(list(map(int, input().split())))
for i in range(n):
    for j in range(l):
        for k in range(m):
            ans[i][j] = ans[i][j] + a[i][k] * b[k][j]
for ans_row in ans:
    print(*ans_row)
Buggy python submission (verdict: Runtime Error):
import string
text = ''
while True:
    in_text = input().lower()
    if not in_text:
        break
    text += in_text
for char in string.ascii_lowercase:
    print(char, ':', text.count(char))



Fixed submission:
import string
import sys
text = sys.stdin.read().lower()
for char in string.ascii_lowercase:
    print(char, ':', text.count(char))

Buggy python submission (verdict: Runtime Error):
import string
text = ''
while True:
    text += input().lower()
    for char in string.ascii_lowercase:
        print(char, ':', text.count(char))



Fixed submission:
import string
import sys
text = sys.stdin.read().lower()
for char in string.ascii_lowercase:
    print(char, ':', text.count(char))
Buggy python submission (verdict: Runtime Error):
key_word = input().lower()
counter = 0
while True:
    sentences = input().lower().split()
    if sentences == ['END_OF_TEXT']:
        break
    for sent in sentences:
        if sent == key_word:
            counter += 1
print(counter)



Fixed submission:
key_word = input().lower()
counter = 0
while True:
    sentences = input().split()
    if sentences == ['END_OF_TEXT']:
        break
    for sent in sentences:
        if sent.lower() == key_word:
            counter += 1
print(counter)
Buggy python submission (verdict: Runtime Error):
n=int(input())
for i in range(10**9)
    print("Case "+str(i+1)+": "+str(n))
    n=int(input())


Fixed submission:
n=int(input())
for i in range(10**9):
    print("Case "+str(i+1)+": "+str(n))
    n=int(input())
    if n==0:exit()

Buggy python submission (verdict: Runtime Error):
n=int(input())
for i in range(10**9)
    print("Case "+str(i+1)+": "+str(n))
    n=int(input())
    if n==0:exit()


Fixed submission:
n=int(input())
for i in range(10**9):
    print("Case "+str(i+1)+": "+str(n))
    n=int(input())
    if n==0:exit()
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split());print("{:d},{:d},{:.10f}".format(a//d,a%b,a/b))


Fixed submission:
a,b=map(int,input().split());print(a//b,a%b,"{:.10f}".format(a/b))

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split());print("{:d} {:d} {:.10f}".format(a//d,a%b,a/b))


Fixed submission:
a,b=map(int,input().split());print(a//b,a%b,"{:.10f}".format(a/b))

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split());print(a//b,a%b."{:10.10f}".format(a/b))


Fixed submission:
a,b=map(int,input().split());print(a//b,a%b,"{:.10f}".format(a/b))

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split());print(a//b,a%b."{0:10.10f}".format(a/b))


Fixed submission:
a,b=map(int,input().split());print(a//b,a%b,"{:.10f}".format(a/b))

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(a//b,a%b."{0:10.10f}".format(a/b))


Fixed submission:
a,b=map(int,input().split());print(a//b,a%b,"{:.10f}".format(a/b))

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(a//b,a%b."{0:10.20f}".format(a/b))


Fixed submission:
a,b=map(int,input().split());print(a//b,a%b,"{:.10f}".format(a/b))
Buggy python submission (verdict: Runtime Error):
import math;r=int(input());print(math.pi*(r**2),math.pi*r*2)


Fixed submission:
import math;r=float(input());print(math.pi*(r**2),math.pi*r*2)

Buggy python submission (verdict: Runtime Error):
import math;r,p=int(input()),3.141592653589793238462643;print(p*(r**2),p*r*2)


Fixed submission:
import math;r=float(input());print(math.pi*(r**2),math.pi*r*2)

Buggy python submission (verdict: Runtime Error):
r,p=int(input()),3.141592653589793238462643;print(p*(r**2),p*r*2)


Fixed submission:
import math;r=float(input());print(math.pi*(r**2),math.pi*r*2)

Buggy python submission (verdict: Runtime Error):
r,p=int(input()),3.141592653589
print(p*(r**2),p*r*2)


Fixed submission:
import math;r=float(input());print(math.pi*(r**2),math.pi*r*2)
Buggy python submission (verdict: Runtime Error):
a=input()
while a!="0 ? 0":
    print(int(eval(a)))
    a=input()


Fixed submission:
while 1:
  s=input()
  if s.split()[1]=="?":exit()
  print(int(eval(s)))

Buggy python submission (verdict: Runtime Error):
a=input()
while a[2]!=""?"0 ? 0""":
    print(eval(a))
    a=input()


Fixed submission:
while 1:
  s=input()
  if s.split()[1]=="?":exit()
  print(int(eval(s)))

Buggy python submission (verdict: Runtime Error):
a=input()
while a[2]!="?":
    print(int(eval(a)))
    a=input()


Fixed submission:
while 1:
  s=input()
  if s.split()[1]=="?":exit()
  print(int(eval(s)))

Buggy python submission (verdict: Runtime Error):
a=input()
while a[2]!="?":
    print(eval(a.strip().replace("/", "//")))
    a=input()


Fixed submission:
while 1:
  s=input()
  if s.split()[1]=="?":exit()
  print(int(eval(s)))
Buggy python submission (verdict: Runtime Error):
s = input()
n, m = s.split()
n = int(n)
m = int(m)

maxd = m // (n - 1)

A = m - maxd * (n-1) + 1
B = m - (n-1) + 1
ans = (A+B)*maxd + (m+1)
ans %= 1000000007
print(ans)

Fixed submission:
s = input()
n, m = s.split()
n = int(n)
m = int(m)

if n==1:
    print((m+1)%1000000007)
else:

    d = m // (n - 1)


    A = m - d * (n-1) + 1
    B = m - (n-1) + 1
    ans = (A+B)*d + (m+1)
    # ans = 2*(d*m+d)-(n-1)*(d+1)*d+m+1
    ans %= 1000000007
    print(ans)
Buggy python submission (verdict: Runtime Error):
d=raw_input()
d=d.split(" ")
d=list(map(int,d))
d=d.sort()
a=str(d[0])
b=str(d[1])
c=str(d[2])
print a+" "+b+" "+c


Fixed submission:
d=raw_input().split(" ")
s=list(map(int,d))
s.sort()
a=str(s[0])
b=str(s[1])
c=str(s[2])
print a+" "+b+" "+c
Buggy python submission (verdict: Runtime Error):
d=raw_input().split(" ")
l=list(map(int,d))
if(i[2]>0 and i[3]>0):
    if(l[0]>=(l[2]+l[4])):
        if(l[1]>=(l[3]+l[4])):
            print "Yes"
        else:
            print "No"
    else:
        print "No"
else:
   print "No"


Fixed submission:
d=raw_input().split(" ")
l=list(map(int,d))
if(l[2]>0 and l[3]>0):
    if(l[0]>=(l[2]+l[4])):
        if(l[1]>=(l[3]+l[4])):
            print "Yes"
        else:
            print "No"
    else:
        print "No"
else:
   print "No"
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N = int(input())
    S = tuple(map(int, input().split()))
    Q = int(input())
    T = tuple(map(int, input().split()))

    cnt = 0
    for i in T:
        if i in S:
            cnt += 1

    print(cnt)

main()

Fixed submission:
def main():
    global N, S
    N = int(input())
    S = tuple(map(int, input().split()))
    Q = int(input())
    T = tuple(map(int, input().split()))

    cnt = 0
    for i in T:
        cnt += binsearch(i)
    print(cnt)

def binsearch(key):
    left = 0
    right = N
    while left < right:
        mid = (left + right) // 2
        if key == S[mid]:
            return 1
        if key > S[mid]:
            left = mid + 1
        else:
            right = mid
    return 0

main()
Buggy python submission (verdict: Runtime Error):
import math

def main():
    X1, Y1, X2, Y2 = map(int, input().split())

    dist = math.sqrt((X2 - X1) ** 2 + (Y2 - Y1) ** 2)
    print(dist)

main()

Fixed submission:
import math

def main():
    X1, Y1, X2, Y2 = map(float, input().split())

    dist = math.sqrt((X2 - X1) ** 2 + (Y2 - Y1) ** 2)
    print(dist)

main()
Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <cmath>
using namespace std;

int main() {
  int x;
  int ans;

  cin >> x;
  ans = pow(x, 3);
  cout << ans << endl;

  return 0;
}



Fixed submission:
import math
x = int(input())
print(x ** 3)
Buggy python submission (verdict: Runtime Error):
import math
r = input()
m = r ** 2 * math.pi
l = r * 2 * math.pi
print('{:6f} {:.6f}'.format(m, l))

Fixed submission:
import math
r = float(input())
m = r ** 2 * math.pi
l = r * 2 * math.pi
print('{:.6f} {:.6f}'.format(m, l))

Buggy python submission (verdict: Runtime Error):
import math
r = input()
m = (r ** 2) * math.pi
l = r * 2 * math.pi
print('{} {}'.format(m, l))

Fixed submission:
import math
r = float(input())
m = r ** 2 * math.pi
l = r * 2 * math.pi
print('{:.6f} {:.6f}'.format(m, l))

Buggy python submission (verdict: Runtime Error):
#import math
r = input()
#m = (r ** 2) * math.pi
#l = r * 2 * math.pi
m = (r ** 2) * 3.14
l = r * 2 * 3.14
print('{} {}'.format(m, l))

Fixed submission:
import math
r = float(input())
m = r ** 2 * math.pi
l = r * 2 * math.pi
print('{:.6f} {:.6f}'.format(m, l))

Buggy python submission (verdict: Runtime Error):
import math
r = input()
m = r ** 2 * 3.14
l = r * 2 * 3.14
print('{:.5f} {:.5f}'.format(m, l))

Fixed submission:
import math
r = float(input())
m = r ** 2 * math.pi
l = r * 2 * math.pi
print('{:.6f} {:.6f}'.format(m, l))
Buggy python submission (verdict: Runtime Error):
def main():
    STR = input()
    Q = int(input())
    ORDER = tuple(tuple(input().split()) for _ in range(Q))

    str_ = list(STR)
    for order in ORDER:
        s = int(order[1])
        e = int(order[2]) + 1
        a = str_[s:e]
        if order[0] == 'print':
            print(''.join(a))
        elif order[0] == 'reverse':
            a = a[::-1]
            for i in range(s, e):
                str_[i] = a[i]
        elif order[0] == 'replace':
            j = s
            for i in range(s, e):
                str_[i] = order[3][i-j]

main()

Fixed submission:
def main():
    STR = input()
    Q = int(input())
    ORDER = tuple(tuple(input().split()) for _ in range(Q))

    str_ = list(STR)
    for order in ORDER:
        s = int(order[1])
        e = int(order[2]) + 1
        a = str_[s:e]
        if order[0] == 'print':
            print(''.join(a))
        elif order[0] == 'reverse':
            a = a[::-1]
            j = s
            for i in range(s, e):
                str_[i] = a[i-j]
        elif order[0] == 'replace':
            j = s
            for i in range(s, e):
                str_[i] = order[3][i-j]

main()