Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math

while True:
    try:

        g = 9.8 
        l = 4.9 

        v = float(raw_input())
        t = v/g 
                                                                                                                                                                                                             
        y = l*t*t

        n = y/5 + 1 


        print int(math.ceil(n))

    except EOFError:
        break
~                                                                                                                                                                                                            
~                                                                                                                                                                                                            
~                                                                                                                                                                                                            
~                                                

Fixed submission:
while True:                                                                                                                                                                                                  
    try:
        g = 9.8
        l = 4.9
        v = float(raw_input())
        t = v/g
        y = l*(t)**2
        n = y/5 + 2

        print int(n)

    except EOFError:  break
Buggy python submission (verdict: Runtime Error):
mport math

def cal(x):
    a=10
    y= []
    for i in range(1,11):
        d= pow(2,(10-i))

        if x>=d:
            x -= d
            y.append(d)
    return y

if __name__ == "__main__":
    while True:
        try:

            a=int(raw_input())
            b = cal(a)
            b.reverse()

            for y in b:
                print y,

            print

        except EOFError:
            break

Fixed submission:
import math

def cal(x):
    y = []
    for i in xrange(1,11):
        d= pow(2,(10-i))

        if x>=d:
            x -= d
            y.append(d)
    return y

if __name__ == "__main__":
    while True:
        try:

            b = cal(int(raw_input()))
            b.reverse()

            for i in b:
                print i,

            print

        except EOFError:
            break
Buggy python submission (verdict: Runtime Error):
while True:
    try:
        n = int(raw_input())                                                                                                                                                                                 

        print (a**2+a+2)/2

    except EOFError: break
~                                  

Fixed submission:
while True:
    try:
        a = int(raw_input())                                                                                                                                                                                 

        print (a**2+a+2)/2

    except EOFError: break

Buggy python submission (verdict: Runtime Error):
while True:
    try:
        n = int(raw_input())                                                                                                                                                                                 

        print (a**2+a+2)/2

    except EOFError: break

Fixed submission:
while True:
    try:
        a = int(raw_input())                                                                                                                                                                                 

        print (a**2+a+2)/2

    except EOFError: break
Buggy python submission (verdict: Runtime Error):
text  = []
ptext = []

while True:
    try:


        text = list(map(str,raw_input()))
#        print text
        f = 0
        ptext = []

        for i in range(len(text)):
            if text[i] == '@':
#                print text[i]

                for k in range(int(text[i+1])-1):
                    ptext.append(text[i+2])

                f = 1

            else:
                if f == 0:
                    ptext.append(text[i])
                else:
                    f = 0            

Fixed submission:
text  = []                                                                                                
ptext = []

while True:
    try:
        text = list(map(str,raw_input()))
        f = 0
        ptext = []

        for i in range(len(text)):
            if text[i] == '@':

                for k in range(int(text[i+1])-1):
                    ptext.append(text[i+2])

                f = 1

            else:
                if f == 0:
                    ptext.append(text[i])
                else:
                    f = 0

        print "".join(map(str,ptext))

    except EOFError:
        break
text  = []                                                                                                
ptext = []

while True:
    try:
        text = list(map(str,raw_input()))
        f = 0
        ptext = []

        for i in range(len(text)):
            if text[i] == '@':

                for k in range(int(text[i+1])-1):
                    ptext.append(text[i+2])

                f = 1

            else:
                if f == 0:
                    ptext.append(text[i])
                else:
                    f = 0

        print "".join(map(str,ptext))

    except EOFError:
        break
Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':


    while True:
        
        a,b = map(str,raw_input().split(' '))
    
        if a == 0 and b == 0:
            break 

        a = list(a)
        b = list(b)
    #    print a


        br = 0
        hit = 0
        for i,data in enumerate(b):

            if data in a:
                if a[i] == data:
                    hit += 1

                else:
                    br += 1

        print hit,br

Fixed submission:



if __name__ == '__main__':


    while True:

        a,b = map(str,raw_input().split(' '))

        if a == '0' and b == '0':
            break

      #  print a,b

        a = list(a)
        b = list(b)
    #    print a


        br = 0
        hit = 0
        for i,data in enumerate(b):

            if data in a:
                if a[i] == data:
                    hit += 1

                else:
                    br += 1

        print hit,br
