Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import sys


def prime(n):
    s = [i for i in range(2,n+1)]
    p = []
    while s[0] < n**0.5:
        p.append(s[0])
        for ss in s:
            if ss % p[-1] == 0:
                s.remove(ss)
    p.extend(s)
    return p

def main():
    inp = [int(n) for n in sys.stdin]
    for n in inp:
        n_pn = len(prime(n))
        print(n_pn)

if __name__ == '__main__':
    main()

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

import sys


def eratosthenes_sieve(n):
    table = [0]*(n + 1)
    prime_list = []
    
    for i in range(2, n + 1):
        if table[i] == 0:
            prime_list.append(i)
            for j in range(i + i, n + 1, i):
                table[j] = 1
    return prime_list


def prime(n):
    return eratosthenes_sieve(n)

def main():
    inp = [int(n) for n in sys.stdin]
    for n in inp:
        n_pn = len(prime(n))
        print(n_pn)

if __name__ == '__main__':
    main()

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

import sys


def prime(n):
    s = [i for i in range(2,n+1)]
    p = []
    while s[0] < n**0.5:
        p.append(s[0])
        for ss in s:
            if ss % p[-1] == 0:
                s.remove(ss)
    p.extend(s)
    return p

def main():
    inp = [int(n) for n in sys.stdin]
    for n in inp:
        n_pn = len(prime(n))
        print(n_pn)

if __name__ == '__main__':
    main()

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

import sys


def eratosthenes_sieve(n):
    table = [0]*(n + 1)
    prime_list = []
    
    for i in range(2, n + 1):
        if table[i] == 0:
            prime_list.append(i)
            for j in range(i + i, n + 1, i):
                table[j] = 1
    return prime_list


def prime(n):
    return eratosthenes_sieve(n)

def main():
    inp = [int(n) for n in sys.stdin]
    for n in inp:
        n_pn = len(prime(n))
        print(n_pn)

if __name__ == '__main__':
    main()

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

import sys


def prime(n):
    s = [i for i in range(2,n+1)]
    p = []
    while s[0] < n**0.5:
        p.append(s[0])
        for ss in s:
            if ss % p[-1] == 0:
                s.remove(ss)
    p.extend(s)
    return p

def main():
    inp = [int(n) for n in sys.stdin]
    for n in inp:
        n_pn = len(prime(n))
        print n_pn

if __name__ == '__main__':
    main()

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

import sys


def eratosthenes_sieve(n):
    table = [0]*(n + 1)
    prime_list = []
    
    for i in range(2, n + 1):
        if table[i] == 0:
            prime_list.append(i)
            for j in range(i + i, n + 1, i):
                table[j] = 1
    return prime_list


def prime(n):
    return eratosthenes_sieve(n)

def main():
    inp = [int(n) for n in sys.stdin]
    for n in inp:
        n_pn = len(prime(n))
        print(n_pn)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
 print(input()[::-1])

Fixed submission:
print(input()[::-1])
Buggy python submission (verdict: Runtime Error):
while True:
    try:
        n = int(input())
        c = 0
        for i in range(1,10):
            for j in range(1,10):
                for k in range(1,10):
                    for l in range(1,10):
                        if i+j+k+l == n : c+=1
        print(c)
    exception:
        break

Fixed submission:
while True:
    try:
        n = int(input())
        c = 0
        for i in range(10):
            for j in range(10):
                for k in range(10):
                    for l in range(10):
                        if i+j+k+l == n : c+=1
        print(c)
    except:
        break
Buggy python submission (verdict: Time Limit Exceeded):
def erato(n):
    s = list(range(n+1))
    s[1] = 0
    for e in s:
        if e:
            for i in range(e*2, n+1, e):
                s[i] = 0
    return s
while True:
    try:
        n = int(input())
        print(len(list(filter(lambda x:x, erato(n)))))
    except:
        break

