Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3

import math
import sys


def dist():
    coordinates = [int(num) for num in sys.stdin.readline().split()]
    return math.hypot(coordinates[2]-coordinates[0],
                      coordinates[3]-coordinates[1])


def main():
    print(dist())


if __name__ == '__main__':
    main()

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

import math
import sys


def dist():
    coordinates = [float(num) for num in sys.stdin.readline().split()]
    return math.hypot(coordinates[2]-coordinates[0],
                      coordinates[3]-coordinates[1])


def main():
    print(dist())


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

def rect(a, b):
    return str(a*b) + ' ' + str((a+b)*2)

def main():
    print(rect(int(input()), int(input())))

if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

def string_two_numbers_spliter():
    a, b = [int(i) for i in input().split()]
    return a, b


def main():
    a, b = string_two_numbers_spliter()
    print(str(a*b) + ' ' + str((a+b) * 2))


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
print(str(a*b) + ' ' str((a+b)*2))

Fixed submission:
#!usr/bin/env python3

def string_two_numbers_spliter():
    a, b = [int(i) for i in input().split()]
    return a, b


def main():
    a, b = string_two_numbers_spliter()
    print(str(a*b) + ' ' + str((a+b) * 2))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

def string_number_spliter():
    a, b = [int(i) for i in input().split()]
    return a, b


def main():
    a, b = string_number_spliter()

    if (a < b):
        print(str(a) + " < " str(b))
    elif (a < b):
        print(str(a) + " > " str(b))
    else:
        print(str(a) + " == " str(b))


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

def string_two_numbers_spliter():
    a, b = [int(i) for i in input().split()]
    return a, b


def main():
    a, b = string_two_numbers_spliter()

    if a < b:
        print('a < b')
    elif a > b:
        print('a > b')
    else:
        print('a == b')


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

def string_two_numbers_spliter():
    a, b = [int(i) for i in input('Enter two numbers concatenated ' +
    'by a single space between two numbers, e.g. \'1 2\': ').split()]
    return a, b


def main():
    a, b = string_two_numbers_spliter()

    if a < b:
        print('a < b')
    elif a > b:
        print('a > b')
    else:
        print('a == b')


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

def string_two_numbers_spliter():
    a, b = [int(i) for i in input().split()]
    return a, b


def main():
    a, b = string_two_numbers_spliter()

    if a < b:
        print('a < b')
    elif a > b:
        print('a > b')
    else:
        print('a == b')


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

def string_two_numbers_spliter():
    a, b = [int(i) for i in input().split()]
    return a, b


def main():
    a, b = string_two_numbers_spliter()

    if a < b:
        print('a < b')
    elif a > b:
        print('a > b')
    else:
        print('a == b')


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

def string_two_numbers_spliter():
    a, b = [int(i) for i in input().split()]
    return a, b


def main():
    a, b = string_two_numbers_spliter()

    if a < b:
        print('a < b')
    elif a > b:
        print('a > b')
    else:
        print('a == b')


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

def string_five_numbers_spliter():
    """Split a given space-separated five numbers in a string into integers

    Return five integer values from a given space-separated five integers in a string.

    Returns:
        Five integer values; namely, w, h, x, y and r
    """
    w, h, x, y, r = [int(i) for i in input().split()]
    return w, h, x, y, r


def main():
    # Given that there are a rectangle and a circle.
    # Let w, h, x, y and r be such that:
    # w = width of the rectangle
    # h = height of thek rectangle
    # x = x coordinate for the centre of the circle
    # y = y coordinate for the centre of the circle
    # r = diameter of the circle
    w, h, x, y, r = string_five_numbers_spliter()

    if not (x + r < 0) and not (y + r < 0) and
        not (x + r > w) and not (y + r > h):
        print('yes')
    else:
        print('no')

Fixed submission:
#!usr/bin/env python3

def string_five_numbers_spliter():
    """Split a given space-separated five numbers in a string into integers

    Return five integer values from a given space-separated five integers in a string.

    Returns:
        Five integer values; namely, w, h, x, y and r
    """
    w, h, x, y, r = [int(i) for i in input().split()]
    return w, h, x, y, r