Buggy python submission (verdict: Runtime Error):
data = [x + 1 for x in xrange(30)]
# print(data)

for i in xrange(30):
    a = int(raw_input())

    data.remove(a)
#     print(data)

for i in data:
    print(i)

Fixed submission:
data = [x + 1 for x in xrange(30)]
# print(data)

for i in xrange(28):
    a = int(raw_input())

    data.remove(a)
#     print(data)

for i in data:
    print(i)
Buggy python submission (verdict: Runtime Error):
coins = [500, 100, 50, 10, 5, 1]

def count(x, y):
    ret = 0
    while x >= y:
        x -= y
        ret += 1
    return ret

while True:
    n = input()
    if n == 0:
        break
    ans = 0
    n = 1000 - n
    for val in coins:
        n,  t = count(n, val)
        ans += t

    print(ans)

Fixed submission:
coins = (500, 100, 50, 10, 5, 1)

def count(x, y):
    ret = 0
    while x >= y:
        x -= y
        ret += 1
    return x, ret

while True:
    n = input()
    if n == 0:
        break
    ans = 0
    n = 1000 - n
    for val in coins:
        n,  t = count(n, val)
        ans += t

    print(ans)
Buggy python submission (verdict: Runtime Error):
ef main():

    data = list(map(int, input().split()))
#     print(data)

    a = data[:3]
#     print(a)
    b = data[3:]
#     print(b)
    ans = [0 for x in range(3)]

    t = b[2] - a[2]
    if t < 0:
        ans[2] = t + 60
        b[1] -= 1
    else:
        ans[2] = t


    t = b[1] - a[1]
    if t < 0:
        ans[1] = t + 60
        b[0] -= 1

    else:
        ans[1] = t

    ans[0] = b[0] - a[0]
#     print(ans)
    for a in ans[:-1]:
        print(a, end=' ')
    print(ans[-1])

if __name__ == '__main__':
    for a in range(3):
        main()

Fixed submission:
def main():

    data = list(map(int, input().split()))

    a = data[:3]
    b = data[3:]
    ans = [0 for x in range(3)]

    t = b[2] - a[2]
    if t < 0:
        ans[2] = t + 60
        b[1] -= 1
    else:
        ans[2] = t


    t = b[1] - a[1]
    if t < 0:
        ans[1] = t + 60
        b[0] -= 1

    else:
        ans[1] = t

    ans[0] = b[0] - a[0]
    for a in ans[:-1]:
        print(a, end=' ')
    print(ans[-1])

if __name__ == '__main__':
    for a in range(3):
        main()
Buggy python submission (verdict: Runtime Error):
while True:
    try:
        a, b = map(int, input().split())
        printe(a+b)
    except EOFError as e:
        break

Fixed submission:
while True:
    try:
        a, b = map(int, input().split())
        print(a+b)
    except EOFError as e:
        break
Buggy python submission (verdict: Runtime Error):
import sys

fp = open("input.txt", "r")
#fp = sys.stdin

def operate(string):
    count = 1
    prev = string[0]
    ret = ""
    for c in string[1:]:
        if c == prev:
            count += 1
        else:
            ret += str(count) + prev
            count = 1
        prev = c
    ret += str(count) + prev
    #print ret
    return ret
            

while True:
    n = int(fp.readline()[:-1])
    if n == 0:
        break

    orig = fp.readline()[:-1]

    for i in xrange(n):
        orig = operate(orig)

    print orig

Fixed submission:
import sys

#fp = open("input.txt", "r")
fp = sys.stdin

def operate(string):
    count = 1
    prev = string[0]
    ret = ""
    for c in string[1:]:
        if c == prev:
            count += 1
        else:
            ret += str(count) + prev
            count = 1
        prev = c
    ret += str(count) + prev
    #print ret
    return ret
            

while True:
    n = int(fp.readline()[:-1])
    if n == 0:
        break

    orig = fp.readline()[:-1]

    for i in xrange(n):
        orig = operate(orig)

    print orig
Buggy python submission (verdict: Time Limit Exceeded):
import sys

#fp = open("input.txt", "r")
fp = sys.stdin