Fixed submission:
def erato(n):
    s = list(range(n+1))
    s[1] = 0
    for e in s:
        if e:
            for i in range(e*2, n+1, e):
                s[i] = 0
    return s
e = erato(1000000)
while True:
    try:
        n = int(input())
        print(len(list(filter(lambda x:x, e[:n+1]))))
    except:
        break
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
x, y = [list(map(int, input().split())) for _ in range(2)]
for p in (1,2,3,math.inf):
    if p == math.inf:
        print(max(abs(x-y) for x, y in zip(x,y)))
    else:
        print(math.pow(sum(abs(x-y) ** p for x, y in zip(x,y)), 1.0 / p))

Fixed submission:
import math
n = int(input())
x, y = [list(map(int, input().split())) for _ in range(2)]
for p in (1,2,3,0):
    if p == 0:
        print(max(abs(x-y) for x, y in zip(x,y)))
    else:
        print(math.pow(sum(abs(x-y) ** p for x, y in zip(x,y)), 1.0 / p))
Buggy python submission (verdict: Runtime Error):
import sys
class Dice:
    def __init__(self, f):
        self.f = f[:]

    def to_top(self, index):
        if index == 1:
            self.roll('N')
        elif index == 2:
            self.roll('W')
        elif index == 3:
            self.roll('E')
        elif index == 4:
            self.roll('S')
        elif index == 5:
            self.roll('NN')
        return self

    def side_roll(self):
        t  = self.f[1]
        self.f[1] = self.f[2]
        self.f[2] = self.f[4]
        self.f[4] = self.f[3]
        self.f[3] = t
        return self

    def all_face(self):
        faces = []
        for i in range(0,6):
            t = Dice(self.f[:])
            faces.append(t.to_top(i).f)
            for j in range(3):
                faces.append(t.side_roll().f)
        return faces

d1, d2 = (Dice(list(input().split())) for _ in range(2))
fs = d1.all_face()
print('Yes' if d2.f in fs else 'No')

Fixed submission:
import sys
class Dice:
    def __init__(self, f):
        self.f = f[:]

    def roll(self, s):
        for f in s:
            n = self.f[:]
            if f == 'E':
                t = n[0]
                n[0] = n[3]
                n[3] = n[5]
                n[5] = n[2]
                n[2] = t
            elif f == 'W':
                t = n[0]
                n[0] = n[2]
                n[2] = n[5]
                n[5] = n[3]
                n[3] = t
            elif f == 'N':
                t = n[0]
                n[0] = n[1]
                n[1] = n[5]
                n[5] = n[4]
                n[4] = t
            else:
                t = n[0]
                n[0] = n[4]
                n[4] = n[5]
                n[5] = n[1]
                n[1] = t
            self.f = n

    def to_top(self, index):
        if index == 1:
            self.roll('N')
        elif index == 2:
            self.roll('W')
        elif index == 3:
            self.roll('E')
        elif index == 4:
            self.roll('S')
        elif index == 5:
            self.roll('NN')
        return self

    def side_roll(self):
        t  = self.f[1]
        self.f[1] = self.f[2]
        self.f[2] = self.f[4]
        self.f[4] = self.f[3]
        self.f[3] = t
        return self

    def all_face(self):
        faces = []
        for i in range(0,6):
            t = Dice(self.f[:])
            faces.append(t.to_top(i).f[:])
            for j in range(3):
                faces.append(t.side_roll().f[:])
        return faces

d1, d2 = (Dice(list(input().split())) for _ in range(2))
fs = d1.all_face()
print('Yes' if d2.f in fs else 'No')
Buggy python submission (verdict: Runtime Error):
a, b = [int(x) for x in input().split(' ')]
print('{0} {1}').format(a*b, (a+b)*2)

Fixed submission:
a, b = [int(x) for x in input().split(' ')]
print('{0} {1}'.format(a*b, (a+b)*2))
Buggy python submission (verdict: Runtime Error):
while True:
    i = int(input())
    break if i == 0 else print('Case i: {0}'.format(i))
    