def main():
    # Given that there are a rectangle and a circle.
    # Let w, h, x, y and r be such that:
    # w = width of the rectangle
    # h = height of thek rectangle
    # x = x coordinate for the centre of the circle
    # y = y coordinate for the centre of the circle
    # r = diameter of the circle
    w, h, x, y, r = string_five_numbers_spliter()

    if (not (x < 0) and not (y < 0) and
        not (x + r < 0) and not (y + r < 0) and
        not (x + r > w) and not (y + r > h)):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

import sys
from math import pi


def area_of_circle(radius):
    return pi * radius**2


def circumference_of_circle(radius):
    return 2*pi*radius


def main():
    r = int(sys.stdin.readline())
    print(r)
    print(type(r))
    print('%f %f' % (area_of_circle(r), circumference_of_circle(r)))


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

import sys
from math import pi


def area_of_circle(radius):
    return pi * radius**2


def circumference_of_circle(radius):
    return 2*pi*radius


def main():
    # NOTE Tried sys.stdin.readline() instead of input()
    r = float(sys.stdin.readline())
    print('%f %f' % (area_of_circle(r), circumference_of_circle(r)))


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

import sys
from math import pi


def area_of_circle(radius):
    return pi * radius**2


def circumference_of_circle(radius):
    return 2*pi*radius


def main():
    r = (sys.stdin.readline())
    print('%f %f' % (area_of_circle(r), circumference_of_circle(r)))


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

import sys
from math import pi


def area_of_circle(radius):
    return pi * radius**2


def circumference_of_circle(radius):
    return 2*pi*radius


def main():
    # NOTE Tried sys.stdin.readline() instead of input()
    r = float(sys.stdin.readline())
    print('%f %f' % (area_of_circle(r), circumference_of_circle(r)))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

import sys


def string_to_list_spliter():
    lst = [int(i) for i in sys.stdin.readline().split()]
    return lst


def main():
    lst = string_to_list_spliter()
    print(min(lst), max(lst), sum())


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

import sys


def string_to_list_spliter():
    lst = [int(i) for i in sys.stdin.readline().split()]
    return lst


def main():
    # XXX: N????????´??°??????????????????????????????AOJ?????£???????????????
    n = sys.stdin.readline()
    lst = string_to_list_spliter()
    print(min(lst), max(lst), sum(lst))


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

import sys


def string_to_list_spliter():
    sys.stdin.readline()
    lst = [int(i) for i in sys.stdin.readline().split()]
    return lst


def main():
    lst = string_to_list_spliter()
    print(min(lst), max(lst), sum())


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

import sys


def string_to_list_spliter():
    lst = [int(i) for i in sys.stdin.readline().split()]
    return lst


def main():
    # XXX: N????????´??°??????????????????????????????AOJ?????£???????????????
    n = sys.stdin.readline()
    lst = string_to_list_spliter()
    print(min(lst), max(lst), sum(lst))


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

import sys


def string_to_list_spliter():
    n = sys.stdin.readline()
    lst = [int(i) for i in sys.stdin.readline().split()]
    return lst


def main():
    lst = string_to_list_spliter()
    print(min(lst), max(lst), sum())


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

import sys


def string_to_list_spliter():
    lst = [int(i) for i in sys.stdin.readline().split()]
    return lst


def main():
    # XXX: N????????´??°??????????????????????????????AOJ?????£???????????????
    n = sys.stdin.readline()
    lst = string_to_list_spliter()
    print(min(lst), max(lst), sum(lst))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

import sys


def main():
    m, n = [int(col_row) for col_row in sys.stdin.readline().split()]
    matrix = [[0 for col in range(m)] for row in range(n)]
    vector = [0 for col in range(m)]

    for row in range(n):
        lst = [int(element) for element in sys.stdin.readline().split()]
        for col in range(m):
            matrix[row][col] += lst[col]

    for row in range(m):
        lst = [int(element) for element in sys.stdin.readline().split()]
        vector[row] += lst[0]

    for row in range(n):
        sum_of_row = 0
        for col in range(m):
            sum_of_row += matrix[row][col] * vector[col]
        # res.append(sum_of_row)
        print(sum_of_row)


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

