Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):

n = int(input())
stl = []
for i in range(n):
    od, st = input().split()
    if od == 'insert':
        stl.append(st)
    else:
        if st in stl:
            print('yes')
        else:
            print('no')

Fixed submission:
n = int(input())
dic = set()

for i in range(n):
    o = input().split()
    if o[0] == 'insert':
        dic.add(o[1])
    elif o[1] in dic:
        print('yes')
    else:
        print('no')

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

dict = {}
l = []
line = map(lambda x: x.split(), sys.stdin.readlines())
s = ""
for (c, arg) in line:
    if c == "insert":
        dict[arg] = 0
    elif c == "find":
        if arg in dict:
            s += "yes\n"
        else:
            s += "no\n"
print(s, end="")

Fixed submission:
n = int(input())
dic = set()

for i in range(n):
    o = input().split()
    if o[0] == 'insert':
        dic.add(o[1])
    elif o[1] in dic:
        print('yes')
    else:
        print('no')

Buggy python submission (verdict: Runtime Error):
import sys
??
n = int(input())
dic = {}
input_ = sys.stdin.readlines()
??
for i in input_:
????????c, s = i.split()
????????if c == 'insert':
????????????????dic[s] = 0
????????else:
????????????????if s in dic:
????????????????????????print('yes')
????????????????else:
????????????????????????print('no')

Fixed submission:
n = int(input())
dic = set()

for i in range(n):
    o = input().split()
    if o[0] == 'insert':
        dic.add(o[1])
    elif o[1] in dic:
        print('yes')
    else:
        print('no')
Buggy python submission (verdict: Runtime Error):
x**3

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

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

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

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

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

Buggy python submission (verdict: Runtime Error):
x=raw_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=input()
print(x*x*x)

Fixed submission:
x = int(input())
print(x**3)
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, input().split())
print(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, input().split())
print(a*b,2*(a+b))
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = map(int, input().split())

print(n)
print(l[::-1])

Fixed submission:
input()
xs=reversed(input().split())
print(" ".join(xs))

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = map(int, input().split())
 
print (n)
print (l[::-1])

Fixed submission:
input()
xs=reversed(input().split())
print(" ".join(xs))

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = map(int, input().split())
 
print(l[::-1])

Fixed submission:
input()
xs=reversed(input().split())
print(" ".join(xs))

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = map(int, input().split())
print(l[::-1])

Fixed submission:
input()
xs=reversed(input().split())
print(" ".join(xs))

Buggy python submission (verdict: Runtime Error):
n = input()
a = map(int, raw_input().split())
for i in range(len(a)-1,-1,-1):
    print a[i],
    

Fixed submission:
input()
xs=reversed(input().split())
print(" ".join(xs))

Buggy python submission (verdict: Runtime Error):
n = input()
a = map(int, raw_input().split())
for i in range(len(a)-1,-1,-1):
    print a[i],
print ""

    

Fixed submission:
input()
xs=reversed(input().split())
print(" ".join(xs))
Buggy python submission (verdict: Runtime Error):
for i in range(1,10):
   for j in range(1,10):
      ans = i * j
      print('%dx%d=%D'%(i,j,k))

Fixed submission:
for i in range(1,10):
    for j in range(1,10):
        ans = i * j
        print('%dx%d=%d' % (i,j,ans))

Buggy python submission (verdict: Runtime Error):
for i in range(1,10):
   for j in range(1,10):
      ans = i * j
      print('%dx%d=%d' % (i,j,k))

Fixed submission:
for i in range(1,10):
    for j in range(1,10):
        ans = i * j
        print('%dx%d=%d' % (i,j,ans))
Buggy python submission (verdict: Runtime Error):
import sys

for line in sys.stdin:
    a,b,c = [int(x) for x in line.split()]
    if (a**2+b**2) == c**2:
        print('YES')
    else:
        print('NO')

Fixed submission:
import sys

for line in sys.stdin:
    try:
        a,b,c = [int(x) for x in line.split()]
        if (a**2+b**2) == c**2:
            print('YES')
        elif (a**2+c**2) == b**2:
            print('YES')
        elif (b**2+c**2) == a**2:
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

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