Fixed submission:
i = 0
while True:
    i += 1
    x = int(input())
    if x == 0:
        break
    else:
        print('Case {0}: {1}'.format(i, x))

Buggy python submission (verdict: Runtime Error):
i = 0
while True:
    i++
    x = int(input())
    if x == 0:
        break
    else:
        print('Case {0}: {1}'.format(i, x)

Fixed submission:
i = 0
while True:
    i += 1
    x = int(input())
    if x == 0:
        break
    else:
        print('Case {0}: {1}'.format(i, x))

Buggy python submission (verdict: Runtime Error):
i = 0
while True:
    i += 1
    x = int(input())
    if x == 0:
        break
    else:
        print('Case {0}: {1}'.format(i, x)

Fixed submission:
i = 0
while True:
    i += 1
    x = int(input())
    if x == 0:
        break
    else:
        print('Case {0}: {1}'.format(i, x))

Buggy python submission (verdict: Runtime Error):
i = 0
while True:
    i++
    x = int(input())
    if x == 0:
        break
    else:
        print('Case {0}: {1}'.format(i, x))

Fixed submission:
i = 0
while True:
    i += 1
    x = int(input())
    if x == 0:
        break
    else:
        print('Case {0}: {1}'.format(i, x))
Buggy python submission (verdict: Runtime Error):
a,b = [int(e) for e in input().split()]
print('{0} {1} {:f}'.format(a//b, a%b, a/b))

Fixed submission:
a, b = [int(x) for x in input().split()]
print('{0} {1} {2:f}'.format(a//b, a%b, a/b))
Buggy python submission (verdict: Runtime Error):
while True:
    H, W = [int(x) for x in input().split()]
    if H == W == 0:
        break
    for i in range(H):
        if i == 0 or i == H - 1:
            print('#'*W)
        else:
            print(''.join(*['#' if c == 0 or c == W - 1 else '.' for c in range(W)]))
    print()

Fixed submission:
while True:
    H, W = [int(x) for x in input().split()]
    if H == W == 0:
        break
    for i in range(H):
        if i == 0 or i == H - 1:
            print('#'*W)
        else:
            print(''.join(['#' if c == 0 or c == W - 1 else '.' for c in range(W)]))
    print()
Buggy python submission (verdict: Runtime Error):
r, c = map(int, input().split())
a = [0]*(c+1)
for _ in range(r):
    v = list(map(int, input().split()))
    s = 0
    for i, e in enumerate(v):
        s+=e
        a[i]+=e
    print(*v, s)
    a[-1]+=s
print(*a)

Fixed submission:
r, c = map(int, input().split())
a = [0]*(c+1)
for _ in range(r):
    v = list(map(int, input().split()))
    s = 0
    for i, e in enumerate(v):
        s+=e
        a[i]+=e
    v.append(s)
    print(*v)
    a[-1]+=s
print(*a)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i input().split()]

for i in range(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(" ".join(map(int, a)))

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]

for i in range(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(" ".join(map(str, a)))
Buggy python submission (verdict: Time Limit Exceeded):
D = 1000000007
m, n = [int(i) for i in input().split()]
p = 1 
for i in range(n):
  p *= m

print(p % D)

Fixed submission:
D = 1000000007
m, n = [int(i) for i in input().split()]
print(pow(m,n,D))
Buggy python submission (verdict: Runtime Error):
 for i in range(10):
      print str(i) + 'x' + str(i)+'='+str(i*i)

Fixed submission:
for i in range(1,10):
        for j in range(1,10):
                print(str(i) + 'x' + str(j)+'='+str(i*j))
Buggy python submission (verdict: Runtime Error):
while True:
	input = raw_input()
	splited = input.split()
	num = int(splited[0])+int(splited[1])
	print len(str(num))

Fixed submission:
while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	input = raw_input()
	splited = input.split()
	num = int(splited[0])+int(splited[1])
	print len(str(num))

Fixed submission:
while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	try:
		input = raw_input()
		splited = input.split()
		num = int(splited[0])+int(splited[1])
		print len(str(num))
	except EOFerror:
		break

Fixed submission:
while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	try:
		splited = raw_input().split()
		num = int(splited[0])+int(splited[1])
		print len(str(num))
	except EOFerror:
		break

Fixed submission:
while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	try:
		a,b = map(int raw_input().split())
		print len(str(a+b))
	except EOFerror:
		break

Fixed submission:
while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFerror:
		break

Fixed submission:
while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break

Buggy python submission (verdict: Runtime Error):
while True:
	try:
		a,b = map(int, raw_input().split())
		print int(len(str(a+b)))
	except EOFerror:
		break

Fixed submission:
while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break
Buggy python submission (verdict: Runtime Error):
x1, y1, x2, y2 = map(int, input().split())

X = (x2 - x1)**2
Y = (y2 - y1)**2

distance = (X + Y)**(1/2)
print("%.8f" % (float(distance)))

Fixed submission:
x1, y1, x2, y2 = map(float, input().split())

X = (x2 - x1)**2
Y = (y2 - y1)**2

distance = (X + Y)**(1/2)
print("%.8f" % (float(distance)))
Buggy python submission (verdict: Runtime Error):
r = int(input())

s = r * r * 3.14159
l = r * 2 * 3.14159

print(s,l)  

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

s = r * r * math.pi
l = r * 2 * math.pi

print("%.6f %.6f" % (s,l))

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

s = r * r * 3.14159
l = r * 2 * 3.14159

print(s,l)  

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

s = r * r * math.pi
l = r * 2 * math.pi

print("%.6f %.6f" % (s,l))

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

s = r * r * 3.14159
l = r * 2 * 3.14159

print("%.5f %.5f" % (s,l)) 

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

s = r * r * math.pi
l = r * 2 * math.pi

print("%.6f %.6f" % (s,l))

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

s = r * r * math.pi
l = r * 2 * math.pi

print("%.5f %.5f" % (s,l)) 

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

s = r * r * math.pi
l = r * 2 * math.pi

print("%.6f %.6f" % (s,l))

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

s = r * r * math.pi
l = r * 2 * math.pi

print("%.6f %.6f" % (s,l))  

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

s = r * r * math.pi
l = r * 2 * math.pi

print("%.6f %.6f" % (s,l))
Buggy python submission (verdict: Runtime Error):
n=int(input())
l = []
for i in range(n):
    l.append(input())
    
min_l = min(map(int,l))
max_l = max(map(int,l))
sum_l = sum(map(int,l))

print("{0} {1} {2}".format(min_l, max_l, sum_l))

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
print(min(a),max(a),sum(a))

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

print(min(a),max(a),sum(a))

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
print(min(a),max(a),sum(a))

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

print('%s %s %s' % (min(a),max(a),sum(a)))

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
print(min(a),max(a),sum(a))

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]
print(min(a),max(a),sum(a))

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
print(min(a),max(a),sum(a))
Buggy python submission (verdict: Runtime Error):
while True:
    H = int(input())
    W = int(input())
    if H == 0 and W == 0:
        break
    else:
        for i in range(H):
            print("")
            for j in range(W):
                print("#",end="")
    print("")

Fixed submission:
while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    else:
        for i in range(H):
            print("#" * W)
        print()
Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n, x = map(int, input().split())
    if n == x == 0:
        break
    count = 0
    for i in range(1,n+1):
        for j in range(1,n+1):
            for k in range(1,n+1):
                if (i != j and i != k and j != k and i < j < k):
                    if i+j+k == x:
                        count += 1
    print(count)

Fixed submission:
while True:
    n, x = map(int, input().split())
    if n == x == 0:
        break
    count = 0
    for i in range(1,n+1):
        for j in range(1,n+1):
            for k in range(1,n+1):
                if (i < j < k):
                    if i+j+k == x:
                        count += 1
    print(count)

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n, x = map(int, input().split())
    if n == x == 0:
        break
    count = 0
    for i in range(1,n+1):
        for j in range(1,n+1):
            for k in range(1,n+1):
                if (i != j and i != k and j != k and i < j < k):
                    if i+j+k == x:
                        count += 1
    print(count)

Fixed submission:
while True:
    n, x = map(int, input().split())
    if n == x == 0:
        break
    count = 0
    for i in range(1,n+1):
        for j in range(1,n+1):
            for k in range(1,n+1):
                if (i < j < k):
                    if i+j+k == x:
                        count += 1
    print(count)
Buggy python submission (verdict: Runtime Error):
while True:
    a = input()
    if a == "0":
        break
    print(sum([int(b) for b in list(a)])

Fixed submission:
while True:
    number = input()
    if(number == "0"): 
        break
    print(sum([int(a) for a in list(number)]))
Buggy python submission (verdict: Runtime Error):
for i in range(1,10):
    for j in range(1,10):
        print(i,'X',j,'=',i*j,sep='')

Fixed submission:
for i in range(1,10):
    for j in range(1,10):
        print('{l}x{r}={result}'.format(l=i,r=j,result=i*j))
Buggy python submission (verdict: Runtime Error):
height_list = [int(input()) for i in range(10)]
for i in range(1,4): print sorted(height_list)[-i]

Fixed submission:
import sys 
height_li = []
for i in range(10):
    height_li.append(int(input()))
for i in range(3):
    print(sorted(height_li,reverse=True)[i])
Buggy python submission (verdict: Time Limit Exceeded):
import sys
for line in sys.stdin:
    count = 0
    n = int(line)
    if n>=2: count += 1
    for i in range(3,n+1,2):
        if pow(2,i-1,i)==1: count += 1
    print(count)

Fixed submission:
import sys
for line in sys.stdin:
    n = int(line)
    flag = [True]*(n+1)
    flag[0] = flag[1] = False
    for i in range(2,int(n**0.5)+1):
        if flag[i]:
            for j in range(i**2, n+1, i):
                flag[j] = False
    print(flag.count(True))
Buggy python submission (verdict: Runtime Error):
k = [-1,0,1]
def search(x,y,m):
    if x<0 or x>=len(m[0]) or y<0 or y>=len(m): return
    if m[y][x]==0: return
    m[y][x] = 0
    for i in k:
        for j in k:
            search(x+i,y+j,m)

while True:
    c = 0
    w,h = map(int,input().split())
    if w==0: break
    m = [list(map(int,input().split())) for i in range(h)]
    for i in range(h):
        for j in range(w):
            if m[i][j]==1:
                search(j, i, m)
                c += 1
    print(c)

Fixed submission:
import sys
sys.setrecursionlimit(10000)
def search(x,y,m):
    if not(0<=x<len(m[0]) and 0<=y<len(m)) or m[y][x]=='0': return
    m[y][x] = '0'
    for dx,dy in [[-1,-1],[0,-1],[1,-1],[-1,0],[1,0],[-1,1],[0,1],[1,1]]:
        search(x+dx,y+dy,m)
while True:
    w,h = map(int,input().split())
    if w==h==0: break
    m = [input().split() for _ in range(h)]
    c = 0
    for y in range(h):
        for x in range(w):
            if m[y][x]=='1':
                c += 1
                search(x,y,m)
    print(c)

Buggy python submission (verdict: Runtime Error):
d = [-1,0,1]
def search(x,y,m):
    if not(0<=x<len(m[0]) and 0<=y<len(m)) or m[y][x]=='0': return
    m[y][x] = '0'
    for dy in d:
        for dx in d:
            search(x+dx,y+dy,m)
while True:
    w,h = map(int,input().split())
    if w==h==0: break
    m = [input().split() for _ in range(h)]
    c = 0
    for y in range(h):
        for x in range(w):
            if m[y][x]=='1':
                c += 1
                search(x,y,m)
    print(c)

Fixed submission:
import sys
sys.setrecursionlimit(10000)
def search(x,y,m):
    if not(0<=x<len(m[0]) and 0<=y<len(m)) or m[y][x]=='0': return
    m[y][x] = '0'
    for dx,dy in [[-1,-1],[0,-1],[1,-1],[-1,0],[1,0],[-1,1],[0,1],[1,1]]:
        search(x+dx,y+dy,m)
while True:
    w,h = map(int,input().split())
    if w==h==0: break
    m = [input().split() for _ in range(h)]
    c = 0
    for y in range(h):
        for x in range(w):
            if m[y][x]=='1':
                c += 1
                search(x,y,m)
    print(c)
Buggy python submission (verdict: Runtime Error):
import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main{
  public static void main(String[] args) throws Exception{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] line = br.readLine().split(" ");
    int x = Integer.parseInt(line[0]);
    int y = Integer.parseInt(line[1]);
    System.out.println(x*y+" "+(x+y)*2);
  }
}

Fixed submission:
line = list(map(int,input().split()))
print(line[0]*line[1],line[0]*2+line[1]*2)
Buggy python submission (verdict: Runtime Error):
while True:
    points = list(map(int,input().split()))
    if points==[-1,-1,-1]: break
    sum_pt = sum(points[0:2])
    if points[0]==-1 or points[1]==-1 or sum_pt<30: print('F')
    elif sum_pt<50 and point[2]<50: print('D')
    elif sum_pt<65: print('C')
    elif sum_pt<80: print('B')
    else: print('A')

Fixed submission:
while True:
    points = list(map(int,input().split()))
    if points==[-1,-1,-1]: break
    sum_pt = sum(points[0:2])
    if points[0]==-1 or points[1]==-1 or sum_pt<30: print('F')
    elif sum_pt<50 and points[2]<50: print('D')
    elif sum_pt<65: print('C')
    elif sum_pt<80: print('B')
    else: print('A')
Buggy python submission (verdict: Runtime Error):
import sys, math
[[print("{} {}".format(math.gcd(t[0], t[1]), t[0] * t[1] // math.gcd(t[0], t[1]))) for t in [[int(y) for y in x.split()]]] for x in sys.stdin]

Fixed submission:
import sys, fractions
[[print("{} {}".format(int(fractions.gcd(t[0], t[1])), int(t[0] * t[1] / fractions.gcd(t[0], t[1])))) for t in [[int(y) for y in x.split()]]] for x in sys.stdin]

Buggy python submission (verdict: Runtime Error):
import sys, math
[[print("{} {}".format(math.gcd(t[0], t[1]), t[0] * t[1] // math.gcd(t[0], t[1]))) for t in [[int(y) for y in x.split()]]] for x in sys.stdin]

Fixed submission:
import sys, fractions
[[print("{} {}".format(int(fractions.gcd(t[0], t[1])), int(t[0] * t[1] / fractions.gcd(t[0], t[1])))) for t in [[int(y) for y in x.split()]]] for x in sys.stdin]

Buggy python submission (verdict: Runtime Error):
import sys, math
[[print("{} {}".format(math.gcd(t[0], t[1]), t[0] * t[1] / math.gcd(t[0], t[1]))) for t in [[int(y) for y in x.split()]]] for x in sys.stdin]

Fixed submission:
import sys, fractions
[[print("{} {}".format(int(fractions.gcd(t[0], t[1])), int(t[0] * t[1] / fractions.gcd(t[0], t[1])))) for t in [[int(y) for y in x.split()]]] for x in sys.stdin]
Buggy python submission (verdict: Runtime Error):
import sys 
[print(d) for i, d in enumerate([i for i in sys.stdin].reverse()) if i < 3]

Fixed submission:
[print(i) for i in sorted([int(input()) for _ in range(10)], reverse=True)[0:3]]