while True:
    req = map(int, fp.readline()[:-1].split(" "))
    if req[0] + req[1] == 0:
        break

    n = req[0]
    k = req[1]

    sum_max = 0
    num_list = []
    
    for i in xrange(n):
        num = int(fp.readline()[:-1])
        num_list.append(num)
        if k > 0:
            sum_max += num
            k -= 1
            continue
        else:
            num_list.pop(0)
            sum_tmp = sum(num_list)
            if sum_tmp > sum_max:
                sum_max = sum_tmp

    print sum_max

Fixed submission:
import sys

#fp = open("input.txt", "r")
fp = sys.stdin

while True:
    req = map(int, fp.readline()[:-1].split(" "))
    if req[0] + req[1] == 0:
        break

    n = req[0]
    k = req[1]

    sum_max = 0
    sum_prev = 0
    num_list = []
    
    for i in xrange(n):
        num = int(fp.readline()[:-1])
        num_list.append(num)
        if k > 0:
            sum_max += num
            k -= 1
            sum_prev = sum_max
            continue
        else:
            sum_tmp = sum_prev + num - num_list.pop(0)
            sum_prev = sum_tmp
            if sum_tmp > sum_max:
                sum_max = sum_tmp

    print sum_max
Buggy python submission (verdict: Runtime Error):
import math
r = [int(x) for x in input().split()]
print("{0:f} {1:f}".format(r[0] * r[0] * math.pi, r[0] * 2 * math.pi))

Fixed submission:
import math
r = [float(x) for x in input().split()]
print("{0:f} {1:f}".format(r[0] * r[0] * math.pi, r[0] * 2 * math.pi))

Buggy python submission (verdict: Runtime Error):
#import math
pi = 3.141592
r = [int(x) for x in input().split()]
print("{0:f} {1:f}".format(r[0] * r[0] * pi, r[0] * 2 * pi))

Fixed submission:
import math
r = [float(x) for x in input().split()]
print("{0:f} {1:f}".format(r[0] * r[0] * math.pi, r[0] * 2 * math.pi))

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

Fixed submission:
import math
r = [float(x) for x in input().split()]
print("{0:f} {1:f}".format(r[0] * r[0] * math.pi, r[0] * 2 * math.pi))
Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split(" "))
print(x * y, (x + y) * 2)

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

Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split(" "))
print(x * y + " " + (x + y) * 2)

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

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

Fixed submission:
a, b = map(int, raw_input().split())
print(str(a * b) + " " + str((a + b) * 2))
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python

line = raw_input()
l = map(int, line.strip().split())

l.sort()
l.reverse()
out = ' '.join(l)
print out

Fixed submission:
#!/usr/bin/python

line = raw_input()
l = map(int, line.strip().split())

l.sort()
l.reverse()
l = map(str, l)
out = ' '.join(l)
print out
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/python
# -*- coding: utf-8 -*-


def main():
    while True:
        terms = int(raw_input())
        if terms == 0:
            break

        data = []
        for i in xrange(terms):
            data.append(int(raw_input()))

        print(max_sum_sequence(data))


def max_sum_sequence(data):
    max = 0
    num_data = len(data)
    for l in xrange(num_data + 1):
        sum = max_at_length(data, l)
        if sum > max:
            max = sum

    return max


def max_at_length(data, length):
    max = 0
    num_data = len(data)
    for begin in xrange(num_data):
        sum = 0
        for i in xrange(begin, begin + length):
            if i >= num_data:
                continue

            sum += data[i]

        if sum > max:
            max = sum

    return max


main()

Fixed submission:
#!/usr/bin/python


def main():
    while True:
        try:
            num_data = int(raw_input())
            if num_data == 0:
                break

            data = []
            for i in xrange(num_data):
                data.append(int(raw_input()))

            max = max_sum_sequence(data)
            print(max)
        except:
            break


def max_sum_sequence(data):
    sum = [0]
    n = len(data)

    for i in xrange(n):
        sum.append(sum[-1] + data[i])

    mx = - (1 << 30)
    for i in xrange(n):
        for j in xrange(i + 1, n + 1):
            mx = max(mx, sum[j] - sum[i])

    return mx


main()
Buggy python submission (verdict: Runtime Error):
isPrime = [True] * 10001
sum = 0
sumPrime = [sum]
def calcPrime():
    global sum
    isPrime[0] = isPrime[1] = False
    for i in range(len(isPrime)):
        if(isPrime[i]):
            sum += i
            sumPrime.append(sum)
            for j in range(2 * i, len(isPrime), i):
                isPrime[j] = False
                
