Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

import sys
import os
import math


n = int(input())
A = list(map(int, input().split()))
cnt = 0

def merge(A, left, mid, right):
    global cnt

    S = A[left:mid]
    T = A[mid:right]
    S.append(float('inf'))
    T.append(float('inf'))

    for i in range(right - left):
        cnt += 1
        if S[0] < T[0]:
            A[left + i] = S.pop(0)
        else:
            A[left + i] = T.pop(0)


def merge_sort(A, left, right):
    if left + 1 == right:
        # ???????????????
        return
    else:
        # ??????????????????
        mid = (left + right) // 2
        merge_sort(A, left, mid)
        merge_sort(A, mid, right)
        merge(A, left, mid, right)

merge_sort(A, 0, len(A))
print(*A)
print(cnt)

Fixed submission:
# -*- coding: utf-8 -*-

import sys
import os
import math


n = int(input())
A = list(map(int, input().split()))
cnt = 0

def merge(A, left, mid, right):
    global cnt

    S = A[left:mid]
    T = A[mid:right]
    S.append(float('inf'))
    T.append(float('inf'))

    s_i = 0
    t_i = 0
    for i in range(right - left):
        cnt += 1
        if S[s_i] < T[t_i]:
            A[left + i] = S[s_i]
            s_i += 1
        else:
            A[left + i] = T[t_i]
            t_i += 1


def merge_sort(A, left, right):
    if left + 1 == right:
        # ???????????????
        return
    else:
        # ??????????????????
        mid = (left + right) // 2
        merge_sort(A, left, mid)
        merge_sort(A, mid, right)
        merge(A, left, mid, right)

merge_sort(A, 0, len(A))
print(*A)
print(cnt)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import sys
import os
import pprint
from queue import Queue

"""Topological Sort"""

#fd = os.open('GRL_4_B.txt', os.O_RDONLY)
#os.dup2(fd, sys.stdin.fileno())

V, E = list(map(int, input().split()))
G = [[] for i in range(V)]
indig = [0] * V # ??\?¬???°
for i in range(V):
    s, t = list(map(int, input().split()))
    G[s].append(t)
    indig[t] += 1

q = Queue()
out = []

def bfs(node_index):
    q.put(node_index)

    while not q.empty():
        u = q.get()
        out.append(u)

        # u?????????????????§u?????????indig????????????
        for index in G[u]:
            indig[index] -= 1
            if indig[index] == 0:
                q.put(index)

# bfs?????????
indig_copy = indig[:]
for i in range(V):
    if indig_copy[i] == 0:
        bfs(node_index=i)

for v in out:
    print(v)

Fixed submission:
# -*- coding: utf-8 -*-

import sys
import os
import pprint
from queue import Queue

"""Topological Sort"""

#fd = os.open('GRL_4_B_5.txt', os.O_RDONLY)
#os.dup2(fd, sys.stdin.fileno())

V, E = list(map(int, input().split()))
G = [[] for i in range(V)]
indig = [0] * V # ??\?¬???°
for i in range(E):
    s, t = list(map(int, input().split()))
    G[s].append(t)
    indig[t] += 1

q = Queue()
out = []

def bfs(node_index):
    q.put(node_index)

    while not q.empty():
        u = q.get()
        out.append(u)

        # u?????????????????§u?????????indig????????????
        for index in G[u]:
            indig[index] -= 1
            if indig[index] == 0:
                q.put(index)

# bfs?????????
indig_copy = indig[:]
for i in range(V):
    if indig_copy[i] == 0:
        bfs(node_index=i)

for v in out:
    print(v)
Buggy python submission (verdict: Runtime Error):
s = get_input()
v = int(s)
print( v * v * v )