import sys


def init_matrix_vector():
    m, n = [int(col_row) for col_row in sys.stdin.readline().split()]
    matrix = [[0 for col in range(n)] for row in range(m)]
    vector = [0 for row in range(n)]

    for row in range(m):
        lst = [int(element) for element in sys.stdin.readline().split()]
        for col in range(n):
            matrix[row][col] += lst[col]

    for row in range(n):
        lst = [int(element) for element in sys.stdin.readline().split()]
        vector[row] += lst[0]

    return matrix, vector


def print_matrix_vector_multiplication_result(matrix, vector):
    for row in range(len(matrix)):
        sum_of_row = 0
        for col in range(len(vector)):
            sum_of_row += matrix[row][col] * vector[col]
        print(sum_of_row)


def main():
    matrix, vector = init_matrix_vector()
    print_matrix_vector_multiplication_result(matrix, vector)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

import sys


def main():
    while True:
        # m, f, r = [int(score) for score in sys.stdin.readline().split()]
        m, f, r = [int(score) for score in lines.split()]
        if m == f == r == -1:
            break
        if m == -1 or f == -1:
            print('F')
        elif m+f >= 80:
            print('A')
        elif 80 > m+f >= 65:
            print('B')
        elif 65 > m+f >= 50:
            print('C')
        elif 50 > m+f >= 30:
            if r >= 50:
                print('C')
            else:
                print('D')
        elif m+f < 30:
            print('F')


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

import sys


def main():
    while True:
        m, f, r = [int(score) for score in sys.stdin.readline().split()]

        if m == f == r == -1:
            break
        if m == -1 or f == -1 or m+f < 30:
            print('F')
        elif m+f >= 80:
            print('A')
        elif 80 > m+f >= 65:
            print('B')
        elif 65 > m+f >= 50:
            print('C')
        elif 50 > m+f >= 30:
            if r >= 50:
                print('C')
            else:
                print('D')


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/local/env python3

import sys
from itertools import combinations


def find_all_subsets_of_target_sum(numbers, target_sum):
    subsets = []
    for x in range(len(numbers)):
        subsets.extend([
                combo for combo in combinations(numbers, x)
                if sum(combo) == target_sum
            ]
        )
    return subsets


def find_num_of_subset_with_x_elements(upper_bound, target_sum, x_elements):
    numbers = [int(number) for number in range(1, upper_bound+1)]
    subsets = find_all_subsets_of_target_sum(numbers, target_sum)
    subset_count = 0
    for subset in subsets:
        if len(subset) == x_elements:
            subset_count += 1
    return subset_count


def program_runner():
    while True:
        n, x = map(int, sys.stdin.readline().split())
        if n == x == 0:
            break
        print(find_num_of_subset_with_x_elements(n, x, 3))


def main():
    program_runner()


if __name__ == '__main__':
    main()

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

import sys


def main():
    while True:
        count = 0
        n, r = map(int, sys.stdin.readline().split())
        if n == r == 0:
            break
        for n1 in range(1, n-1):
            for n2 in range(n1+1, n):
                for n3 in range(n2+1, n+1):
                    if n1 + n2 + n3 == r:
                        count += 1
        print(count)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

import sys


def main():
    text = str()
    alphabets = 'abcdefghijklmnopqrstuvwxyz'

    for line in sys.stdin():
        text += line.lower()

    for alphabet in alphabets:
        print('%s : %d' % (alphabet, text.count(alphabet)))


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

import sys


def main():
    text = str()
    alphabets = 'abcdefghijklmnopqrstuvwxyz'

    for line in sys.stdin:
        text += line.lower()

    for alphabet in alphabets:
        print('%s : %d' % (alphabet, text.count(alphabet)))


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!usr/bin/env python3

import sys