calcPrime()
while(True):
    n = input()
    if(n == 0):
        break
    print(sumPrime[n])

Fixed submission:
isPrime = [True] * 200001
sum = 0
sumPrime = [sum]
def calcPrime():
    global sum
    isPrime[0] = isPrime[1] = False
    for i in range(len(isPrime)):
        if(isPrime[i]):
            sum += i
            sumPrime.append(sum)
            for j in range(2 * i, len(isPrime), i):
                isPrime[j] = False
                
calcPrime()
while(True):
    n = input()
    if(n == 0):
        break
    print(sumPrime[n])
Buggy python submission (verdict: Runtime Error):
def main():
    n = input()
    print(n ** 3)
    pass

if __name__ == '__main__':
    main()

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

Buggy python submission (verdict: Runtime Error):
def main():
    n = int(raw_input())
    print(n ** 3)
    pass

if __name__ == '__main__':
    main()

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

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

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

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

Fixed submission:
n = int(input())
print(n ** 3)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
print("%d %d" % (a * b, 2 * (a + b)))

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

Buggy python submission (verdict: Runtime Error):
n = raw_input()
print("%d %d" % (int(n[0]) * int(n[2]), 2 * (int(n[0]) + int(n[2])) ))

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

Buggy python submission (verdict: Runtime Error):
(a, b) = map(int, raw_input().split())
print("%d %d" % (a * b, 2 * (a + b)))

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

Buggy python submission (verdict: Runtime Error):
(a, b) = map(int, raw_input().split())
print str(a * b) + " " + str(2 * (a + b))

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

Buggy python submission (verdict: Runtime Error):
a, b = map(int, raw_input().split())
print str(a * b) + " " + str(2 * (a + b))

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

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

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

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

Fixed submission:
a, b = map(int, raw_input().split())
print ("%d %d" % (a * b, 2 * (a + b)))
Buggy python submission (verdict: Runtime Error):
a, b, c = mapt(int, raw_input().split())
if a < b and b < c:
    print "Yes"
else:
    print "No"

Fixed submission:
a, b, c = map(int, raw_input().split())
if a < b and b < c:
    print "Yes"
else:
    print "No"
Buggy python submission (verdict: Runtime Error):
s = input()
a, b = s.split(' ')
print(int(a) * int(b), 2 * (int(a) + int(b)))

Fixed submission:
s = raw_input()
a, b = s.split(' ')
print int(a) * int(b), 2 * (int(a) + int(b))
Buggy python submission (verdict: Runtime Error):
import sys
def euc(li):
    if (li[0] == 0 or li[1] == 0):
        return li[1];
    return euc((li[0]-li[1],li[1]) if li[0]>li[1] else (li[1]-li[0],li[0]))
for line in sys.stdin:
    [a,b] = [int(x) for x in line.split()]
    gcd = euc([a,b])
    print gcd,a*b/gcd

Fixed submission:
import sys
def gcd(a,b):
    if (b == 0):
        return a
    return gcd(b,a%b)
for line in sys.stdin:
    a,b = [int(x) for x in line.split()]
    d = gcd(a,b)
    print d,a*b/d

Buggy python submission (verdict: Runtime Error):
import sys
def euc(li):
    if (li[0] == 0 or li[1] == 0):
        return li[1]
    return euc((li[0]-li[1],li[1]) if li[0]>li[1] else (li[1]-li[0],li[0]))
for line in sys.stdin:
    [a,b] = [int(x) for x in line.split()]
    gcd = euc([a,b])
    print gcd,a*b/gcd

Fixed submission:
import sys
def gcd(a,b):
    if (b == 0):
        return a
    return gcd(b,a%b)
for line in sys.stdin:
    a,b = [int(x) for x in line.split()]
    d = gcd(a,b)
    print d,a*b/d
Buggy python submission (verdict: Runtime Error):
import sys
def f(n):
    li = [x for x in range(2,n+1)]
    pr = []
    while True:
        pr.append(li[0])
        li = [x for x in li if x%li[0]!=0]
        if li[-1]<pr[-1]**2: return pr+li
for n in sys.stdin:
    print len(f(int(n)))