Fixed submission:
s = input()
v = int(s)
print(v ** 3)
Buggy python submission (verdict: Runtime Error):
a, b = list(map(int, input().split())
s = a * b
l = 2 * a + 2 * b
print(s, l)

Fixed submission:
# -*- coding: utf-8 -*-

import sys
import os
import pprint

#fd = os.open('ITP1_1_C.txt', os.O_RDONLY)
#os.dup2(fd, sys.stdin.fileno())

a, b = list(map(int, input().split()))
s = a * b
l = 2 * a + 2 * b
print(s, l)
Buggy python submission (verdict: Runtime Error):
a, b = list(map(int, input().split())

d = a // b
r = a % b
f = a / b

print(d, r, f

Fixed submission:
# -*- coding: utf-8 -*-

import sys
import os

a, b = list(map(int, input().split()))

d = a // b
r = a % b
f = a / b

print('{} {} {:.10f}'.format(d, r, f))

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

d = a // b
r = a % b
f = a / b

print(d, r, f)

Fixed submission:
# -*- coding: utf-8 -*-

import sys
import os

a, b = list(map(int, input().split()))

d = a // b
r = a % b
f = a / b

print('{} {} {:.10f}'.format(d, r, f))
Buggy python submission (verdict: Runtime Error):
import math
PI = math.pi
r = int(input())

s = r * r * PI
l = 2 * PI * r

print(s, l)

Fixed submission:
# -*- coding: utf-8 -*-

import sys
import os
import math
PI = math.pi

r = float(input())

s = r * r * PI
l = 2 * PI * r

print(s, l)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import sys
import os
import math
PI = math.pi

r = int(input())

s = r * r * PI
l = 2 * PI * r

print(s, l)

Fixed submission:
# -*- coding: utf-8 -*-

import sys
import os
import math
PI = math.pi

r = float(input())

s = r * r * PI
l = 2 * PI * r

print(s, l)
Buggy python submission (verdict: Runtime Error):
while True:
	n,m,a = map(int,input().split())
	if n == m == a == 0:
		break
	A = [[0]*1002 for i in range(n + 1)]
	for i in range(m + 1):
		h,p,q = map(int,input().split())
		A[p][1001 - h] = q
		A[q][1001 - h] = p
		
	for i in range(1001):
		if A[a][i] == 0:
			pass
		else:
			a = A[a][i]
	print(a)

Fixed submission:
while True:
	n,m,a = map(int,input().split())
	if n == m == a == 0:
		break
	A = [[0]*1002 for i in range(n + 1)]
	for i in range(m):
		h,p,q = map(int,input().split())
		A[p][1001 - h] = q
		A[q][1001 - h] = p
		
	for i in range(1001):
		if A[a][i] == 0:
			pass
		else:
			a = A[a][i]
	print(a)
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys

def qsort( a ):
	if not isinstance(a,list):
		raise TypeError('qsort can only sort \'list\'')
	if len(a) <= 1:
		return a
	p = a[0]
	for i in range(1,len(a)):
		if a[0] != a[i]:
			p = a[i]
			break
		elif i == len(a)-1:
			#all are same
			return a

	while True:
		i = 0
		j = len(a)
		for i in range( 0, len(a) ):
			if p <= a[i]:
				break
		for j in range( len(a)-1, -1, -1 ):
			if a[j] < p:
				break
		if i > j:
			a1 = qsort( a[:i] )
			a2 = qsort( a[i:] )
			a1.extend(a2)
			return a1
		else:
			tmp  = a[i]
			a[i] = a[j]
			a[j] = tmp

if __name__ == '__main__':
	m_list = []
	for i in range(0,10):
		m_list.append( int( sys.stdin.readline() ) )
	s = qsort(m_list)
	s.reverse()
	for i in range(0,3):
		print('{}'.format(s[i]))

Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys

def qsort( a ):
	if not isinstance(a,list):
		raise TypeError('qsort can only sort \'list\'')
	if len(a) <= 1:
		return a
	p = a[0]
	for i in range(1,len(a)):
		if a[0] != a[i]:
			if a[0] < a[i]:
				p = a[i]
			break
		elif i == len(a)-1:
			#all are same
			return a
	
	while True:
		i = 0
		j = len(a)
		for i in range( 0, len(a) ):
			if p <= a[i]:
				break
		for j in range( len(a)-1, -1, -1 ):
			if a[j] < p:
				break
		if i >= j:
			a1 = qsort( a[:i] )
			if i < len(a):
				a2 = qsort( a[i:] )
				a1.extend(a2)
			return a1
		else:
			tmp  = a[i]
			a[i] = a[j]
			a[j] = tmp

if __name__ == '__main__':
	m_list = []
	for i in range(0,10):
		m_list.append( int( sys.stdin.readline() ) )
	s = qsort(m_list)
	s.reverse()
	for i in range(0,3):
		print('{}'.format(s[i]))
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

import sys

def p3(v):
 return v*v*v

if __name__ == '__main__':
 in = sys.stdin.read()
 print('{}'.format( p3( int(in) ) ) )

Fixed submission:
#!/usr/bin/env python3

import sys

def cube(x):
	if not isinstance(x,int):
		x = int(x)
	return x*x*x

if __name__ == '__main__':
	i = sys.stdin.readline()
	print('{}'.format( cube( int(i) ) ))
Buggy python submission (verdict: Runtime Error):
import numpy as np
L = int(input())
N = int(input())
xs = []
ws = []
for i in range(N):
    x, w = map(int, input().split())
    xs.append(x)
    ws.append(w)
xs = np.array(xs)
ws = np.array(ws)
s = sum(xs * ws)
if(s == 0):
    print(0)
elif(s < 0):
    print(1)
    print(-s, 1)
else:
    print(1)
    print(s, -1)

Fixed submission:
L = int(input())
N = int(input())
s = 0
for i in range(N):
    x, w = map(int, input().split())
    s += x * w
if(s == 0):
    print(0)
elif(s < 0):
    print(1)
    print(1, -s)
else:
    print(1)
    print(-1, s)

Buggy python submission (verdict: Runtime Error):
import numpy as np
L = int(input())
N = int(input())
xs = []
ws = []
for i in range(N):
    x, w = map(int, input().split())
    xs.append(x)
    ws.append(w)
xs = np.array(xs)
ws = np.array(ws)
s = sum(xs * ws)
if(s == 0):
    print(0)
elif(s < 0):
    print(1)
    print(-s, 1)
else:
    print(1)
    print(s, -1)

Fixed submission:
L = int(input())
N = int(input())
s = 0
for i in range(N):
    x, w = map(int, input().split())
    s += x * w
if(s == 0):
    print(0)
elif(s < 0):
    print(1)
    print(1, -s)
else:
    print(1)
    print(-1, s)

Buggy python submission (verdict: Runtime Error):
import numpy as np
L = int(input())
N = int(input())
s = 0
for i in range(N):
    x, w = map(int, input().split())
    s += x * w
if(s == 0):
    print(0)
elif(s < 0):
    print(1)
    print(1, -s)
else:
    print(1)
    print(-1, s)

Fixed submission:
L = int(input())
N = int(input())
s = 0
for i in range(N):
    x, w = map(int, input().split())
    s += x * w
if(s == 0):
    print(0)
elif(s < 0):
    print(1)
    print(1, -s)
else:
    print(1)
    print(-1, s)
Buggy python submission (verdict: Runtime Error):
import sys
import math as mas

def sieve(n):
	p=[True for i in range(n+1)]
	p[0]=p[1]=False
	end=int(n**0.5)
	for i in range(2,end+1):
		if p[i]:
			for j in range(i*i,n+1,i):
				p[j]=False
	return p
	
sosu=sieve(1000010)
for i in sys.stdin:
	print(sum(sosu[t] for t in range(int(i)))

#	a,b=map(int,i.split())
#	print(gcd(a,b),lcm(a,b))

Fixed submission:
import sys
import math as mas

def sieve(n):
	p=[True for i in range(n+1)]
	p[0]=p[1]=False
	end=int(n**0.5)
	for i in range(2,end+1):
		if p[i]:
			for j in range(i*i,n+1,i):
				p[j]=False
	return p
	
sosu=sieve(1000010)
for i in sys.stdin:
	t=int(i)
	if t<2:print(0)
	elif t==2:print(1)
	else:print(1+sum(sosu[t] for t in range(3,int(i)+1,2)))

#	a,b=map(int,i.split())
#	print(gcd(a,b),lcm(a,b))
Buggy python submission (verdict: Runtime Error):
# codoing: utf-8

import math

num = input()

menseki = int(num)**2*math.pi
ensyu = 2*int(num)*math.pi

print(str("{0:6f}".format(menseki)) + " " + str("{0:6f}".format(ensyu)))

Fixed submission:
# cording: utf-8

import math

num = float(input())

print(str(num**2*math.pi) + " " + str(2*num*math.pi))

Buggy python submission (verdict: Runtime Error):
# cording: utf-8

import math

num = input()

menseki = int(num)**2*math.pi
ensyu = 2*int(num)*math.pi

print(str("{0:6f}".format(menseki)) + " " + str("{0:6f}".format(ensyu)))

Fixed submission:
# cording: utf-8

import math

num = float(input())

print(str(num**2*math.pi) + " " + str(2*num*math.pi))
Buggy python submission (verdict: Runtime Error):
import sys
args = sys.argv
a=int(args[1])
b=int(args[2])
print (a*b,a*2+b*2)

Fixed submission:
s = input().split()
a=int(s[0])
b=int(s[1])
print(a*b,a*2+b*2)

Buggy python submission (verdict: Runtime Error):
import sys

a=sys.argv[1]
b=sys.argv[2]

def int(a,b):
    return a*2+b*2,a*b

print(int(a,b))

Fixed submission:
s = input().split()
a=int(s[0])
b=int(s[1])
print(a*b,a*2+b*2)

Buggy python submission (verdict: Runtime Error):
import sys

a=sys.argv[1]
b=sys.argv[2]

print(a*2+b*2,a*b)

Fixed submission:
s = input().split()
a=int(s[0])
b=int(s[1])
print(a*b,a*2+b*2)

Buggy python submission (verdict: Runtime Error):
import sys

a=sys.argv[1]
b=sys.argv[2]

print(a*b,a*2+b*2)

Fixed submission:
s = input().split()
a=int(s[0])
b=int(s[1])
print(a*b,a*2+b*2)

Buggy python submission (verdict: Runtime Error):
import sys
args = sys.argv
a=int(args[1])
b=int(args[2])
print(a,b)

Fixed submission:
s = input().split()
a=int(s[0])
b=int(s[1])
print(a*b,a*2+b*2)

Buggy python submission (verdict: Runtime Error):
import sys
argvs = sys.argv
a=int(argvs[1])
b=int(argvs[2])
print(a*b,a*2+b*2)

Fixed submission:
s = input().split()
a=int(s[0])
b=int(s[1])
print(a*b,a*2+b*2)

Buggy python submission (verdict: Runtime Error):
import sys
argvs = sys.argv
a=int(argvs[1])
b=int(argvs[2])
print(a*b,a*2+b*2)

Fixed submission:
s = input().split()
a=int(s[0])
b=int(s[1])
print(a*b,a*2+b*2)

Buggy python submission (verdict: Runtime Error):
import sys
argvs = sys.argv
a=int(argvs[1])
b=int(argvs[2])
print(a*b,a*2+b*2)

Fixed submission:
s = input().split()
a=int(s[0])
b=int(s[1])
print(a*b,a*2+b*2)
Buggy python submission (verdict: Runtime Error):
s = input.readline()
i=1
while True:
    print("case {0}: {1}".format(i,s))
    i += 1
    s = input()
    if s=="0":
        break

Fixed submission:
a = []
i = 0
while True:
    n = input()
    if n == "0":
        break
    a.append(n)
    i += 1
    print("Case {0}: {1}".format(i,n))

Buggy python submission (verdict: Runtime Error):
with open ('in1.txt', 'r', encoding='utf8') as input:
    s = input.readline()
    i=1
    while True:
        print("case {0}: {1}".format(i,s))
        i += 1
        s = input()
        if s=="0":
            break

Fixed submission:
a = []
i = 0
while True:
    n = input()
    if n == "0":
        break
    a.append(n)
    i += 1
    print("Case {0}: {1}".format(i,n))
Buggy python submission (verdict: Runtime Error):
import sys
from itertools import product

num = 4
l = [0] * (9*num + 1)
for x in map(sum, product(range(10), repeat=num)):
    l[x] += 1

for s in sys.stdin:
    print(l[int(s)])

Fixed submission:
import sys
from collections import defaultdict
from itertools import product

d = defaultdict(int)
for x in product(range(10), repeat=4):
    d[sum(x)] += 1

for s in sys.stdin:
    print(d[int(s)])
Buggy python submission (verdict: Runtime Error):
import math

x1, y1, x2, y2 = list(map(int, input().split()))

exp_dist = abs(x1 - x2)**2 + abs(y1 - y2)**2

print(math.sqrt(exp_dist))

Fixed submission:
import math

x1, y1, x2, y2 = list(map(float, input().split()))

exp_dist = abs(x1 - x2)**2 + abs(y1 - y2)**2

print(math.sqrt(exp_dist))
Buggy python submission (verdict: Runtime Error):
scores = []
while True:
    n = int(input())
    if n == 0:
        break
    l = list(map(int, input().split()))
    scores.append(l)

for score in scores:
    print(pstdev(score))

Fixed submission:
from statistics import pstdev

scores = []
while True:
    n = int(input())
    if n == 0:
        break
    l = list(map(int, input().split()))
    scores.append(l)

for score in scores:
    print(pstdev(score))
Buggy python submission (verdict: Runtime Error):
print(x ** 3)

Fixed submission:
x = int(input())
print(x**3)
Buggy python submission (verdict: Runtime Error):
seconds = int(input())

hour = seconds // 3600
minute = seconds % 3600 // 60
second = seconds % 3600  % 60

print(hour + ':' + minute + ':' + second)

Fixed submission:
seconds = int(input())

hour = str(seconds // 3600)
minute = str(seconds % 3600 // 60)
second = str(seconds % 3600  % 60)

print(hour + ':' + minute + ':' + second)

Buggy python submission (verdict: Runtime Error):
seconds = int(input())

hour = int(seconds // 3600)
minute = int(seconds % 3600 // 60)
second = int(seconds % 3600  % 60)

print(hour + ':' + minute + ':' + second)

Fixed submission:
seconds = int(input())

hour = str(seconds // 3600)
minute = str(seconds % 3600 // 60)
second = str(seconds % 3600  % 60)

print(hour + ':' + minute + ':' + second)
Buggy python submission (verdict: Runtime Error):
a, b, c = list(map(int, input()))
if a < b and b < c:
  print("Yes")
else:
  print("No")

Fixed submission:
a, b, c = list(map(int, input().split()))
if a < b and b < c:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
import math
r = int(input())

print(r * r *math.pi, 2*r*math.pi)

Fixed submission:
import math
r = float(input())

print(r * r *math.pi, 2*r*math.pi)

Buggy python submission (verdict: Runtime Error):
import math
r = int(input())

print(r * r *math.pi, 2*r*math.pi)

Fixed submission:
import math
r = float(input())

print(r * r *math.pi, 2*r*math.pi)
Buggy python submission (verdict: Runtime Error):
pupils = []

while True:
    l = list(map(int, input().split()))
    if sum(l) == -3:
        break
    pupils.append(l)

for pupil in pupils:
    score = pupil[0] + pupil[1]
    if pupil[0] == -1 or  pupil[1] == -1:
        rank = 'F'
    elif score >= 80:
        rank = 'A'
    elif score >= 65:
        rank = 'B'
    elif (score >= 50) or (score >= 30 and pupil[2] >= 50):
        rank = 'C'
    elif score >= 30:
        rank = 'D'
    else:
        rank = 'F'
    print(rank)

Fixed submission:
n,m = list(map(int, input().split()))
a = []
b = []
result = []
row_sum = 0

for i in range(n):
    l = list(map(int, input().split()))
    a.append(l)

for i in range(m):
    b.append(int(input()))

for row in a:
    for i,num in enumerate(row):
        row_sum += num * b[i]
    print(row_sum)
    row_sum = 0
Buggy python submission (verdict: Runtime Error):
pupils = []

while True:
    l = list(map(int, input().split()))
    if sum(l) == -3:
        break
    pupils.append(l)

for pupil in pupils:
    score = pupil[0] + pupil[1]
    if pupil[0] == -1 or  pupil[1] == -1:
        rank = 'F'
    elif score >= 80:
        rank = 'A'
    elif score >= 65:
        rank = 'B'
    elif (score >= 50) or (score >= 30 and r >= 50):
        rank = 'C'
    else:
        rank = 'F'
    print(rank)

Fixed submission:
pupils = []

while True:
    l = list(map(int, input().split()))
    if sum(l) == -3:
        break
    pupils.append(l)

for pupil in pupils:
    score = pupil[0] + pupil[1]
    if pupil[0] == -1 or  pupil[1] == -1:
        rank = 'F'
    elif score >= 80:
        rank = 'A'
    elif score >= 65:
        rank = 'B'
    elif (score >= 50) or (score >= 30 and pupil[2] >= 50):
        rank = 'C'
    elif score >= 30:
        rank = 'D'
    else:
        rank = 'F'
    print(rank)
Buggy python submission (verdict: Runtime Error):
from math import gcd
a, b = [int(tem) for tem in input().split()]
print(gcd(a, b))

Fixed submission:
a, b = [int(tem) for tem in input().split()]

def mak(A, B) :
    while B != 0 :
        q, r = divmod(A, B)
        A = int((A - r) / q)
        B = r
    return A

if a > b : print(mak(a, b))
else     : print(mak(b, a))

Buggy python submission (verdict: Runtime Error):
from math import gcd
a, b = [int(tem) for tem in input().split()]
print(str(gcd(a, b)))

Fixed submission:
a, b = [int(tem) for tem in input().split()]

def mak(A, B) :
    while B != 0 :
        q, r = divmod(A, B)
        A = int((A - r) / q)
        B = r
    return A

if a > b : print(mak(a, b))
else     : print(mak(b, a))

Buggy python submission (verdict: Runtime Error):
from math import gcd
a, b = [int(tem) for tem in input().split()]
A = str(gcd(a, b))
print(A.strip(''))

Fixed submission:
a, b = [int(tem) for tem in input().split()]

def mak(A, B) :
    while B != 0 :
        q, r = divmod(A, B)
        A = int((A - r) / q)
        B = r
    return A

if a > b : print(mak(a, b))
else     : print(mak(b, a))
Buggy python submission (verdict: Time Limit Exceeded):
box = []
for mak in range(int(input())) :
    com = input().split()
    if   com[0] == 'insert'      : box.insert(0, com[1])
    elif com[0] == 'deleteFirst' : del box[0]
    elif com[0] == 'deleteLast'  : del box[-1]
    else : 
        if com[1] in box :
            box.remove(com[1])
print(' '.join(box))

Fixed submission:
from collections import deque
dq = deque()
for mak in range(int(input())) :
    com = input().split()
    if   com[0] == 'insert'      : dq.appendleft(com[1])
    elif com[0] == 'deleteFirst' : dq.popleft()
    elif com[0] == 'deleteLast'  : dq.pop()
    else : 
        if com[1] in dq :
            dq.remove(com[1])
print(' '.join(dq))
Buggy python submission (verdict: Time Limit Exceeded):
c = 0
input()
s = input().split()
input()
t = input().split()
for make in t :
    if make in s : c += 1
print(c)

Fixed submission:
c = 0
input()
s = set(input().split())
input()
t = set(input().split())
print(len(s&t))
Buggy python submission (verdict: Time Limit Exceeded):
dictionary = []
for making in range(int(input())) :
    action = input().split()
    if action[0] == 'insert' : dictionary.append(action[1])
    else : 
        if action[1] in dictionary : print('yes')
        else : print('no')

Fixed submission:
from collections import deque
dictionary = set()
for making in range(int(input())) :
    action = input().split()
    if action[0] == 'insert' : dictionary.add(action[1])
    else : 
        if action[1] in dictionary : print('yes')
        else : print('no')

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
dictionary = deque()
for making in range(int(input())) :
    action = input().split()
    if action[0] == 'insert' : dictionary.append(action[1])
    else : 
        if action[1] in dictionary : print('yes')
        else : print('no')

Fixed submission:
from collections import deque
dictionary = set()
for making in range(int(input())) :
    action = input().split()
    if action[0] == 'insert' : dictionary.add(action[1])
    else : 
        if action[1] in dictionary : print('yes')
        else : print('no')
Buggy python submission (verdict: Runtime Error):
a, b, c, d = [int(temp) for temp in input().split()]
from math import sqrt
print(sqrt((c - a) ** 2 + (d - b) ** 2))

Fixed submission:
a, b, c, d = [float(temp) for temp in input().split()]
from math import sqrt
dis = sqrt((c - a) ** 2 + (d - b) ** 2)
print('%0.5f'%dis)

Buggy python submission (verdict: Runtime Error):
a, b, c, d = [int(temp) for temp in input().split()]
from math import sqrt
dis = sqrt((c - a) ** 2 + (d - b) ** 2)
print('%0.5f'%dis)

Fixed submission:
a, b, c, d = [float(temp) for temp in input().split()]
from math import sqrt
dis = sqrt((c - a) ** 2 + (d - b) ** 2)
print('%0.5f'%dis)
Buggy python submission (verdict: Runtime Error):
a, b = [temp for temp in input().split()]
print(a * b, (a + b) * 2)

Fixed submission:
a, b = [int(temp) for temp in input().split()]
print(a * b, (a + b) * 2)
Buggy python submission (verdict: Runtime Error):
import math
r = int(input())
print('%.6f' % (r * r * math.pi), '%.6f' % (2 * math.pi * r))

Fixed submission:
import math
r = float(input())
print('%.5f' % (r * r * math.pi), '%.5f' % (2 * math.pi * r))
Buggy python submission (verdict: Runtime Error):
sam = input()
ans = input()
for i in range(1,len(ans)) :
    if (ans[:i] in sam) == False : break
if ((ans[i - 1 :]) in sam) == True : print('Yes')
else                             : print('No')

Fixed submission:
s = input() * 2
p = input()
 
if p in (s):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
sam = input()
ans = input()
for i in range(len(ans)) :
    if (ans[:i] in sam) == False : break

print(ans[ :i-1])
print(ans[i-1:])
print(sam[:len(ans[i-1:])])

if   ((ans[i - 1 :]) in sam[:len(ans[i-1:])])== True and len(ans) != 1 : print('Yes')
elif (ans in sam) == True                                      : print('Yes') 
else                                                           : print('No')                                                 : print('No')

Fixed submission:
s = input() * 2
p = input()
 
if p in (s):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
wor = input().upper()

import re
while True :
    tes = input()
    if tes == 'END_OF_TEXT': break
    tes = tes.upper()
    m = re.findall(wor, tes)
    cou += len(m)

print(cou)

Fixed submission:
wor = input().upper()
cou = 0

import re
while True :
    tes = input().split()
    if tes[0] == 'END_OF_TEXT': break
    tes = [temp.upper() for temp in tes]
    cou += tes.count(wor)

print(cou)
Buggy python submission (verdict: Runtime Error):
import math

x1,y1,x2,y2 = map(int, input().split())
dist = math.sqrt( (x2-x1)**2 + (y2-y1)**2 )
print(dist)

Fixed submission:
import math

x1,y1,x2,y2 = map(float, input().split())
dist = math.sqrt( (x2-x1)**2 + (y2-y1)**2 )
print(dist)