def main():
    letters = {
                'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, 'h': 0,
                'i': 0, 'j': 0, 'k': 0, 'l': 0, 'm': 0, 'n': 0, 'o': 0, 'p': 0,
                'q': 0, 'r': 0, 's': 0, 't': 0, 'u': 0, 'v': 0, 'w': 0, 'x': 0,
                'y': 0, 'z': 0
              }

    passage = sys.stdin

    for letter in passage.lower():
        if letter in letters:
            letters[letter] += 1

    for letter, count in letters.items():
        print('%s : %d' % (letter, count))


if __name__ == '__main__':
    main()

Fixed submission:
#!usr/bin/env python3

import sys


def main():
    text = str()
    alphabets = 'abcdefghijklmnopqrstuvwxyz'

    for line in sys.stdin:
        text += line.lower()

    for alphabet in alphabets:
        print('%s : %d' % (alphabet, text.count(alphabet)))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
class Dice2():
    def front(self,up,front,dice):
        #index == 5
        if (up==dice[2] and front==dice[1])
        or(up==dice[1] and front==dice[3])
        or(up==dice[3] and front==dice[4])
        or(up==dice[4] and front==dice[2]):
            return dice[5]
        #index == 4
        elif (up==dice[0] and front==dice[2])
        or(up==dice[2] and front==dice[5])
        or(up==dice[5] and front==dice[3])
        or(up==dice[3] and front==dice[0]):
            return dice[4]
        #index == 3
        elif (front==dice[5] and up==dice[4])
        or(front==dice[4] and up==dice[0])
        or(front==dice[0] and up==dice[1])
        or(front==dice[1] and up==dice[5]):
            return dice[3]
        #index == 2
        elif (up==dice[5] and front==dice[4])
        or(up==dice[4] and front==dice[0])
        or(up==dice[0] and front==dice[1])
        or(up==dice[1] and front==dice[5]):
            return dice[2]
        #index == 1
        elif (front==dice[0] and up==dice[2])
        or(front==dice[2] and up==dice[5])
        or(front==dice[5] and up==dice[3])
        or(front==dice[3] and up==dice[0]):
            return dice[1]
        #index == 0
        else:
            return dice[0]

dice = [int(i) for i in input().split()]
p = int(input())
dc2 = Dice2()
ans = []
for i in range(p):
    up,front = map(int,input().split())
    ans.append(dc2.front(up,front,dice))
for i in range(p):
    print(ans[i])


Fixed submission:
class Dice2():
    def front(self,up,front,dice):
        #index == 5
        if(up==dice[2] and front==dice[1])or(up==dice[1] and front==dice[3])or(up==dice[3] and front==dice[4])or(up==dice[4] and front==dice[2]):
            return dice[5]
        #index == 4
        elif(up==dice[0] and front==dice[2])or(up==dice[2] and front==dice[5])or(up==dice[5] and front==dice[3])or(up==dice[3] and front==dice[0]):
            return dice[4]
        #index == 3
        elif(front==dice[5] and up==dice[4])or(front==dice[4] and up==dice[0])or(front==dice[0] and up==dice[1])or(front==dice[1] and up==dice[5]):
            return dice[3]
        #index == 2
        elif(up==dice[5] and front==dice[4])or(up==dice[4] and front==dice[0])or(up==dice[0] and front==dice[1])or(up==dice[1] and front==dice[5]):
            return dice[2]
        #index == 1
        elif(front==dice[0] and up==dice[2])or(front==dice[2] and up==dice[5])or(front==dice[5] and up==dice[3])or(front==dice[3] and up==dice[0]):
            return dice[1]
        #index == 0
        else:
            return dice[0]

dice = [int(i) for i in input().split()]
p = int(input())
dc2 = Dice2()
ans = []
for i in range(p):
    up,front = map(int,input().split())
    ans.append(dc2.front(up,front,dice))
for i in range(p):
    print(ans[i])
Buggy python submission (verdict: Runtime Error):
x = []
while(1):
    inp = int(input())
    if inp !=0:
        x.append(inp)
    else:
        x.append(inp)
        break
print(x)
j=0
while(1):
    if(x[j]!=0):
        print("Case {} : {}".format(i,x[j]))
        j+=1
    else:
        break


