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

c = math.gcd(a,b)
ans = int(a*b/c)
print(ans)


Fixed submission:
import fractions
a,b = map(int,input().split())

c = fractions.gcd(a,b)
ans = int(a*b/c)
print(ans)

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

c = math.gcd(a,b)
ans = int(a*b/c)
print(ans)


Fixed submission:
import fractions
a,b = map(int,input().split())

c = fractions.gcd(a,b)
ans = int(a*b/c)
print(ans)
Buggy python submission (verdict: Runtime Error):
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "a,b,c = map(int,input().split())\n",
    "if a+b+c >= 22:\n",
    "    print('bust')\n",
    "else:\n",
    "    print('win')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}


Fixed submission:
a,b,c = map(int,input().split())
if a+b+c >= 22:
    print('bust')
else:
    print('win')
Buggy python submission (verdict: Runtime Error):
x = int(input())
s = str(x)
if x < 100:
    print(0)
s2s = ''.join(([s[-2],s[-1]]))
s2 = int(s2s)
# print(s2)

x1 = s2 // 5
# print(x1)
if s2 % 5 == 0:
    n = x1
else:
    n = x1+1
# print(n)
if 100*n > x:
    print(0)
else:
    print(1)


Fixed submission:
def solve():
    x = int(input())
    s = str(x)
    if x < 100:
        return print(0)
    s2s = ''.join(([s[-2],s[-1]]))
    s2 = int(s2s)
    # print(s2)

    x1 = s2 // 5
    # print(x1)
    if s2 % 5 == 0:
        n = x1
    else:
        n = x1+1
    # print(n)
    if 100*n > x:
        print(0)
    else:
        print(1)
solve()

Buggy python submission (verdict: Runtime Error):
x = int(input())
s = str(x)
s2s = ''.join(([s[-2],s[-1]]))
s2 = int(s2s)
# print(s2)

x1 = s2 // 5
# print(x1)
if s2 % 5 == 0:
    n = x1
else:
    n = x1+1
# print(n)
if 100*n > x:
    print(0)
else:
    print(1)


Fixed submission:
def solve():
    x = int(input())
    s = str(x)
    if x < 100:
        return print(0)
    s2s = ''.join(([s[-2],s[-1]]))
    s2 = int(s2s)
    # print(s2)

    x1 = s2 // 5
    # print(x1)
    if s2 % 5 == 0:
        n = x1
    else:
        n = x1+1
    # print(n)
    if 100*n > x:
        print(0)
    else:
        print(1)
solve()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

c = 0
for i in range(10):
        for j in range(10):
            for k in range(10):
                count = 0
                for l in s:
                    if l == str(k) and count == 2:
                        count += 1
                    elif l == str(j) and count == 1:
                        count += 1
                    elif l == str(i) and count == 0:
                        count += 1
                    if count == 3:
                        c += 1
                        break

print(c)


Fixed submission:
n = int(input())
s = list(map(int,input()))

def nc(n,s,i,j,k):
    c1 = -1
    for l in range(n):
        if s[l] == i:
            c1 = l
            break
    if c1 == -1:
        return 0
    c2 = -1
    for l in range(c1+1,n):
        if s[l] == j:
            c2 = l
            break
    if c2 == -1:
        return 0
    c3 = -1
    for l in range(c2+1,n):
        if s[l] == k:
            c3 = l
            break
    if c3 == -1:
        return 0
    return 1

c = 0
for i in range(10):
        for j in range(10):
            for k in range(10):
                c += nc(n,s,i,j,k)



print(c)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

c = 0
for i in range(10):
        for j in range(10):
            for k in range(10):
                count = 0
                for l in s:
                    if l == str(k) and count == 2:
                        count += 1
                    if l == str(j) and count == 1:
                        count += 1
                    if l == str(i) and count == 0:
                        count += 1
                if count == 3:
                    c += 1
print(c)


Fixed submission:
n = int(input())
s = list(map(int,input()))

def nc(n,s,i,j,k):
    c1 = -1
    for l in range(n):
        if s[l] == i:
            c1 = l
            break
    if c1 == -1:
        return 0
    c2 = -1
    for l in range(c1+1,n):
        if s[l] == j:
            c2 = l
            break
    if c2 == -1:
        return 0
    c3 = -1
    for l in range(c2+1,n):
        if s[l] == k:
            c3 = l
            break
    if c3 == -1:
        return 0
    return 1

