Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
i = 1
while True:
    x = int(input)
    if x == 0:
        break
    print(f"Case {i}: {x}")
    i += 1


Fixed submission:
i = 1
while True:
    x = int(input())
    if x == 0:
        break
    print(f"Case {i}: {x}")
    i += 1
Buggy python submission (verdict: Runtime Error):
while True:
    inp = input()
    x, y = (int(inp[0]), int(inp[2]))
    op = inp[1]
    if op == '?':
        break
    else:
        if op == '+':
            print(x + y)
        elif op == '-':
            print(x - y)
        elif op == '*':
            print(x * y)
        elif op == '/':
            print(x // y)



Fixed submission:
while True:
    inp = input().split()
    x, y = (int(inp[0]), int(inp[2]))
    op = inp[1]
    if op == '?':
        break
    else:
        if op == '+':
            print(x + y)
        elif op == '-':
            print(x - y)
        elif op == '*':
            print(x * y)
        elif op == '/':
            print(x // y)
Buggy python submission (verdict: Runtime Error):
n = int(input)
a = map(int, input().split())
print(min(a), max(a), sum(a))


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
print(min(a), max(a), sum(a))

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = map(int, input().split())
print(min(a), max(a), sum(a))


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
print(min(a), max(a), sum(a))
Buggy python submission (verdict: Runtime Error):
n = int(input())
card = {
    'S':[False for _ in range(13)],
    'H':[False for _ in range(13)],
    'C':[False for _ in range(13)],
    'D':[False for _ in range(13)]
}
for _ in range(n):
    mark, num = map(int, input().split())
    card[mark][num-1] = True

for mark in "SHCD":
    for num in range(13):
        if card[mark][num] is False:
            print(mark, num+1)



Fixed submission:
n = int(input())
card = {
    'S':[False for _ in range(13)],
    'H':[False for _ in range(13)],
    'C':[False for _ in range(13)],
    'D':[False for _ in range(13)]
}
for _ in range(n):
    mark, num = input().split()
    num = int(num)
    card[mark][num-1] = True

for mark in "SHCD":
    for num in range(13):
        if card[mark][num] is False:
            print(mark, num+1)
Buggy python submission (verdict: Runtime Error):
bfr = [[[0 for _ in range(10)] for _ in range(3)] for _ in range(4)]

n = int(input())
for _ in range(n):
    b, f, r, v = map(int, input().split())
    bfr[b-1][f-1][r-1] += v
for b in range(4):
    for f in range(3):
        print(' ' + ' '.join(map(str, bfr[b][f])))
    if b != 3:
        print('#'*20)


Fixed submission:
n, m = map(int, input().split())
a = []
for _ in range(n):
    a.append(list(map(int, input().split())))
b = []
for _ in range(m):
    b.append(int(input()))

for i in range(n):
    s = 0
    for j in range(m):
        s += a[i][j] * b[j]
    print(s)
Buggy python submission (verdict: Runtime Error):
print(sum([int(x[i]) for i in range(len(x))]))



Fixed submission:
while True:
    x = input()
    if x == '0':
        break
    print(sum([int(x[i]) for i in range(len(x))]))
Buggy python submission (verdict: Runtime Error):



nk=input().split()

n=int(nk[0])
k=int(nk[1])

weight=[int(input()) for i in range(n)]

def ok(m):
    load=0
    track=1
    # sum all the weight and count the track number we need
    for i in range(n):
        load+=weight[i]
        if load==m:
            load=0
            if i!=n-1:
                track+=1
        elif load>m:
            if weight[i]>m:
                return False
            else:
                load=weight[i]
                track+=1
        else:
            continue

    if track<=k:
        return True
    else:
        return False

low=0
high=sum(weight)//(k//2)
while low+1<high:
# low<mid<high
#not ok(l) and ok(h)
    mid=(low+high)//2
    if ok(mid):
        high=mid
    else:
        low=mid



print(high)

Fixed submission:



nk=input().split()

n=int(nk[0])
k=int(nk[1])

weight=[int(input()) for i in range(n)]

def ok(m):
    load=0
    track=1
    # sum all the weight and count the track number we need
    for i in range(n):
        load+=weight[i]
        if load==m:
            load=0
            if i!=n-1:
                track+=1
        elif load>m:
            if weight[i]>m:
                return False
            else:
                load=weight[i]
                track+=1
        else:
            continue

    if track<=k:
        return True
    else:
        return False

low=0
high=sum(weight)
while low+1<high:
# low<mid<high
#not ok(l) and ok(h)
    mid=(low+high)//2
    if ok(mid):
        high=mid
    else:
        low=mid



print(high)
Buggy python submission (verdict: Runtime Error):
while True:
  N,M = map(int,input().split())
  if N == M == 0:
    break
  else:
    L = []
	for i in range(N):
	  L.append(list(map(int,input().split())))
	L = sorted(L, key = lambda x:x[1])
	L.reverse()
	ans = 0
	for i in range(len(L)):
	  if M > 0:
	    if M-L[i][0] >= 0:
		  M -= L[i][0]
		else:
		  ans += (L[i][0]-M)*L[i][1]
		  M = 0
     else:
	   ans += L[i][0]*L[i][1]
    print(ans)


Fixed submission:
while True:
  N,M = map(int,input().split())
  if N == M == 0:
    break
  else:
    L = []
    for i in range(N):
      L.append(list(map(int,input().split())))
    L = sorted(L, key = lambda x:x[1])
    L.reverse()
    ans = 0
    for i in range(len(L)):
      if M > 0:
        if M-L[i][0] >= 0:
          M -= L[i][0]
        else:
          ans += (L[i][0]-M)*L[i][1]
          M = 0
      else:
        ans += L[i][0]*L[i][1]
    print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in range(N):
    n,k = map(int,input().split())
    L = list(map(int,input().split()))
    if n <= k:
        print(0)
    else:
        A = []
        for j in range(1,N):
            A.append(L[i]-L[i-1])
        A.sort()
        A.reverse()
        S = L[N-1]-L[0]
        for l in range(k-1):
            S -= A[l]
        print(S)


Fixed submission:
N = int(input())
for i in range(N):
    n,k = map(int,input().split())
    L = list(map(int,input().split()))
    if n <= k:
        print(0)
    else:
        A = []
        for j in range(1,n):
            A.append(L[j]-L[j-1])
        A.sort()
        A.reverse()
        S = L[n-1]-L[0]
        for l in range(k-1):
            S -= A[l]
        print(S)

Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in range(N):
    n,k = map(int,input().split())
    L = list(map(int,input().split()))
    if n <= k:
        print(0)
    else:
        A = []
        for j in range(1,n):
            A.append(L[i]-L[i-1])
        A.sort()
        A.reverse()
        S = L[n-1]-L[0]
        for l in range(k-1):
            S -= A[l]
        print(S)


Fixed submission:
N = int(input())
for i in range(N):
    n,k = map(int,input().split())
    L = list(map(int,input().split()))
    if n <= k:
        print(0)
    else:
        A = []
        for j in range(1,n):
            A.append(L[j]-L[j-1])
        A.sort()
        A.reverse()
        S = L[n-1]-L[0]
        for l in range(k-1):
            S -= A[l]
        print(S)
Buggy python submission (verdict: Runtime Error):
from sys import exit
import queue
V,E = [int(n) for n in input().split()]
ans = []

# N = int(input())
graph = [[] for _ in range(V)]
indeg = [0]*E
yet = [True]*E
def bfs(s):
    q = queue.Queue()
    q.put(s)
    while(not q.empty()):
        u = q.get()
        ans.append(u)
        yet[u]=False
        for v in graph[u]:
            indeg[v]-=1
            if(indeg[v]==0):
                q.put(v)

for i in range(E):
    s, t = [int(n) for n in input().split()]
    graph[s].append(t)
    indeg[t]+=1
for i in range(E):
    if(indeg[i]==0 and yet[i]):
        bfs(i)
for a in ans:
    print(a)
# a = [int(input()) for _ in range(N)]
# S = str(input())
# L = len(S)
# T = str(input())
# exit()



Fixed submission:
from sys import exit
import queue
V,E = [int(n) for n in input().split()]
ans = []

# N = int(input())
graph = [[] for _ in range(V)]
indeg = [0]*V
yet = [True]*V
def bfs(s):
    q = queue.Queue()
    q.put(s)
    while(not q.empty()):
        u = q.get()
        ans.append(u)
        yet[u]=False
        for v in graph[u]:
            indeg[v]-=1
            if(indeg[v]==0):
                q.put(v)

for i in range(E):
    s, t = [int(n) for n in input().split()]
    graph[s].append(t)
    indeg[t]+=1
for i in range(V):
    if(indeg[i]==0 and yet[i]):
        bfs(i)
for a in ans:
    print(a)
# a = [int(input()) for _ in range(N)]
# S = str(input())
# L = len(S)
# T = str(input())
# exit()

Buggy python submission (verdict: Runtime Error):
from sys import exit
import queue
V,E = [int(n) for n in input().split()]
ans = []

# N = int(input())
graph = [[] for _ in range(E)]
indeg = [0]*E
yet = [True]*E
def bfs(s):
    q = queue.Queue()
    q.put(s)
    while(not q.empty()):
        u = q.get()
        ans.append(u)
        yet[u]=False
        for v in graph[u]:
            indeg[v]-=1
            if(indeg[v]==0):
                q.put(v)

for i in range(E):
    s, t = [int(n) for n in input().split()]
    graph[s].append(t)
    indeg[t]+=1
for i in range(E):
    if(indeg[i]==0 and yet[i]):
        bfs(i)
for a in ans:
    print(a)
# a = [int(input()) for _ in range(N)]
# S = str(input())
# L = len(S)
# T = str(input())
# exit()



Fixed submission:
from sys import exit
import queue
V,E = [int(n) for n in input().split()]
ans = []

# N = int(input())
graph = [[] for _ in range(V)]
indeg = [0]*V
yet = [True]*V
def bfs(s):
    q = queue.Queue()
    q.put(s)
    while(not q.empty()):
        u = q.get()
        ans.append(u)
        yet[u]=False
        for v in graph[u]:
            indeg[v]-=1
            if(indeg[v]==0):
                q.put(v)

for i in range(E):
    s, t = [int(n) for n in input().split()]
    graph[s].append(t)
    indeg[t]+=1
for i in range(V):
    if(indeg[i]==0 and yet[i]):
        bfs(i)
for a in ans:
    print(a)
# a = [int(input()) for _ in range(N)]
# S = str(input())
# L = len(S)
# T = str(input())
# exit()
Buggy python submission (verdict: Runtime Error):
import sys
INF = (sys.maxint)/3

def SmallestWindow(S, a_list):
	i = 0
	j = 0
	tmpS = 0
	res = INF
	while 1 :
		while tmpS < S and i <len(a_list):
			i +=1
			tmpS += a_list[i]
		if (tmpS <S):
			break
		res = min (res, i-j)
		j += 1
		tmpS -=a_list[j]
	if res == INF:
		res = 0
	return res
		

def main():
	N, S = map(int, raw_input().split())
	a_list = map(int, raw_input().split())
	print SmallestWindow(S, a_list)

if __name__ == '__main__':
	main()

Fixed submission:
import sys
INF = (sys.maxint)/3

def SmallestWindow(S, a_list):
	i = 0
	j = 0
	tmpS = 0
	res = INF
	while 1 :
		while tmpS < S and i <len(a_list):
			tmpS += a_list[i]
			i = i+1
		if (tmpS <S):
			break
		res = min (res, i-j)
		tmpS -=a_list[j]
		j += 1
	if res == INF:
		res = 0
	return res
		

def main():
	N, S = map(int, raw_input().split())
	a_list = map(int, raw_input().split())
	print SmallestWindow(S, a_list)

if __name__ == '__main__':
	main()
Buggy python submission (verdict: Runtime Error):
import numpy as np
x = map(int, (raw_input()).split(" "))

print np.sqrt((x[2]-x[0])*(x[2]-x[0]) + (x[3]-x[1])*(x[3]-x[1]))

Fixed submission:
import math
x = map(float, (raw_input()).split(" "))

print math.sqrt((x[2]-x[0])*(x[2]-x[0]) + (x[3]-x[1])*(x[3]-x[1]))

Buggy python submission (verdict: Runtime Error):
import math
x = map(int, (raw_input()).split(" "))

print math.sqrt((x[2]-x[0])*(x[2]-x[0]) + (x[3]-x[1])*(x[3]-x[1]))

Fixed submission:
import math
x = map(float, (raw_input()).split(" "))

print math.sqrt((x[2]-x[0])*(x[2]-x[0]) + (x[3]-x[1])*(x[3]-x[1]))
Buggy python submission (verdict: Time Limit Exceeded):
class Dice:
    def __init__(self, men):
        self.men = men

    def throw(self, direction):
        if direction == "E":
            pmen = men[:]
            men[0] = pmen[3]
            men[1] = pmen[1]
            men[2] = pmen[0]
            men[3] = pmen[5]
            men[4] = pmen[4]
            men[5] = pmen[2]
        elif direction == "W":
            pmen = men[:]
            men[0] = pmen[2]
            men[1] = pmen[1]
            men[2] = pmen[5]
            men[3] = pmen[0]
            men[4] = pmen[4]
            men[5] = pmen[3]
        elif direction == "S":
            pmen = men[:]
            men[0] = pmen[4]
            men[1] = pmen[0]
            men[2] = pmen[2]
            men[3] = pmen[3]
            men[4] = pmen[5]
            men[5] = pmen[1]
        elif direction == "N":
            pmen = men[:]
            men[0] = pmen[1]
            men[1] = pmen[5]
            men[2] = pmen[2]
            men[3] = pmen[3]
            men[4] = pmen[0]
            men[5] = pmen[4]


    def printUe(self):
        print (self.men)[0]

    def printMigi(self):
        print (self.men)[2]

    def printMen(self):
        print self.men


men = map(int, (raw_input()).split(" "))
d = Dice(men)

q = int(raw_input())

for i in range(q):
    Q = map(int, (raw_input()).split(" "))
    print Q
    if(d.men[2] == Q[1] or d.men[3] == Q[1]):
        while(d.men[1] != Q[1]):
            d.throw("E")
    else:
        while(d.men[1] != Q[1]):
            d.throw("S")

    while(d.men[0] != Q[0]):
        d.throw("E")

    d.printMigi()

Fixed submission:
class Dice:
    def __init__(self, men):
        self.men = men

    def throw(self, direction):
        if direction == "E":
            pmen = men[:]
            men[0] = pmen[3]
            men[1] = pmen[1]
            men[2] = pmen[0]
            men[3] = pmen[5]
            men[4] = pmen[4]
            men[5] = pmen[2]
        elif direction == "W":
            pmen = men[:]
            men[0] = pmen[2]
            men[1] = pmen[1]
            men[2] = pmen[5]
            men[3] = pmen[0]
            men[4] = pmen[4]
            men[5] = pmen[3]
        elif direction == "S":
            pmen = men[:]
            men[0] = pmen[4]
            men[1] = pmen[0]
            men[2] = pmen[2]
            men[3] = pmen[3]
            men[4] = pmen[5]
            men[5] = pmen[1]
        elif direction == "N":
            pmen = men[:]
            men[0] = pmen[1]
            men[1] = pmen[5]
            men[2] = pmen[2]
            men[3] = pmen[3]
            men[4] = pmen[0]
            men[5] = pmen[4]


    def printUe(self):
        print (self.men)[0]

    def printMigi(self):
        print (self.men)[2]

    def printMen(self):
        print self.men


men = map(int, (raw_input()).split(" "))
d = Dice(men)

q = int(raw_input())

for i in range(q):
    Q = map(int, (raw_input()).split(" "))
    if(d.men[2] == Q[1] or d.men[3] == Q[1]):
        d.throw("E")

    while(d.men[1] != Q[1]):
        d.throw("S")

    while(d.men[0] != Q[0]):
        d.throw("E")

    d.printMigi()
Buggy python submission (verdict: Runtime Error):
import numpy
a, b = map(int, input().split())
n = int(input())
l = sorted([list(map(int, input().split())) for _ in range(n)])
line = [0]*(max(l)[1]+2)
line[a] += 1
line[b] -= 1
for a, b in l:
    line[a] += 1
    line[b] -= 1
if list(numpy.cumsum(line)).count(2):
    print(1)
else:
    print(0)


Fixed submission:
a, b = map(int, input().split())
n = int(input())
l = sorted([list(map(int, input().split())) for _ in range(n)])
line = [0]*1010
line[a] += 1
line[b] -= 1
for a, b in l:
    line[a] += 1
    line[b] -= 1
for i in range(1006):
    line[i+1] += line[i]
if line.count(2):
    print(1)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
n = int(input())
l = sorted([list(map(int, input().split())) for _ in range(n)])
line = [0]*(max(l)[1]+2)
line[a] += 1
line[b] -= 1
for a, b in l:
    line[a] += 1
    line[b] -= 1
for i in range(len(line)-1):
    line[i+1] += line[i]
if line.count(2):
    print(1)
else:
    print(0)


Fixed submission:
a, b = map(int, input().split())
n = int(input())
l = sorted([list(map(int, input().split())) for _ in range(n)])
line = [0]*1010
line[a] += 1
line[b] -= 1
for a, b in l:
    line[a] += 1
    line[b] -= 1
for i in range(1006):
    line[i+1] += line[i]
if line.count(2):
    print(1)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(raw_input())
pts = [[int(_) for _ in raw_input().split()] for i in xrange(n)]


def dot(a, b):
    return a[0] * b[0] + a[1] * b[1]


def cross(a, b):
    return a[0] * b[1] - a[1] * b[0]


def norm(a):
    return dot(a, a)


def dist2(a, b):
    return norm(sub(a, b))


def sub(a, b):
    return [a[0] - b[0], a[1] - b[1]]


# find the first point
p = min(pts, key=lambda p: (p[1], p[0]))
ans = [p]

cur = ans[0]
cur_dxdy = (-1, 0)
while True:
    # Find the next point
    q = pts[0]
    dxdy = sub(q, cur)
    d = dist2(cur, q)
    for q_ in pts[1:]:
        if q_ is cur:
            continue
        dxdy_ = sub(q_, cur)
        v = cross(dxdy, dxdy_)
        if v > 0:
            continue
        d_ = dist2(cur, q_)
        if v == 0 and d_ < d:
            continue
        q = q_
        dxdy = dxdy_
        d = d_

    # Find the points in the middle
    mids = [m for m in pts
            if cross(dxdy, sub(m, cur)) == 0 and dot(sub(m, cur), sub(m, q)) < 0]
    mids.sort(key=lambda m: dist2(cur, m))
    ans += mids

    if p is q:
        break
    ans.append(q)
    cur_dxdy = dxdy
    cur = q

print len(ans)
for p in ans:
    print p[0], p[1]

Fixed submission:
n = int(raw_input())
pts = [complex(*[float(_) for _ in raw_input().split()]) for i in xrange(n)]


def cross(a, b):
    return (a.conjugate() * b).imag


pts.sort(key=lambda p: (p.imag, p.real))

right = []
for p in pts:
    while len(right) >= 2 and cross(right[-1] - right[-2], p - right[-1]) < 0:
        right.pop()
    right.append(p)

left = []
for p in reversed(pts):
    while len(left) >= 2 and cross(left[-1] - left[-2], p - left[-1]) < 0:
        left.pop()
    left.append(p)

ans = right[:-1] + left[:-1]
print len(ans)
for p in ans:
    print int(p.real), int(p.imag)
Buggy python submission (verdict: Runtime Error):
for q in range(12000):
    a = tuple(map(int, input().split()))
    b = input()
    if a[0] == 0 and b[0] == '0':
        break

    hit = 0
    for i in range(4):
        if a[i] == int(b[i]):
            hit = hit + 1

    blow = 0
    for j in range(4):
        for i in range(4):
            if (int(b[j]) == a[i]) and (a[i] != int(b[i])) and (a[j] != int(b[j])):
                blow = blow + 1

    print(hit, blow)

Fixed submission:
while True:
    a, b = input().split()
    if a[0] is '0' and b[0] is '0':
        break
 
    hit = sum(1 for c, d in zip(a, b) if d is c)
    blow = sum(1 for e in b if e in a) - hit
    print(hit, blow)
Buggy python submission (verdict: Runtime Error):
memo = [1, 1]

def fib(n):
    if (n in memo):
        return memo[n]
    ans = fib(n-1) + fib(n-2)
    memo.append(ans)
    return ans

n = int(input())
print(fib(n))


Fixed submission:
memo = [1, 1]

def fib(n):
    if (n < len(memo)):
        return memo[n]

    memo.append(fib(n-1) + fib(n-2))
    return memo[n]

N = int(input())
print(fib(N))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
list = []

for i in range(N):
    tmp = int(input())
    list.append(tmp)

maxDiff = - 10 ** 9
for i in range(N):
    for j in range(i+1, N):
        tmpDiff = list[j] - list[i]
        if tmpDiff > maxDiff:
            maxDiff = tmpDiff
print(maxDiff)


Fixed submission:
N = int(input())
list = []

for i in range(N):
    tmp = int(input())
    list.append(tmp)

maxDiff = - 10 ** 9
tmpMin = list[0]
for i in range(N-1):
    maxDiff = max([maxDiff, list[i+1] - tmpMin])
    tmpMin = min([tmpMin, list[i+1]])
print(maxDiff)
Buggy python submission (verdict: Runtime Error):
#単体変更, 区間取得

class RMQ:
    #INF = int(1e18)
    INF = int((1<<31)-1)
    n = 0
    n_ = 0
    val = []
    def __init__(self, n_):
        n = 1
        while n < n_:
            n = n * 2
        self.n = n
        self.n_ = n_
        self.val = [self.INF] * (2 * n - 1)

    @staticmethod
    def merge(a, b):
        return min(a, b)
        
    def update(self,k, x):
        k = k + self.n - 1
        self.val[k] = x
        while k:
            k = k//2
            self.val[k] = self.merge(self.val[k*2+1], self.val[k*2+2])

    def dfs(self, a, b, k, l, r):
        if r <= a or b <= l:
            return self.INF
        if a <= l and r <= b:
            return self.val[k]
        vl = self.dfs(a, b, k * 2 + 1, l, (l+r)//2)
        vr = self.dfs(a, b, k * 2 + 2, (l+r)//2, r)
        return self.merge(vl, vr)
    

    def query(self, a, b):
        return self.dfs(a, b, 0, 0, self.n)

    
n, q = list(map(int, input().split()))
rmq = RMQ(n)

while q:
    q = q - 1
    com, x, y = list(map(int, input().split()))
    if com == 0:
        rmq.update(x, y)
    else:
        print (rmq.query(x, y + 1))



Fixed submission:
#単体変更, 区間取得

class RMQ:
    #INF = int(1e18)
    INF = int((1<<31)-1)
    n = 0
    n_ = 0
    val = []
    def __init__(self, n_):
        n = 1
        while n < n_:
            n = n * 2
        self.n = n
        self.n_ = n_
        self.val = [self.INF] * (2 * n - 1)

    @staticmethod
    def merge(a, b):
        return min(a, b)
        
    def update(self,k, x):
        k = k + self.n - 1
        self.val[k] = x
        while k:
            k = (k-1)//2
            self.val[k] = self.merge(self.val[k*2+1], self.val[k*2+2])

    def dfs(self, a, b, k, l, r):
        if r <= a or b <= l:
            return self.INF
        if a <= l and r <= b:
            return self.val[k]
        vl = self.dfs(a, b, k * 2 + 1, l, (l+r)//2)
        vr = self.dfs(a, b, k * 2 + 2, (l+r)//2, r)
        return self.merge(vl, vr)
    

    def query(self, a, b):
        return self.dfs(a, b, 0, 0, self.n)

    
n, q = list(map(int, input().split()))
rmq = RMQ(n)

query = rmq.query
update = rmq.update
while q:
    q = q - 1
    com, x, y = list(map(int, input().split()))
    if com == 0:
        update(x, y)
    else:
        print (query(x, y + 1))
Buggy python submission (verdict: Runtime Error):
import math
if __name__ == "__main__":
	r = int(input())
	print("%.6f %.6f"%(math.pi*r**2,math.pi*2*r))

Fixed submission:
import math
if __name__ == "__main__":
	r = float(input())
	print("%.6f %.6f"%(math.pi*r**2,math.pi*2*r))
Buggy python submission (verdict: Runtime Error):
def print_tmp(a_li):
    t = ' '.join(a_li)
    print(t)


n = int(input())
a = input()
A = [int(i) for i in a.split(' ')]
print_tmp(A)
for i in range(1, n-1):
    v = A[i]
    j = i -1
    while j >= 0 and A[j] > v:
        A[j+1] = A[j]
        j -= 1
    A[j+1] = v
    print_tmp(A)
print_tmp(A)



Fixed submission:
def print_tmp(a_li):
    s = [str(a) for a in a_li]
    t = ' '.join(s)
    print(t)


n = int(input())
a = input()
A = [int(i) for i in a.split(' ')]
print_tmp(A)
for i in range(1, n):
    v = A[i]
    j = i -1
    while j >= 0 and A[j] > v:
        A[j+1] = A[j]
        j -= 1
    A[j+1] = v
    print_tmp(A)