for line in sys.stdin:
   a,b,c = [int(x) for x in line.split()]
   if (a**2+b**2) == c**2:
      print('YES')
   else:
      print('NO')

Fixed submission:
import sys

for line in sys.stdin:
    try:
        a,b,c = [int(x) for x in line.split()]
        if (a**2+b**2) == c**2:
            print('YES')
        elif (a**2+c**2) == b**2:
            print('YES')
        elif (b**2+c**2) == a**2:
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

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

array = []

for line in sys.stdin:
    try:
        array = [int(x) for x in line.split()]
        array.sort()
        if array[2]**2 == (array[0]**2+array[1]**2):
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

Fixed submission:
import sys

for line in sys.stdin:
    try:
        a,b,c = [int(x) for x in line.split()]
        if (a**2+b**2) == c**2:
            print('YES')
        elif (a**2+c**2) == b**2:
            print('YES')
        elif (b**2+c**2) == a**2:
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

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

for line in sys.stdin:
    try:
        array = [int(x) for x in line.split()]
        array.sort()
        if array[2]**2 == (array[0]**2+array[1]**2):
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

Fixed submission:
import sys

for line in sys.stdin:
    try:
        a,b,c = [int(x) for x in line.split()]
        if (a**2+b**2) == c**2:
            print('YES')
        elif (a**2+c**2) == b**2:
            print('YES')
        elif (b**2+c**2) == a**2:
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

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

for line in sys.stdin:
   try:
      array = [int(x) for x in line.split()]
      array.sort()
      if array[2]**2 == (array[0]**2+array[1]**2):
         print('YES')
      else:
         print('NO')
   except(ValueError):
      continue

Fixed submission:
import sys

for line in sys.stdin:
    try:
        a,b,c = [int(x) for x in line.split()]
        if (a**2+b**2) == c**2:
            print('YES')
        elif (a**2+c**2) == b**2:
            print('YES')
        elif (b**2+c**2) == a**2:
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue
Buggy python submission (verdict: Runtime Error):
for line in sys.stdin:
    array = [float(x) for x in line.split()]
    ar1 = array[0:3]
    ar2 = array[3:]
    i = ar1[0]
    ar1 = [x*ar2[0] for x in ar1]
    ar2 = [x*i for x in ar2]
    y = (ar1[2] - ar2[2])/(ar1[1]-ar2[1])
    ar1 = array[0:3]
    x = (ar1[2]-ar1[1]*y)/ar1[0]
    print('%.3f %.3f' % (round(x,3), round(y,3)))

Fixed submission:
import sys

for line in sys.stdin:
    array = [float(x) for x in line.split()]
    ar1 = array[0:3]
    ar2 = array[3:]
    i = ar1[0]
    ar1 = [x*ar2[0] for x in ar1]
    ar2 = [x*i for x in ar2]
    y = (ar1[2] - ar2[2])/(ar1[1]-ar2[1])
    ar1 = array[0:3]
    x = (ar1[2]-ar1[1]*y)/ar1[0]
    print('%.3f %.3f' % (round(x,3), round(y,3)))
Buggy python submission (verdict: Time Limit Exceeded):
import sys

temp = []
largest = 1

for line in sys.stdin:
    a,b = [int(x) for x in line.split()]
    if a > b:
        x,y = a,b
    else:
        x,y = b,a
    i = x
    while i > 1:
        if (x % i) == 0 and (y % i) == 0:
            x = x / i
            y = y / i
            largest *= i
        i -= 1
    smallest = largest * (a/largest) * (b/largest)
    print('%d %d' % (largest, smallest))
    largest = 1

Fixed submission:
import sys

temp = []
largest = 1

for line in sys.stdin:
    a,b = [int(x) for x in line.split()]
    if a > b:
        x,y = a,b
    else:
        x,y = b,a
    while y:
        x,y = y,x%y
    smallest = x * (a/x) * (b/x)
    print('%d %d' % (x, smallest))
Buggy python submission (verdict: Runtime Error):
#coding:UTF-8
def QQ():
    for i in range(1,10):
        for j in range(1,10):
            print(str(i)+"x"+str(j)+"="str(i*j))