Fixed submission:
import sys
n=1000000
pr=[1]*n
pr[0],pr[1]=0,0
for i in xrange(2,int(n**0.5)+1):
    if pr[i]==1:
        for j in xrange(i**2,n,i):
            pr[j]=0
for i in xrange(2,n):
    pr[i]+=pr[i-1]
for line in sys.stdin:
    print pr[int(line)]
Buggy python submission (verdict: Runtime Error):
import sys
re = range(input())
for li in sys.stdin:
    [a,b] = [int(x) for x in li.split(",")]
    tmp = re[a-1]
    re[a-1] = re[b-1]
    re[b-1] = tmp
for i in re:
    print i+1

Fixed submission:
import sys
l = range(input())
n = input()
for line in sys.stdin:
    [a,b] = [int(x) for x in line.split(',')]
    tmp = l[a-1]
    l[a-1] = l[b-1]
    l[b-1] = tmp
for i in l:
    print i+1

Buggy python submission (verdict: Runtime Error):
import sys
re = range(int(raw_input()))
for li in sys.stdin:
    [a,b] = [int(x) for x in li.split(",")]
    tmp = re[a-1]
    re[a-1] = re[b-1]
    re[b-1] = tmp
for i in re:
    print i+1

Fixed submission:
import sys
l = range(input())
n = input()
for line in sys.stdin:
    [a,b] = [int(x) for x in line.split(',')]
    tmp = l[a-1]
    l[a-1] = l[b-1]
    l[b-1] = tmp
for i in l:
    print i+1
Buggy python submission (verdict: Runtime Error):
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):
a, b = [int(i) for i in input().split()]
area = a * b
perimeter =  2 * (a + b)
print(area + " " + perimeter)

Fixed submission:
a, b = [int(i) for i in input().split()]
area = a * b
perimeter = 2 * (a + b)
print(area, perimeter, sep=" ")

Buggy python submission (verdict: Runtime Error):
a, b = [int(i) for i in input().split()]
area = a * b
perimeter =  2 * (a + b)
print(area & " " & perimeter)

Fixed submission:
a, b = [int(i) for i in input().split()]
area = a * b
perimeter = 2 * (a + b)
print(area, perimeter, sep=" ")
Buggy python submission (verdict: Runtime Error):
S = int(input())
in = divmod(S,3600)
h = in[0] 
in = divmod(int[1],60)
m = int[0]
s = int[1]

Fixed submission:
S = int(input())
h, mod = divmod(S,3600)
m, mod = divmod(mod,60)
s = mod
print(h,m,s, sep=":")

Buggy python submission (verdict: Runtime Error):
S = int(input())
in = divmod(S,3600)
h = in[0] 
in = divmod(in[1],60)
m = in[0]
s = in[1]

Fixed submission:
S = int(input())
h, mod = divmod(S,3600)
m, mod = divmod(mod,60)
s = mod
print(h,m,s, sep=":")
Buggy python submission (verdict: Runtime Error):
a , b = [int(i) for i in intput()]
if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a=b")

Fixed submission:
a , b = [int(i) for i in input().split()]
if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")

Buggy python submission (verdict: Runtime Error):
a , b = [int(i) for i in intput()]
if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a = b")

Fixed submission:
a , b = [int(i) for i in input().split()]
if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")

Buggy python submission (verdict: Runtime Error):
a , b = [int(i) for i in intput().split()]
if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a = b")

Fixed submission:
a , b = [int(i) for i in input().split()]
if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")
Buggy python submission (verdict: Runtime Error):
a, b, c = [int(i) for i in intput().split()]
if a < b < c:
 print("Yes")
else: 
 print("No")

Fixed submission:
a, b, c = [int(i) for i in input().split()]
if a < b < c:
 print("Yes")
else:
 print("No")
Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in intput().split()]
" ".join(map(str,a.sort()))

Fixed submission:
a = [int(i) for i in input().split()]
a.sort()
print(a[0],a[1],a[2])

Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split()]
" ".join(map(str,a.sort()))

Fixed submission:
a = [int(i) for i in input().split()]
a.sort()
print(a[0],a[1],a[2])

Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().split()]
print(" ".join(sorted(a)))

Fixed submission:
a = [int(i) for i in input().split()]
a.sort()
print(a[0],a[1],a[2])