Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split())

print [for i in range(a,b+1):
    if c % i == 0

Fixed submission:
a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1):
    d = c % i
    if d == 0:
        count += 1
print (count)

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

print [i for i in range(a,b+1) if c % i == 0]

Fixed submission:
a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1):
    d = c % i
    if d == 0:
        count += 1
print (count)

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
print i for i in range(a,b+1):
    if c % i == 0

Fixed submission:
a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1):
    d = c % i
    if d == 0:
        count += 1
print (count)

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1) :
  d = c % i
  if d == 0 :
     count = count +1
print count

Fixed submission:
a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1):
    d = c % i
    if d == 0:
        count += 1
print (count)

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1) :
    d = c % i
        if d == 0 :
            count = count +1
print (count)

Fixed submission:
a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1):
    d = c % i
    if d == 0:
        count += 1
print (count)

Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1) :
    d = c % i
        if d == 0 :
            count += 1
print (count)

Fixed submission:
a,b,c = map(int,input().split())
count = 0
for i in range(a,b+1):
    d = c % i
    if d == 0:
        count += 1
print (count)
Buggy python submission (verdict: Runtime Error):
r = map(int,input().split())
print (format(r**r*3.14159265, '.6f'),format(r*r*3.14159265, '.6f'))

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

Buggy python submission (verdict: Runtime Error):
from math import pi
r = float(input())
print (format(r**r*pi, ':.6f'),format(r*r*pi, ':.6f'))

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

Buggy python submission (verdict: Runtime Error):
from math import pi
r = float(input())
print (format(r**2*pi, ':.6f'),format(r*pi*2, ':.6f'))

Fixed submission:
from math import pi
r = float(input())
print (format(r**2*pi, '.6f'),format(r*pi*2, '.6f'))
Buggy python submission (verdict: Runtime Error):
while True:
    a,b = map(int,input().split())
    op = map(str,input().split())
    if ap == "?":
        break
    elif ap == "+":
        print (a + b)
    elif ap == "-":
        print (a - b)
    elif ap == "*":
        print (a * b)
    elif ap == "/":
        print (a / b)
    else:
        break