if __name__=="__main__":
    QQ()

Fixed submission:
#coding:UTF-8
def QQ():
    for i in range(1,10):
        for j in range(1,10):
            print(str(i)+"x"+str(j)+"="+str(i*j))
 
if __name__=="__main__":
    QQ()

Buggy python submission (verdict: Runtime Error):
#coding:UTF-8
def QQ():
 for i in range(1,10):
  for j in range(1,10):
   print(str(i)+"x"+str(j)+"="str(i*j))
 
if __name__=="__main__":
 QQ()

Fixed submission:
#coding:UTF-8
def QQ():
    for i in range(1,10):
        for j in range(1,10):
            print(str(i)+"x"+str(j)+"="+str(i*j))
 
if __name__=="__main__":
    QQ()
Buggy python submission (verdict: Runtime Error):
#coding:UTF-8
def LoT(List):
    T1=T2=T3=List[0]
    B=0
    for i in range(1,len(List)):
        if List[i]>T1:
            T2=T1
            T1=List[i]
        if List[i]<T1 and List[i]>T2:
            T3=T2
            T2=List[i]
        if List[i]<T2 and List[i]>T3:
            T3=List[i]
    print(str(T1)+"\n"+str(T2)+"\n"+str(T3))
        
if __name__=="__main__":
    List=[]
    for i in range(10):
        List.append(int(input()))
    LoT(List

Fixed submission:
#coding:UTF-8
def LoT(List):
    List2=sorted(List)
    for i in range(3):
        print(List2[len(List)-1-i])
if __name__=="__main__":
    List=[]
    for i in range(10):
        List.append(int(input()))
    LoT(List)
Buggy python submission (verdict: Runtime Error):
#coding:UTF-8
def Rec(N,List):
    for i in range(N):
        a=int(List[i].split(" ")[0])
        b=int(List[i].split(" ")[1])
        c=int(List[i].split(" ")[2])
        if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO")
if __name__=="__main__":
    List=[]
    N=int(input())
    for i in range(N):
        List.append(input())
    Rec(N,List

Fixed submission:
#coding:UTF-8
def Rec(N,List):
    for i in range(N):
        a=int(List[i].split(" ")[0])
        b=int(List[i].split(" ")[1])
        c=int(List[i].split(" ")[2])
        if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO")

if __name__=="__main__":
    List=[]
    N=int(input())
    for i in range(N):
        List.append(input())
    Rec(N,List)
Buggy python submission (verdict: Time Limit Exceeded):
#coding:UTF-8
def FN(n):
    if n==0 or n==1:
        return 1
    else:
        ans=FN(n-1)+FN(n-2)
        return ans
if __name__=="__main__":
    n=int(input())
    ans=FN(n)
    print(ans)

Fixed submission:
#coding:UTF-8
def FN(n):
    if n==0 or n==1:
        F[n]=1
        return F[n]
    if F[n]!=None:
        return F[n]
    F[n]=FN(n-1)+FN(n-2)
    return F[n]

if __name__=="__main__":
    n=int(input())
    F=[None]*(n+1)
    ans=FN(n)
    print(ans)
Buggy python submission (verdict: Runtime Error):
#coding:UTF-8
def chain(p,n):
    m={}
    for i in range(1,n+1):
        m[i] = {i:0}
         
    for l in range(2,n+1):
        for i in range(1,n-l+2):
            j = i + l -1
            m[i][j] = float("inf")
            for k in range(i,j):
                m[i][j] = min(m[i][j],m[i][k]+m[k+1][j] + p[i-1]*p[k]*p[j])
    print(m[1][n])
    
def __name__=="__main__": 
    p={}
    n = int(input())
    for i in range(1,n+1):
        st = input()
        w = st.split()
        p[i-1] = int(w[0])
        p[i]   = int(w[1])
    chain(p,n)

Fixed submission:
#coding:UTF-8
def chain(p,n):
    m={}
    for i in range(1,n+1):
        m[i] = {i:0}
         
    for l in range(2,n+1):
        for i in range(1,n-l+2):
            j = i + l -1
            m[i][j] = float("inf")
            for k in range(i,j):
                m[i][j] = min(m[i][j],m[i][k]+m[k+1][j] + p[i-1]*p[k]*p[j])
    print(m[1][n])
    
if __name__=="__main__": 
    p={}
    n = int(input())
    for i in range(1,n+1):
        st = input()
        w = st.split()
        p[i-1] = int(w[0])
        p[i]   = int(w[1])
    chain(p,n)
Buggy python submission (verdict: Time Limit Exceeded):
#coding:UTF-8
def GCD(x,y):
    d=1
    if x > y:
        N=y
    else:
        N=x
    for i in range(1,N+1):
        if x%i==0 and y%i==0:
            d=i
    print(d)

if __name__=="__main__":
    a=input()
    x=int(a.split(" ")[0])
    y=int(a.split(" ")[1])
    GCD(x,y)

Fixed submission:
#coding:UTF-8
def GCD(x,y):
    d=0
    if x < y:
        d=y
        y=x
        x=d
    if y==0:
        print(x)
    else:
        GCD(y,x%y)
if __name__=="__main__":
    a=input()
    x=int(a.split(" ")[0])
    y=int(a.split(" ")[1])
    GCD(x,y)
Buggy python submission (verdict: Runtime Error):
#coding:UTF-8
def LS(n,S,q,T):
    count=0
    if n>q:
        for i in q:
            if T[i] in S:
                count+=1
    else:
        for i in n:
            if S[i] in T:
                count+=1
    print(count)
  
if __name__=="__main__":
    n=int(input())
    S=input().split(" ")
    q=int(input())
    T=input().split(" ")
    LS(n,S,q,T)

Fixed submission:
#coding:UTF-8
def LS(n,S,q,T):
    count=0
    if n>q:
        for i in range(q):
            if T[i] in S:
                count+=1
    else:
        for i in range(n):
            if S[i] in T:
                count+=1
    print(count)
  
if __name__=="__main__":
    n=int(input())
    S=input().split(" ")
    q=int(input())
    T=input().split(" ")
    LS(n,S,q,T)
Buggy python submission (verdict: Runtime Error):
30
0 0 0 0 2 3 3 3 4 5 6 7 8 8 8 9 9 9 10 11 11 12 12 12 12 13 13 7000000 500000000 1000000000
16
2 0 5 11 3 16 4 6 1 10 7 14 15 7000000 9 5555555

Fixed submission:
#coding:UTF-8
def BS(n,S,q,T):
    count=0
    for i in range(q):
        left=0
        right=n
        while left < right:
            mid=int((left+right)/2)
            if S[mid]==T[i]:
                count+=1
                break
            elif T[i]<S[mid]:
                right=mid
            else:
                left=mid+1
        
    print(count)
  
if __name__=="__main__":
    n=int(input())
    S=input().split(" ")
    for i in range(n):
        S[i]=int(S[i])
    q=int(input())
    T=input().split(" ")
    for i in range(q):
        T[i]=int(T[i])
    BS(n,S,q,T)
Buggy python submission (verdict: Time Limit Exceeded):
#coding:UTF-8
def NI(A):
    cnt=0
    for i in range(len(A)):
        for j in reversed(range(i+1,len(A))):
            if A[j]<A[j-1]:
                swap=A[j]
                A[j]=A[j-1]
                A[j-1]=swap
                cnt+=1
    print(cnt)
    
if __name__=="__main__":
    n=int(input())
    A=input().split(" ")
    for i in range(n):
        A[i]=int(A[i])
    NI(A)

Fixed submission:
 #coding:UTF-8
def Marge(A,left,mid,right):
    n1=mid-left
    n2=right-mid
    L=[]
    R=[]
    c=0
    for i in range(n1):
        L.append(A[left+i])
    for i in range(n2):
        R.append(A[mid+i])
    L.append(100000000000000000)
    R.append(100000000000000000)
    i=j=0
    for k in range(left,right):
        if L[i]<=R[j]:
            A[k]=L[i]
            i+=1
        else:
            A[k]=R[j]
            j+=1
            c+=n1-i
    return c
            
def MS(A,left,right,c):
    
    if left+1<right:
        mid=int((left+right)/2)
        c1=MS(A,left,mid,c)
        c2=MS(A,mid,right,c)
        c3=Marge(A,left,mid,right)
        return c1+c2+c3
    return 0
 
    
if __name__=="__main__":
    n=int(input())
    A=input().split(" ")
    cnt=0
    for i in range(n):
        A[i]=int(A[i])
    cnt=MS(A,0,n,0)
    print(cnt)
Buggy python submission (verdict: Runtime Error):
#coding:UTF-8

def RoT(A,B,ans):
    if A:
        root=A[0]
        rindex=B.index(root)
        Aleft=A[1:rindex+1]
        Aright=A[rindex+1:]
        Bleft=B[:rindex]
        Bright=B[rindex:]
        RoT(Aleft,Bleft,ans)
        RoT(Aright,Bright,ans)
        ans.append(root)
        
        


if __name__=="__main__":
    n=int(input())
    A=input().split(" ")
    B=input().split(" ")
    ans=[]
    RoT(A,B,ans)
    print(" ".join(ans))

Fixed submission:
#coding:UTF-8

def RoT(A,B,ans):
    if A:
        root=A[0]
        rindex=B.index(root)
        Aleft=A[1:rindex+1]
        Aright=A[rindex+1:]
        Bleft=B[:rindex]
        Bright=B[rindex+1:]
        RoT(Aleft,Bleft,ans)
        RoT(Aright,Bright,ans)
        ans.append(root)
        
        


if __name__=="__main__":
    n=int(input())
    A=input().split(" ")
    B=input().split(" ")
    ans=[]
    RoT(A,B,ans)
    print(" ".join(ans))
Buggy python submission (verdict: Runtime Error):
#coding: UTF-8

def Rectangle_Area(a,b):
    return a*b

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

if __name__=="__main__":
    a = input()
    b = input()
    area = Rectangle_Area(int(a),int(b))
    length = Rectangle_Length(int(a),int(b))
    print(area,length)

Fixed submission:
#coding: UTF-8

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

if __name__=="__main__":
    a = input().split(" ")
    area,length = Rectangle(int(a[0]),int(a[1]))
    print(area,length)

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

def Rectangle_Area(a,b):
    return a*b

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

if __name__=="__main__":
    a = input()
    b = input()
    area = Rectangle_Area(int(a),int(b))
    length = Rectangle_Length(int(a),int(b))
    print(area,length)

Fixed submission:
#coding: UTF-8

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

if __name__=="__main__":
    a = input().split(" ")
    area,length = Rectangle(int(a[0]),int(a[1]))
    print(area,length)

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

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

if __name__=="__main__":
    a = input()
    b = input()
    area,length = Rectangle(int(a),int(b))
    print(area,length)

Fixed submission:
#coding: UTF-8

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

if __name__=="__main__":
    a = input().split(" ")
    area,length = Rectangle(int(a[0]),int(a[1]))
    print(area,length)

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

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

if __name__=="__main__":
    a = input()
    b = input()
    area,length = Rectangle(int(a),int(b))
    print(area,length)

Fixed submission:
#coding: UTF-8

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

if __name__=="__main__":
    a = input().split(" ")
    area,length = Rectangle(int(a[0]),int(a[1]))
    print(area,length)
Buggy python submission (verdict: Runtime Error):
#coding: UTF-8
import math

def Circle_Area(r):
    print(format(r*r*math.pi,'.6f'),format(2*r*math.pi,'.6f'))

if __name__=="__main__":
    Circle_Area(int(input()))

Fixed submission:
#coding: UTF-8
import math

def Circle_Area(r):
    print(format(r*r*math.pi,'.6f'),format(2*r*math.pi,'.6f'))

if __name__=="__main__":
    Circle_Area(float(input()))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
sum=a+b
sum=str(sum)
print(len(sum))

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

Buggy python submission (verdict: Runtime Error):
while True:
    a,b=map(int,input().split())
    sum=str(a+b)
    print(len(sum))

Fixed submission:
while True:
    try:
        a,b=map(int,input().split())
    except:
        break
    sum=str(a+b)
    print(len(sum))
Buggy python submission (verdict: Runtime Error):
import sys
i=0
while True:
    x=sys.stdin.readline().strip()
    if x==0:
        break
    print("Case %d: %d"%(i+1,x))
    i+=1

Fixed submission:
import sys
i=1
while True:
    x=sys.stdin.readline().strip()
    if x=="0":
        break
    print("Case %d: %s"%(i,x))
    i+=1

Buggy python submission (verdict: Runtime Error):
import sys
i=0
while True:
    x=sys.stdin.readline().strip()
    if x=="0":
        break
    print("Case %d: %d"%(i+1,x))
    i+=1

Fixed submission:
import sys
i=1
while True:
    x=sys.stdin.readline().strip()
    if x=="0":
        break
    print("Case %d: %s"%(i,x))
    i+=1

Buggy python submission (verdict: Runtime Error):
import sys
i=0
while True:
    x=sys.stdin.readline().strip()
    if x=="0":
        break;
    print("Case %d: %d"%(i+1,x))
    i+=1

Fixed submission:
import sys
i=1
while True:
    x=sys.stdin.readline().strip()
    if x=="0":
        break
    print("Case %d: %s"%(i,x))
    i+=1

Buggy python submission (verdict: Runtime Error):
import sys
i=0
while True:
    x=sys.stdin.readline().strip()
    if x=="0":
        break;
    print("Case %d: %d"%(i+1,x))
    i+=1

Fixed submission:
import sys
i=1
while True:
    x=sys.stdin.readline().strip()
    if x=="0":
        break
    print("Case %d: %s"%(i,x))
    i+=1

Buggy python submission (verdict: Time Limit Exceeded):
import sys
i=1
while True:
    x=sys.stdin.readline().strip()
    if x==0:
        break
    print("Case %d: %s"%(i,x))
    i+=1

Fixed submission:
import sys
i=1
while True:
    x=sys.stdin.readline().strip()
    if x=="0":
        break
    print("Case %d: %s"%(i,x))
    i+=1

Buggy python submission (verdict: Time Limit Exceeded):
import sys
i=1
while True:
    x=sys.stdin.readline().strip()
    if x==0:
        break
    print("Case %d: %s"%(i,x))
    i+=1

Fixed submission:
import sys
i=1
while True:
    x=sys.stdin.readline().strip()
    if x=="0":
        break
    print("Case %d: %s"%(i,x))
    i+=1
Buggy python submission (verdict: Runtime Error):
while True:
 a,b=[int(i) in input().split()]
 print(len(a+b))

Fixed submission:
while True:
 try:
  x,y=[int(i) for i in input().split()]
  print(len(str(x+y)))
 except EOFError:
  break

Buggy python submission (verdict: Runtime Error):
while True:
 a,b=[int(i) for i in input().split()]
 if a==False:
  break
 print(len(a+b))

Fixed submission:
while True:
 try:
  x,y=[int(i) for i in input().split()]
  print(len(str(x+y)))
 except EOFError:
  break

Buggy python submission (verdict: Runtime Error):
import sys
input_lines=sys.stdin.readlines()
for line in input_lines:
 x,y=[int(i) for i in line]
 print(len(str(x+y)))

Fixed submission:
while True:
 try:
  x,y=[int(i) for i in input().split()]
  print(len(str(x+y)))
 except EOFError:
  break

Buggy python submission (verdict: Runtime Error):
import sys
input_lines=sys.stdin.readlines()
for line in input_lines:
 x=[int(i) for i in line]
 print(len(str(x[0]+x[1])))

Fixed submission:
while True:
 try:
  x,y=[int(i) for i in input().split()]
  print(len(str(x+y)))
 except EOFError:
  break
Buggy python submission (verdict: Runtime Error):
while True:
	n = int(input())
	counter = 0
	for a in range(10):
		for b in range(10):
			for c in range(10):
				for d in range(10):
					if a + b + c + d == n:
						counter += 1
	print(counter)

Fixed submission:
import sys
dataset = sys.stdin.readlines()
for n in dataset:
	n = int(n)
	counter = 0
	for a in range(10):
		for b in range(10):
			for c in range(10):
				for d in range(10):
					if a + b + c + d == n:
						counter += 1
	print(counter)