Fixed submission:
x = []
while(1):
    inp = int(input())
    if inp !=0:
        x.append(inp)
    else:
        x.append(inp)
        break

j=0
while(1):
    if(x[j]!=0):
        print("Case {}: {}".format(j+1,x[j]))
        j+=1
    else:
        break
Buggy python submission (verdict: Runtime Error):
import numpy as np
r = int(input())
print("{} {}".format((np.pi)*r**2 , 2*np.pi*r))


Fixed submission:
pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(pi*r**2 , 2*pi*r))

Buggy python submission (verdict: Runtime Error):
pi = 3.1415926535
r = int(input())
print("{0:.6f} {1:.6f}".format(pi*r**2 , 2*pi*r))


Fixed submission:
pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(pi*r**2 , 2*pi*r))

Buggy python submission (verdict: Runtime Error):
pi = 3.1415926535
r = int(input())
print("{0:.6f} {1:.6f}".format(pi*r**2 , 2*pi*r))


Fixed submission:
pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(pi*r**2 , 2*pi*r))

Buggy python submission (verdict: Runtime Error):
import numpy as np
r = float(input())
print("{0:.8f} {1:.6f}".format(np.pi*r*r , 2*np.pi*r))


Fixed submission:
pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(pi*r**2 , 2*pi*r))

Buggy python submission (verdict: Runtime Error):
pi = 3.141592653589793
r = float(input())
print("{0:.8f} {1:.6f}".format(np.pi*r*r , 2*np.pi*r))


Fixed submission:
pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(pi*r**2 , 2*pi*r))

Buggy python submission (verdict: Runtime Error):
pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(np.pi*r*r , 2*np.pi*r))


Fixed submission:
pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(pi*r**2 , 2*pi*r))

Buggy python submission (verdict: Runtime Error):
pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(np.pi*r**2 , 2*np.pi*r))


Fixed submission:
pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(pi*r**2 , 2*pi*r))

Buggy python submission (verdict: Runtime Error):
pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(np.pi*r**2 , 2*np.pi*r))


Fixed submission:
pi = 3.141592653589793
r = float(input())
print("{0:.6f} {1:.6f}".format(pi*r**2 , 2*pi*r))
Buggy python submission (verdict: Runtime Error):
n = int(input())
num = [int(i) for i in input().split()]
print("{} {} {}".format(mix(num),max(num),sum(num))



Fixed submission:
n = int(input())
s=0
num = [int(i) for i in input().split()]
mx = num[0]
mn = num[0]
for i in range(n):
        s = s+num[i]
        if(mx < num[i]):
            mx = num[i]
        if(mn > num[i]):
            mn = num[i]
print("{} {} {}".format(mn,mx,s))

Buggy python submission (verdict: Runtime Error):
n = int(input())
num = [int(i) for i in input().split()]
print("{} {} {}".format(mix(num),max(num),sum(num))



Fixed submission:
n = int(input())
s=0
num = [int(i) for i in input().split()]
mx = num[0]
mn = num[0]
for i in range(n):
        s = s+num[i]
        if(mx < num[i]):
            mx = num[i]
        if(mn > num[i]):
            mn = num[i]
print("{} {} {}".format(mn,mx,s))
Buggy python submission (verdict: Runtime Error):
n = int(input())
num_list = [i for i in range(1,n+1)]
num2_list = [i for i in num_list if i%3==0]#3で割り切れる値
list_str = [s for s in map(str,list(d)) if '3' in s]#3が含まれる場合
list_in = list(map(int,list_str))#list変換
list_uniq = list(set(num2_list+list_in))
list_uniq.sort()
print(' '+' '.join(str(i) for i in list_uniq))


Fixed submission:
n = int(input())
num_list = [i for i in range(1,n+1)]
num2_list = [i for i in num_list if i%3==0]#3で割り切れる値
list_str = [s for s in map(str,num_list) if '3' in s]#3が含まれる場合
list_in = list(map(int,list_str))#list変換
list_uniq = list(set(num2_list+list_in))
list_uniq.sort()
print(' '+' '.join(str(i) for i in list_uniq))