c = 0
for i in range(10):
        for j in range(10):
            for k in range(10):
                c += nc(n,s,i,j,k)



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

ans = 0
for i in range(1,10):
 n = (x - b*i)//a
 if 10**(i-1) <= n < 10**i:
  ans = n
 elif n>=10**i:
  ans=10**i-1
  
if x>=a*10**9+b*10:
 ans=10**9
print(ans) 

Fixed submission:
s = input()

m = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}

print(m[s])

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

ans = 0
for i in range(1,10):
　　n = (x - b*i)//a
　　if 10**(i-1) <= n < 10**i:
　　　　ans = n
　　elif n >= 10**i:
　　　  ans = 10**i - 1
  
if x >= a*10**9+b*10:
       ans =10**9
print(ans)

Fixed submission:
s = input()

m = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}

print(m[s])
Buggy python submission (verdict: Runtime Error):
lis = [ int(i) for i in input().split]
a = lis[0]
b = lis[1]
if b*2 > a:
  print(0)
else:
  print(a - b*2)

Fixed submission:
lis = [ int(i) for i in input().split()]
a = lis[0]
b = lis[1]
if b*2 > a:
  print(0)
else:
  print(a - b*2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
lis = [int(i) for i in input().split()]
sum = 0
for i in range(n-1):
  for j in range(i+1,n):
    sum += i*J
print(sum)

Fixed submission:
n = int(input())
lis = [int(i) for i in input().split()]
sum = 0
for i in range(n-1):
  for j in range(i+1,n):
    sum += lis[i]*lis[j]
print(sum)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
lis = [int(e) for i in input().split()]

c = 0
for i in lis:
        if i >= e:
            c += 1
print(c)


Fixed submission:
n,k = map(int,input().split())
lis = [int(i) for i in input().split()]

c = 0
for i in lis:
        if i >= k:
            c += 1
print(c)

Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
lis = [int(e) for i in input().split()]
c = 0
for i in lis:
  if i >= k:
    c += 1
print(c)

Fixed submission:
n,k = map(int,input().split())
lis = [int(i) for i in input().split()]

c = 0
for i in lis:
        if i >= k:
            c += 1
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
l = []
for i in range(m):
    a,b = map(int,input().split())
    c = 0
    for j in map(int,input().split()):
        c += (1<<(j-1))
    l.append((c,a))

dp = dict()
tmp = [(0,0)]
while tmp != []:
    tmp2 = []
    for i in tmp:
        for j in l:
            if j[0] | i[0] != i[0]:
                ctmp = (j[0] | i[0] ,i[1] + j[1])
                if dp.get(ctmp[0],-1) == -1:
                    dp[ctmp[0]] = ctmp[1]
                    if ctmp[0] != 2**n - 1:
                        tmp2.append(ctmp)
                else:
                    if dp[ctmp[0]] > ctmp[1]:
                        dp[ctmp[0]] = ctmp[1]
                        if ctmp[0] != 2**n - 1:
                            tmp2.append(ctmp)                
    tmp = tmp2

print(dp.get(2**n-1,-1))


Fixed submission:
n,m = map(int,input().split())
l = []
for i in range(m):
    a,b = map(int,input().split())
    c = 0
    for j in map(int,input().split()):
        c += (1<<(j-1))
    l.append((c,a))
dp = {0:0}
for i in l:
    items = list(dp.items())
    for j in items:
        ij = (i[0] | j[0], i[1] + j[1])
        if not dp.get(ij[0]):
            dp[ij[0]] = ij[1]
        else:
            if dp[ij[0]] > ij[1]:
                dp[ij[0]] = ij[1]

print(dp.get(2**n-1,-1))

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
l = []
for i in range(m):
    a,b = map(int,input().split())
    c = 0
    for j in map(int,input().split()):
        c += (1<<(j-1))
    l.append((c,a))

dp = dict()
tmp = [(0,0)]
while tmp != []:
    tmp2 = []
    for i in tmp:
        for j in l:
            if j[0] | i[0] != i[0]:
                ctmp = (j[0] | i[0] ,i[1] + j[1])
                if dp.get(ctmp[0],-1) == -1:
                    dp[ctmp[0]] = ctmp[1]
                    if ctmp[0] != 2**n - 1:
                        tmp2.append(ctmp)
                else:
                    if dp[ctmp[0]] > ctmp[1]:
                        dp[ctmp[0]] = ctmp[1]
                    if ctmp[0] != 2**n - 1:
                        tmp2.append(ctmp)
    tmp = tmp2

print(dp.get(2**n-1,-1))


Fixed submission:
n,m = map(int,input().split())
l = []
for i in range(m):
    a,b = map(int,input().split())
    c = 0
    for j in map(int,input().split()):
        c += (1<<(j-1))
    l.append((c,a))
dp = {0:0}
for i in l:
    items = list(dp.items())
    for j in items:
        ij = (i[0] | j[0], i[1] + j[1])
        if not dp.get(ij[0]):
            dp[ij[0]] = ij[1]
        else:
            if dp[ij[0]] > ij[1]:
                dp[ij[0]] = ij[1]

print(dp.get(2**n-1,-1))
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
s = list(input())

l = 0
r = 0
count = 0
hcount = 0
score = 0
def sccount(s):
    l = 0
    r = 0
    count = 0
    score = 0
    for i in range(n):
        if s[i] == 'R':
            if r == 1:
                score += 1
            l = 0
            r = 1
        else:
            if l == 1:
                score += 1
            l = 1
            r = 0
    l = 0
    r = 0
    return score

if s[0] == 'L':
    for i in range(n):
        if s[i] == 'L':
            if r == 1 :
                count += 1
            l = 1
            r = 0
        else:
            l = 0
            r = 1
    if s[-1] == 'R':
        hcount = 1
else:
    for i in range(n):
        if s[i] == 'R':
            if l == 1 :
                count += 1
            l = 0
            r = 1
        else:
            l = 1
            r = 0
    if s[-1] == 'L':
        hcount = 1
score = sccount(s)
if count >= k:
    ans = score + k*2
elif count < k:
    ans = score + count*2 + hcount
print(ans)
# print(score,count,hcount)


Fixed submission:
n = int(input())
print(n**3)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
sum = 0
for i in range(n):
    sum += i

print(sum)


Fixed submission:
n = int(input())
if n % 2 == 0:
    sum = int(n/2)
    sum = sum *(n-1)

else:
    sum = int((n-1)/2)
    sum = sum * n

print(int(sum))
Buggy python submission (verdict: Runtime Error):
a,b = map(int,inpu().split())

ans = 0
if a < = 5:
    ans = 0
elif a < = 12:
    ans = b/2
else :
    ans = b
print(ans)


Fixed submission:
a,b = map(int,input().split())

ans = 0
if a <= 5:
    ans = 0
elif a <= 12:
    ans = b/2
else :
    ans = b
print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
l = []
for i in range(m):
    l.append(list(map(int,input().split())))
ls = set(range(1,n+1))
for i in l:
    ls = ls & set(range(i[0],i[1]+1))
print(len(ls))


Fixed submission:
n,m = map(int,input().split())
l = []
for i in range(m):
    l.append(list(map(int,input().split())))
ans = 0
lmax = 0
rmin = float('inf')
for i in l:
    if i[0]>lmax:
        lmax = i[0]
    if i[1]<rmin:
        rmin = i[1]
if lmax <= rmin:
    ans = rmin - lmax + 1
print(ans)
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
alis = [int(i) for i in input().split()]
bclis = []
for i in range(m):
    bclis.append(list(map(int,input().split())))
bclis.sort(key=lambda x:x[1],reverse=True)
alis.sort()
def ans(bclis,alis):
    count=0
    for i in bclis:
        for j in range(i[0]):
            if alis[count] >= i[1]:
                return alis
            else :
                alis[count] = i[1]
            count += 1
    return alis
# print(alis)
# print(bclis)
# print(ans(bclis,alis))
print(sum(ans(bclis,alis)))


Fixed submission:
n,m = map(int,input().split())
alis = [int(i) for i in input().split()]
bclis = []
for i in range(m):
    bclis.append(list(map(int,input().split())))
bclis.sort(key=lambda x:x[1],reverse=True)
alis.sort()
def ans(bclis,alis):
    count=0
    for i in bclis:
        for j in range(i[0]):
            if alis[count] >= i[1]:
                return alis
            else :
                alis[count] = i[1]
            count += 1
            if count == n:
                return alis
    return alis
# print(alis)
# print(bclis)
# print(ans(bclis,alis))
print(sum(ans(bclis,alis)))
Buggy python submission (verdict: Runtime Error):
n,m = list(map(int, input().split()))
s = [0 for i in range(n+1)]
t = [-1 for i in range(n+1)]
for i in range(m):
    x = int(input())
    s[x] = 1

def dx(r):
    global t
    if t[r]>=0:
        return t[r]
    x=0
    y=0
    #print(i)
    if s[r+1]==0 and r==n-2:
        return 2
    if s[r+1]==1 and r==n-2:
        return 1
    if r==n-1:
        return 1
    if r==n:
        return 0
    if s[r+1] == 0:
        x=dx(r+1)
    if s[r+2] == 0:
        y=dx(r+2)
    #print([i,x,y])
    t[r]=(x+y)%1000000007
    return (x+y)%1000000007

ans=dx(0)

print(ans)

Fixed submission:
import sys
sys.setrecursionlimit(10000000)
n,m = list(map(int, input().split()))
s = [0 for i in range(n+1)]
t = [-1 for i in range(n+1)]
for i in range(m):
    x = int(input())
    s[x] = 1

def dx(r):
    global t
    if t[r]>=0:
        return t[r]
    x=0
    y=0
    #print(i)
    if s[r+1]==0 and r==n-2:
        return 2
    if s[r+1]==1 and r==n-2:
        return 1
    if r==n-1:
        return 1
    if r==n:
        return 0
    if s[r+1] == 0:
        x=dx(r+1)
    if s[r+2] == 0:
        y=dx(r+2)
    #print([i,x,y])
    t[r]=(x+y)%1000000007
    return (x+y)%1000000007

ans=dx(0)

print(ans)

Buggy python submission (verdict: Runtime Error):
n,m = list(map(int, input().split()))
s = [0 for i in range(n+1)]
t = [-1 for i in range(n+1)]
for i in range(m):
    x = int(input())
    s[x] = 1

def dx(r):
    global t
    if t[r]>=0:
        return t[r]
    x=0
    y=0
    #print(i)
    if r==n-2:
        return 2
    if r==n-1:
        return 1
    if r==n:
        return 0
    if s[r+1] == 0:
        x=dx(r+1)
    if s[r+2] == 0:
        y=dx(r+2)
    #print([i,x,y])
    t[r]=(x+y)%1000000007
    return (x+y)%1000000007

ans=dx(0)

print(ans)

Fixed submission:
import sys
sys.setrecursionlimit(10000000)
n,m = list(map(int, input().split()))
s = [0 for i in range(n+1)]
t = [-1 for i in range(n+1)]
for i in range(m):
    x = int(input())
    s[x] = 1

def dx(r):
    global t
    if t[r]>=0:
        return t[r]
    x=0
    y=0
    #print(i)
    if s[r+1]==0 and r==n-2:
        return 2
    if s[r+1]==1 and r==n-2:
        return 1
    if r==n-1:
        return 1
    if r==n:
        return 0
    if s[r+1] == 0:
        x=dx(r+1)
    if s[r+2] == 0:
        y=dx(r+2)
    #print([i,x,y])
    t[r]=(x+y)%1000000007
    return (x+y)%1000000007

ans=dx(0)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Q = int(input())

def add_car(S,s,is_left,is_rev):
    if is_rev:
        is_left = not(is_left)
    if is_left:
        S = ''.join([s,S])
    else:
        S = ''.join([S,s])
    return S

is_rev = False
for q in range(Q):
    x = input().split(' ')
    if len(x) == 1:
        is_rev = not is_rev
    else:
        S = add_car(S,x[2],x[1]=='1',is_rev)

if is_rev:
    S = ''.join(list(reversed(S)))
print(S)

Fixed submission:
S = input()
S_h = ''
S_t = ''
Q = int(input())

def add_car(S_h,S_t,s,is_left,is_rev):
    if is_rev:
        is_left = not(is_left)
    if is_left:
        S_h = ''.join([S_h,s])
    else:
        S_t = ''.join([S_t,s])
    return S_h,S_t

is_rev = False
for q in range(Q):
    x = input().split(' ')
    if len(x) == 1:
        is_rev = not is_rev
    else:
        S_h,S_t = add_car(S_h,S_t,x[2],x[1]=='1',is_rev)

if is_rev:
    S_t = ''.join(list(reversed(S_t)))
    S = ''.join(list(reversed(S)))
    print(''.join([S_t,S,S_h]))
else:
    S_h = ''.join(list(reversed(S_h)))
    print(''.join([S_h,S,S_t]))

Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Q = int(input())

def add_car(S,s,is_left,is_rev):
    if is_rev:
        is_left = not(is_left)
    if is_left:
        S = s+S
    else:
        S = S+s
    return S

is_rev = False
for q in range(Q):
    x = input().split(' ')
    if len(x) == 1:
        is_rev = not is_rev
    else:
        S = add_car(S,x[2],x[1]=='1',is_rev)

if is_rev:
    S = ''.join(reversed([s for s in S]))
print(S)

Fixed submission:
S = input()
S_h = ''
S_t = ''
Q = int(input())

def add_car(S_h,S_t,s,is_left,is_rev):
    if is_rev:
        is_left = not(is_left)
    if is_left:
        S_h = ''.join([S_h,s])
    else:
        S_t = ''.join([S_t,s])
    return S_h,S_t

is_rev = False
for q in range(Q):
    x = input().split(' ')
    if len(x) == 1:
        is_rev = not is_rev
    else:
        S_h,S_t = add_car(S_h,S_t,x[2],x[1]=='1',is_rev)

if is_rev:
    S_t = ''.join(list(reversed(S_t)))
    S = ''.join(list(reversed(S)))
    print(''.join([S_t,S,S_h]))
else:
    S_h = ''.join(list(reversed(S_h)))
    print(''.join([S_h,S,S_t]))
Buggy python submission (verdict: Runtime Error):
x = input()
print(int(x/2)+1)

Fixed submission:
N = int(input())
print(int(N/2)+N%2)

Buggy python submission (verdict: Runtime Error):
x = input()
print(int(x/2))

Fixed submission:
N = int(input())
print(int(N/2)+N%2)
Buggy python submission (verdict: Time Limit Exceeded):
str = raw_input()
K = int(raw_input())

#print str, K,  len(str)

#dic = []
dic = set()

i = 1

while i <= len(str):
    idx = 0
    while True:
        head = idx
        tail = i + idx
        if tail > len(str):
            break
        else:
#            dic.append(str[head:tail])
            dic.add(str[head:tail])
            idx = idx + 1

    i = i + 1


#dic_set = list(set(dic))
#dic_set.sort()
#print dic_set

dic_set = list(dic)
dic_set.sort()


print dic_set[K-1]


Fixed submission:
#import time

str = raw_input()
K = int(raw_input())

#t_start = time.time()

#print str, K,  len(str)

#dic = []
dic = set()

i = 1

#while i <= len(str):
while i <= K:
    idx = 0
    while True:
        head = idx
        tail = i + idx
        if tail > len(str):
            break
        else:
#            dic.append(str[head:tail])
            dic.add(str[head:tail])
            idx = idx + 1

    i = i + 1


#dic_set = list(set(dic))
#dic_set.sort()
#print dic_set

dic_set = list(dic)
dic_set.sort()


print dic_set[K-1]
#print time.time() - t_start

Buggy python submission (verdict: Time Limit Exceeded):
str = raw_input()
K = int(raw_input())

#print str, K,  len(str)

dic = []

i = 1

while i <= len(str):
    idx = 0
    while True:
        head = idx
        tail = i + idx
        if tail > len(str):
            break
        else:
            dic.append(str[head:tail])
            idx = idx + 1

    i = i + 1


dic_set = list(set(dic))
dic_set.sort()
#print dic_set


print dic_set[K-1]


Fixed submission:
#import time

str = raw_input()
K = int(raw_input())

#t_start = time.time()

#print str, K,  len(str)

#dic = []
dic = set()

i = 1

#while i <= len(str):
while i <= K:
    idx = 0
    while True:
        head = idx
        tail = i + idx
        if tail > len(str):
            break
        else:
#            dic.append(str[head:tail])
            dic.add(str[head:tail])
            idx = idx + 1

    i = i + 1


#dic_set = list(set(dic))
#dic_set.sort()
#print dic_set

dic_set = list(dic)
dic_set.sort()


print dic_set[K-1]
#print time.time() - t_start
Buggy python submission (verdict: Runtime Error):
import sys

DBG_FLAG = 0

def p_dbg(str):
    if(DBG_FLAG == 1):
        sys.stdout.flush()
        print str

# 1st. get Num

Num = int(raw_input())

p_dbg('Num : ' + str(Num))

square_max = 1

# MEMORY OVER
# for i in range(1, Num):
#     tmp = i * i
#     p_dbg(str(i) + str(square_max))
#     if(tmp <= Num):
#         square_max = tmp
#     else:
#         break

i = 1
tmp = 1
while tmp < Num:
    p_dbg(str(i) + ':' + str(square_max))
    square_max = tmp
    tmp = i*i
    i = i+1

print square_max


Fixed submission:
import sys

DBG_FLAG = 0

def p_dbg(str):
    if(DBG_FLAG == 1):
        sys.stdout.flush()
        print str

def get_row():
    array = []
    txt = raw_input()

    for char in txt:
        array.append(char)

    return array

# defined & initial arrays
cells_top = []
cells_bottom = []

# get cells
cells_top = get_row()
cells_bottom = get_row()

p_dbg(cells_top)
p_dbg(cells_bottom)

# reverse
cells_top.reverse()

p_dbg(cells_top)

# Decision
if(cells_top == cells_bottom):
    print 'YES'
else:
    print 'NO'
Buggy python submission (verdict: Runtime Error):
import sys

DBG_FLAG = 0

def p_dbg(str):
    if(DBG_FLAG == 1):
        sys.stdout.flush()
        print str

# 1st. get Num

Num = int(raw_input())

p_dbg('Num : ' + str(Num))

square_max = 1

for i in range(1, Num):
    tmp = i * i
    p_dbg(str(i) + str(square_max))
    if(tmp <= Num):
        square_max = tmp
    else:
        break

print square_max


Fixed submission:
import sys

DBG_FLAG = 0

def p_dbg(str):
    if(DBG_FLAG == 1):
        sys.stdout.flush()
        print str

# 1st. get Num

Num = int(raw_input())

p_dbg('Num : ' + str(Num))

square_max = 1

# MEMORY OVER
# for i in range(1, Num):
#     tmp = i * i
#     p_dbg(str(i) + str(square_max))
#     if(tmp <= Num):
#         square_max = tmp
#     else:
#         break

i = 1
tmp = 1
while tmp <= Num:
    p_dbg(str(i) + ':' + str(square_max))
    square_max = tmp
    tmp = i*i
    i = i+1

print square_max
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c=int(a*b)
if c%2==1:
  print("Odd")
else:
  print("Even")

Fixed submission:
a,b=map(int,input().split())

print("Even" if a*b%2==0 else "Odd")

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c=(a*b)
if c%2==1:
  print("Odd")
else c%2==0:
  print("Even")

Fixed submission:
a,b=map(int,input().split())

print("Even" if a*b%2==0 else "Odd")
Buggy python submission (verdict: Runtime Error):
S=input()
print(S.count(1))

Fixed submission:
print(input().count("1"))
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input(.split()))

if a==b:
    print(c)
elif a==c:
    print(b)
else:
    print(a)

Fixed submission:
a,b,c=map(int,input().split())

if a==b:
    print(c)
elif a==c:
    print(b)
else:
    print(a)
Buggy python submission (verdict: Runtime Error):
a,b=input()
LIST=[a,b]
if "9" in LIST:
  print("Yes")
else:
  print("No)


Fixed submission:
a=input()

if "9" in a:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a,b=input().split()
LIST=[a,b]
if "9" in LIST:
  print("Yes")
else:
  print("No)

Fixed submission:
a=input()

if "9" in a:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a=int(input())

print("Yes" if a[0]==a[2] else "No")

Fixed submission:
a=(input())

if a[0]==a[2]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
x,a,b=map(int,input().split())
 
if b-a<=o:
    print("delicious")
elif b-a<=x:
    print("safe")
else:
    print("dangerous")

Fixed submission:
x,a,b=map(int,input().split())
 
if b-a<=0:
    print("delicious")
elif b-a<=x:
    print("safe")
else:
    print("dangerous")
Buggy python submission (verdict: Runtime Error):
=int(input())

print(a*800-200*(a//15))

Fixed submission:
a=int(input())
 
print(a*800-200*(a//15))