Fixed submission:
while True:
    a,op,b = input().split()
    a = int(a)
    b = int(b)
    if op == '+':
        print (a + b)
    elif op == '-':
        print (a - b)
    elif op == '*':
        print (a * b)
    elif op == '/':
        print (a // b)
    else:
        break

Buggy python submission (verdict: Runtime Error):
while True:
    a,b = map(int,input().split())
    op = map(str,input().split())
    if op == "+":
        print (a + b)
    elif op == "-":
        print (a - b)
    elif op == "*":
        print (a * b)
    elif op == "/":
        print (a / b)
    elif op == "?":
        break
    else:
        break

Fixed submission:
while True:
    a,op,b = input().split()
    a = int(a)
    b = int(b)
    if op == '+':
        print (a + b)
    elif op == '-':
        print (a - b)
    elif op == '*':
        print (a * b)
    elif op == '/':
        print (a // b)
    else:
        break
Buggy python submission (verdict: Runtime Error):
H,W = map(int, input().split())
if H == 0 and W == 0:
    break

print ((('#' * W) + '\n') * H)

Fixed submission:
while True:
    H,W = map(int, input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        print (("#" * W ))
    print ()

Buggy python submission (verdict: Runtime Error):
while True:
    H,W = map(int, input().split())
    if H == 0 and W == 0:
        break

for i in range(H):
    print (('#' * W ) + \n)

Fixed submission:
while True:
    H,W = map(int, input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        print (("#" * W ))
    print ()
Buggy python submission (verdict: Runtime Error):
a, b = [int(x) for i in input().split()]
m = a * b
n = a * 2 + b * 2
print(m, n)

Fixed submission:
a, b = [int(x) for x in input().split()]
m = a * b
n = a * 2 + b * 2
print(m, n)

Buggy python submission (verdict: Runtime Error):
l = map(int,raw_input().split() )
men = l[0] * l[1]
shu = (l[0] + l[1]) * 2

print(str(men) + " "  + str(shu)

Fixed submission:
l = map(int,raw_input().split() )
men = l[0] * l[1]
shu = (l[0] + l[1]) * 2

print(str(men) + " "  + str(shu))
Buggy python submission (verdict: Runtime Error):
import math
r = int(raw_input())
print "%f %f"%(math.pi * r * r, 2 * math.pi * r)

Fixed submission:
import math
r = float(raw_input())
print "%f %f"%(math.pi * r * r, 2 * math.pi * r)
Buggy python submission (verdict: Runtime Error):
while True:
    h, w = map(int, raw_input().split())
    if h == 0 and w == 0:
        break
    else:
        if w <= 2:
            for i in range(h):
                print a * w
        else:
            for i in range(h):
                if i == 0 or i == h - 1:
                    print a * w
                else:
                    print a + b * (w - 2) + a

Fixed submission:
def draw(h, w):
    print("#" * w)
    for i in range(h-2):
        print("#" + ("."*(w-2)) + "#")
    print("#" * w)
    print("")
 
while True:
    h, w = map(int, raw_input().split())
    if h == 0 and w == 0:
        break
    draw(h, w)
Buggy python submission (verdict: Runtime Error):
x = input()
print(x*x*x)

Fixed submission:
x = input()
i = int(x)
print(i**3)

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

Fixed submission:
x = input()
i = int(x)
print(i**3)

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

Fixed submission:
x = input()
i = int(x)
print(i**3)
Buggy python submission (verdict: Runtime Error):
using namespace std;
 
main(){
   int a, b;
   int area, length;
 
    cin >> a >> b;
 
   area = a * b;
   length =2*( a + b);
 
    cout << area << " " << length << endl;
    
 
 
}

Fixed submission:
a, b = map(int, input().split())
print(a*b, a*2 + b*2)
Buggy python submission (verdict: Runtime Error):
num = list(map(int, input().split()))
num.sort()
print(num[0], num[1], num[2]

Fixed submission:
num = list(map(int, input().split()))
num.sort()
print(num[0], num[1], num[2])
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split()) ;
count = 0 ;
for i in range(a,b+1) :
  d = c % i ;
  if d == 0 :
     count = count +1
  
print("%d" % count) 

Fixed submission:
a, b = [int(x) for x in input().split(' ')]
 
d = a // b
r = a % b
f = a / b
 
print("{0} {1} {2:.5f}".format(d, r, f))
Buggy python submission (verdict: Runtime Error):
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include<stdio.h>
 
int main()
{
    int n;
    scanf("%d", &n);
    int i, rank;
    char sym;
    int card[4][14] = {0};
    for (i = 1; i <= n; i++)
    {
        scanf(" %c %d\n", &sym, &rank);
        switch (sym)
        {
        case 'S':
            card[0][rank-1] = -1;
            break;
        case 'H':
            card[1][rank-1] = -1;
            break;
        case 'C':
            card[2][rank-1] = -1;
            break;
        case 'D':
            card[3][rank-1] = -1;
        }

Fixed submission:
cards = {
        'S': [0 for _ in range(13)],
        'H': [0 for _ in range(13)],
        'C': [0 for _ in range(13)],
        'D': [0 for _ in range(13)],
        }
    
n = int(input())
for _ in range(n):
    (s, r) = input().split()
    r = int(r)
    cards[s][r - 1] = r
    
for s in ('S', 'H', 'C', 'D'):
    for r in range(13):
        if cards[s][r] == 0:
            print( '{0:s} {1:d}'.format(s, r+1))
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input()

var = var^3
print var

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

var = int(raw_input())
sum = var*var*var

print sum

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input()

var = var*var*var
print var

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

var = int(raw_input())
sum = var*var*var

print sum

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input()
sum = var*var*var

print sum

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

var = int(raw_input())
sum = var*var*var

print sum
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input().split(" ")
rect = var[0] * var[1]
length = var[0] * 2 + var[1] * 2

print rect + " " + length

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

var = raw_input().split()
rect = int(var[0]) * int(var[1])
length = int(var[0]) * 2 + int(var[1]) * 2

print str(rect) + " " + str(length)

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input().split(" ")
rect = int(var[0]) * int(var[1])
length = int(var[0]) * 2 + int(var[1]) * 2

print rect + " " + length

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

var = raw_input().split()
rect = int(var[0]) * int(var[1])
length = int(var[0]) * 2 + int(var[1]) * 2

print str(rect) + " " + str(length)

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input()
print str(var)
rect = int(var[0]) * int(var[1])
length = int(var[0]) * 2 + int(var[1]) * 2

print rect + " " + length

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

var = raw_input().split()
rect = int(var[0]) * int(var[1])
length = int(var[0]) * 2 + int(var[1]) * 2

print str(rect) + " " + str(length)

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input().split()
rect = int(var[0]) * int(var[1])
length = int(var[0]) * 2 + int(var[1]) * 2

print rect + " " + length

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

var = raw_input().split()
rect = int(var[0]) * int(var[1])
length = int(var[0]) * 2 + int(var[1]) * 2

print str(rect) + " " + str(length)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = int(raw_input())

h = var / 3600
ms = var % 3600
m = ms / 60
s = ms % 60

print ":".join([h, m, s])

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

var = int(raw_input())

h = str(var / 3600)
ms = var % 3600
m = str(ms / 60)
s = str(ms % 60)

print ":".join([h, m, s])
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input().split()

var = map(int, var)

if var[0] > var[1]
	tmp = var[0]
	var[0] = var[1]
	var[1] = tmp
if var[0] > var[2]
	tmp = var[0]
	var[0] = var[2]
	var[2] = tmp
if var[1] > var[2]
	tmp = var[1]
	var[1] = var[2]
	var[2] = tmp

var = map(str, var)

prini " ".join(var)

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

var = raw_input().split()

var = map(int, var)

if var[0] > var[1]:
	tmp = var[0]
	var[0] = var[1]
	var[1] = tmp
	
if var[0] > var[2]:
	tmp = var[0]
	var[0] = var[2]
	var[2] = tmp
	
if var[1] > var[2]:
	tmp = var[1]
	var[1] = var[2]
	var[2] = tmp

print var[0],var[1],var[2]

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input().split()

var = map(int, var)

if var[0] > var[1]
	tmp = var[0]
	var[0] = var[1]
	var[1] = tmp
if var[0] > var[2]
	tmp = var[0]
	var[0] = var[2]
	var[2] = tmp
if var[1] > var[2]
	tmp = var[1]
	var[1] = var[2]
	var[2] = tmp

var = map(str, var)

prini var[0],var[1],var[2]

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

var = raw_input().split()

var = map(int, var)

if var[0] > var[1]:
	tmp = var[0]
	var[0] = var[1]
	var[1] = tmp
	
if var[0] > var[2]:
	tmp = var[0]
	var[0] = var[2]
	var[2] = tmp
	
if var[1] > var[2]:
	tmp = var[1]
	var[1] = var[2]
	var[2] = tmp

print var[0],var[1],var[2]

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input().split()

var = map(int, var)

if var[0] > var[1]:
	tmp = var[0]
	var[0] = var[1]
	var[1] = tmp
if var[0] > var[2]:
	tmp = var[0]
	var[0] = var[2]
	var[2] = tmp
if var[1] > var[2]:
	tmp = var[1]
	var[1] = var[2]
	var[2] = tmp

var = map(str, var)

prini var[0],var[1],var[2]

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

var = raw_input().split()

var = map(int, var)

if var[0] > var[1]:
	tmp = var[0]
	var[0] = var[1]
	var[1] = tmp
	
if var[0] > var[2]:
	tmp = var[0]
	var[0] = var[2]
	var[2] = tmp
	
if var[1] > var[2]:
	tmp = var[1]
	var[1] = var[2]
	var[2] = tmp

print var[0],var[1],var[2]

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input().split()

var = map(int, var)

if var[0] > var[1]:
	tmp = var[0]
	var[0] = var[1]
	var[1] = tmp
	
if var[0] > var[2]:
	tmp = var[0]
	var[0] = var[2]
	var[2] = tmp
	
if var[1] > var[2]:
	tmp = var[1]
	var[1] = var[2]
	var[2] = tmp

prini var[0],var[1],var[2]

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

var = raw_input().split()

var = map(int, var)

if var[0] > var[1]:
	tmp = var[0]
	var[0] = var[1]
	var[1] = tmp
	
if var[0] > var[2]:
	tmp = var[0]
	var[0] = var[2]
	var[2] = tmp
	
if var[1] > var[2]:
	tmp = var[1]
	var[1] = var[2]
	var[2] = tmp

print var[0],var[1],var[2]
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

var = raw_input().split()

var = map(int, var)

if 0 < var[2] - var[4] or 0 < var[3] - var[4]:
	print "No"
	return None
elif var[0] < var[2] + var[4] or var[1] > var[3] + var[4]:
	print "No"
	return None
else:
	print "Yes"

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

var = raw_input().split()

var = map(int, var)

if 0 > var[2] - var[4] or 0 > var[3] - var[4]:
	print "No"
elif var[0] < var[2] + var[4] or var[1] < var[3] + var[4]:
	print "No"
else:
	print "Yes"
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
print  a*b + 2*(a+b) 

Fixed submission:
w, h = map(int, raw_input().split(" "))
print w*h, 2*(w+h)
Buggy python submission (verdict: Runtime Error):
W,H,x,y,r=map(int,raw_input().split())
if not(-100<=x and y<=100 and 0<W<=100 and 0<H<=100 and 0<r<=100):
    print("Constraits Errand")
    exit()
#elif x<=0 or y<=0 or  y-r<=H<=y+r or x-r<=W<=x+r or  y-r<=0<=y+r or x-r<=0<=x+r:
elif W-r<=x<=W+r and H-r<=y<= H+r
    print("No")
    exit()
else:
    print("Yes")

Fixed submission:
W,H,x,y,r=map(int,raw_input().split())
if not(-100<=x and y<=100 and 0<W<=100 and 0<H<=100 and 0<r<=100):
    print("Constraits Errand")
    exit()
#elif x<=0 or y<=0 or  y-r<=H<=y+r or x-r<=W<=x+r or  y-r<=0<=y+r or x-r<=0<=x+r:
elif r<=x<=W-r and r<=y<= H-r:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
data = input()
counter=1
while data != 0:
    print("Case" + str(counter) + ":" + str(data))
print("Case"+counter+":"+data)

Fixed submission:
data = input()
counter=1
while data != 0:
    print("Case %d: %d" % (counter, data))
    data = input()
    counter+=1
Buggy python submission (verdict: Runtime Error):
i = map(int, raw_input().split())
a=i[0]
b=i[1]
print("%d %d" % (a*b, (a+b)*2))

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

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
mennseki=a*b
syuu=(a+b)*2
print mennseki,syuu

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

Fixed submission:
a,b=map(int,raw_input().split())
if a<b:
    print "a < b"
elif a>b:
    print "a > b"
elif a==b:
    print "a == b"

Buggy python submission (verdict: Runtime Error):
a,b=main(int,raw_input().split())
if a<b:
    print "a < b"
elif a>b:
    print "a > b"
elif a==b:
    print "a == b"

Fixed submission:
a,b=map(int,raw_input().split())
if a<b:
    print "a < b"
elif a>b:
    print "a > b"
elif a==b:
    print "a == b"
Buggy python submission (verdict: Runtime Error):
w,h,x,y,r=map(int,raw_input().split())

f=0
if x+r>w:
    f=1
if y+r>h:
    f=1
if r>x:
    f=1
if r>y:
    f=1
if f==0:
    print "Yes"
else print "No"

Fixed submission:
w,h,x,y,r=map(int,raw_input().split())

f=0
if x+r>w:
    f=1
if y+r>h:
    f=1
if r>x:
    f=1
if r>y:
    f=1
if f==0:
    print "Yes"
else:
    print "No"
Buggy python submission (verdict: Runtime Error):
x=raw_input()
print x*x*x

Fixed submission:
x=int(raw_input())
print x*x*x

Buggy python submission (verdict: Runtime Error):
x=raw_input()
print (x*x*x)

Fixed submission:
x=int(raw_input())
print x*x*x
Buggy python submission (verdict: Runtime Error):
s=int(raw_input())
h,s=divmod(s,3600)
m,s=divmod(s,60)
print ({}:{}:{}).format(h,m,s)

Fixed submission:
L=[]
s=int(raw_input())
L+=divmod(s,3600)
L+=divmod(L[1],60)
print ("{0}:{1}:{2}").format(L[0],L[2],L[3])

Buggy python submission (verdict: Runtime Error):
L=[]
s=int(raw_input())
L+=divmod(s,3600)
L+=divmod(L[1],60)
print ({}:{}:{}.format(L[0],L[2],L[3]))

Fixed submission:
L=[]
s=int(raw_input())
L+=divmod(s,3600)
L+=divmod(L[1],60)
print ("{0}:{1}:{2}").format(L[0],L[2],L[3])

Buggy python submission (verdict: Runtime Error):
L=[]
s=int(raw_input())
L+=divmod(s,3600)
L+=divmod(L[1],60)
print ({}:{}:{}).format(L[0],L[2],L[3])

Fixed submission:
L=[]
s=int(raw_input())
L+=divmod(s,3600)
L+=divmod(L[1],60)
print ("{0}:{1}:{2}").format(L[0],L[2],L[3])

Buggy python submission (verdict: Runtime Error):
L=[]
s=int(raw_input())
L+=divmod(s,3600)
L+=divmod(L[1],60)
print ({0}:{1}:{2}).format(L[0],L[2],L[3])

Fixed submission:
L=[]
s=int(raw_input())
L+=divmod(s,3600)
L+=divmod(L[1],60)
print ("{0}:{1}:{2}").format(L[0],L[2],L[3])
Buggy python submission (verdict: Runtime Error):
from decimal import *
a,b=map(int, raw_input().split())
d=a/b
r=a%b
Decimal(f)=Decimal(a)/Decimal(b)
print "{0} {1} {2}".format(d, r, Decimal(f)) 

Fixed submission:
a,b=map(int, raw_input().split())
d=a/b
e=a%b
print "{0} {1} {2:0.8f}".format(int(d), int(e), float(a)/float(b))
Buggy python submission (verdict: Runtime Error):
while 1:
  l=raw_input()
  if l.find("?")==2:
    break
  print eval(l)

Fixed submission:
while 1:
  l=raw_input()
  if l.find("?")==-1:
    print eval(l)
  else: 
    break
Buggy python submission (verdict: Runtime Error):
x=input()
print(x**3)

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

Buggy python submission (verdict: Runtime Error):
x=input()
print("{}" % (x**3))

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

Fixed submission:
x,y=[int(x) for x in input().strip().split()]
print("{} {}".format(x*y, 2*(x+y)))

Buggy python submission (verdict: Runtime Error):
x=int(input())
y=int(input())
print("{} {}" % (x*y, 2*(x+y)))

Fixed submission:
x,y=[int(x) for x in input().strip().split()]
print("{} {}".format(x*y, 2*(x+y)))
Buggy python submission (verdict: Runtime Error):
import sys
 
ff = sys.stdin
 
while True :
    a, b = map(int, ff.readline().split())
    if (a == 0) & (b == 0) : break
    elif a < b :
		print(a, b)
    else :
		print(b, a)

Fixed submission:
import sys

for in_str in sys.stdin:
    comp_list = list(map(int, in_str.split(" ")))
#    a, b = map(int, in_str.split())
    a = comp_list[0]
    b = comp_list[1]
    if a == 0 and b == 0 : break
    elif a < b :
        print(a, b)
    else :
        print(b, a)

Buggy python submission (verdict: Runtime Error):
import sys
 
ff = sys.stdin
 
while True :
    a, b = map(int, ff.readline().split())
    if (a == 0) & (b == 0) :
    break
    elif a < b :
        print(a, b)
    else :
        print(b, a)

Fixed submission:
import sys

for in_str in sys.stdin:
    comp_list = list(map(int, in_str.split(" ")))
#    a, b = map(int, in_str.split())
    a = comp_list[0]
    b = comp_list[1]
    if a == 0 and b == 0 : break
    elif a < b :
        print(a, b)
    else :
        print(b, a)
Buggy python submission (verdict: Runtime Error):
import sys

x = sys.stdin.readline()
print(x**3)

Fixed submission:
import sys

x = sys.stdin.readline()
print(int(x)**3)
Buggy python submission (verdict: Runtime Error):
import sys

a,b = map(int(x) ,sys.stdin.readline().split())
area = a*b
surround = 2*(a+b)
print("%d %d" % (area, surround))

Fixed submission:
import sys

a,b = map(int,sys.stdin.readline().split())
area = a*b
surround = 2*(a+b)
print("%d %d" % (area, surround))
Buggy python submission (verdict: Runtime Error):
import sys

S = int(sys.stdin.readline())
h = S / 3600
m = (S - h*3600)/60
s = S - h*3600 - m*60
pirnt("%d:%d:%d" % (h,m,s))

Fixed submission:
import sys

S = int(sys.stdin.readline())
h = S / 3600
m = (S - h*3600)/60
s = S - h*3600 - m*60
print("%d:%d:%d" % (h,m,s))
Buggy python submission (verdict: Runtime Error):
import sys

for i,ws in enumerate(sys.stdin,1):
    list = map(int, ws[:-1].split())

    if list[0] == 0 and list[1] == 0:
        break

    print(' '.join(map(str,list.sort())))

Fixed submission:
import sys

for i,ws in enumerate(sys.stdin,1):
    list = sorted(map(int, ws[:-1].split()))

    if list[0] == 0 and list[1] == 0:
        break

    print(' '.join(map(str,list)))
Buggy python submission (verdict: Runtime Error):
import sys
import math

r = int(sys.stdin.readline())
print('%.5f %.5f' % (r**2 * math.pi, r*2 * math,pi))

Fixed submission:
import sys
import math

r = float(sys.stdin.readline())
print('%.5f %.5f' % (r**2 * math.pi, r*2 * math.pi))

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

r = float(sys.stdin.readline())
print('%.5f %.5f' % (r**2 * math.pi, r*2 * math,pi))

Fixed submission:
import sys
import math

r = float(sys.stdin.readline())
print('%.5f %.5f' % (r**2 * math.pi, r*2 * math.pi))
Buggy python submission (verdict: Runtime Error):
import sys

for v in sys.stdin
    a,op,b = v.split()
    a = int(a)
    b = int(b)
    if op == '+':
        print(a+b)
    elif op == '-':
        print(a-b)
    elif op == '*':
        print(a*b)
    elif op == '/':
        print(a/b)
    elif op == '?':
        break

Fixed submission:
import sys

for v in iter(sys.stdin.readline,""):
    a,op,b = v.split()
    a = int(a)
    b = int(b)
    if op == '+':
        print(a+b)
    elif op == '-':
        print(a-b)
    elif op == '*':
        print(a*b)
    elif op == '/':
        print(a/b)
    elif op == '?':
        break

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

for v in iter(sys.stdin.readline)
    a,op,b = v.split()
    a = int(a)
    b = int(b)
    if op == '+':
        print(a+b)
    elif op == '-':
        print(a-b)
    elif op == '*':
        print(a*b)
    elif op == '/':
        print(a/b)
    elif op == '?':
        break

Fixed submission:
import sys

for v in iter(sys.stdin.readline,""):
    a,op,b = v.split()
    a = int(a)
    b = int(b)
    if op == '+':
        print(a+b)
    elif op == '-':
        print(a-b)
    elif op == '*':
        print(a*b)
    elif op == '/':
        print(a/b)
    elif op == '?':
        break
Buggy python submission (verdict: Runtime Error):
import sys

for v in iter(sys.stdin,''):
    h,w = map(int,v.split())

    for i in range(h+1):
        print('#'*w)
 
    print('')

Fixed submission:
import sys

for v in iter(sys.stdin.readline,''):
    h,w = map(int,v.split())

    if h == 0 and w == 0:
        break

    for i in range(h):
        print('#'*w)
    print('')