Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
(n, m, q) = map(int, input().split(" "))

ns = [[0 for _ in range(n + 1)]for _ in range(n + 1)]

for i in range(m):
    (l, r) = map(int, input().split(" "))
    ns[l][r] += 1

for i in range(q):
    count = 0
    (ql, qr) = map(int, input().split(" "))
    for j in range(ql, qr + 1):
        for k in range(j, qr + 1):
            count += ns[j][k]
    print(count)

Fixed submission:
(n, m, q) = map(int, input().split(" "))

ns = [[0 for _ in range(n + 1)]for _ in range(n + 1)]

for i in range(m):
    (l, r) = map(int, input().split(" "))
    ns[l][r] += 1

for i in range(1, n + 1):
    for j in range(i, n + 1):
        ns[i][j] += ns[i][j - 1]
for j in range(1, n + 1):
    for i in range(1, j + 1):
        ns[i][j] += ns[i - 1][j]

for i in range(q):
    count = 0
    (l, r) = map(int, input().split(" "))
    print(ns[r][r] - ns[l - 1][r])
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
s = list(input())
mod = 1000000007
c = [1] + [0] * 3
for i in s:
    if i == 'A':
        c[1] = (c[1] + c[0]) % mod
    elif i == 'B':
        c[2] = (c[2] + c[1]) % mod
    elif i == 'C':
        c[3] = (c[3] + c[2]) % mod
    else:
        c[3] = (c[3] * 3 + c[2]) % mod
        c[2] = (c[2] * 3 + c[1]) % mod
        c[1] = (c[1] * 3 + c[0]) % mod
        c[0] *= 3
print(c[3])

Fixed submission:
import numpy as np
s = list(input())
count = np.array([1] + [0] * 3).astype("int64")
for i in s:
    if i == 'A':
        count[1] += count[0]
    elif i == 'B':
        count[2] += count[1]
    elif i == 'C':
        count[3] += count[2]
    else:
        count[3] = count[3] * 3 + count[2]
        count[2] = count[2] * 3 + count[1]
        count[1] = count[1] * 3 + count[0]
        count[0] *= 3
    count %= 1000000007
print(count[3])
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
k = int(input())

list = {}

for i in range(len(s)):
    for j in range(i + 1,len(s) + 1):
        if(s[i:j] not in list):
            list[s[i:j]] = 0

keys = sorted(list.keys())

print(keys[k - 1])

Fixed submission:
s = input()
k = int(input())

list = {}

for i in range(len(s)):
    for j in range(i + 1,i + 6):
        if(s[i:j] not in list):
            list[s[i:j]] = 0

keys = sorted(list.keys())

print(keys[k - 1])
Buggy python submission (verdict: Time Limit Exceeded):
import itertools as itr
n = int(input())
a = list(map(int, input().split()))
itra = list(itr.accumulate(a))
ans_c = itra.count(0)
seta = set(itra)
for i in seta:
    tmp_c = itra.count(i)
    ans_c += tmp_c * (tmp_c - 1) // 2
print(ans_c)

Fixed submission:
import itertools as itr
n = int(input())
a = list(map(int, input().split()))
itra = list(itr.accumulate(a))
ans_c = itra.count(0)
dev = {}
for i in itra:
    if i in dev:
        dev[i] += 1
    else:
        dev[i] = 1
for i in dev:
    ans_c += dev[i] * (dev[i] - 1) // 2
print(ans_c)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
x = list(map(int, input().split()))

c = (n - 1) // 2

for i in range(len(x)):
    x2 = x.copy()
    x2.pop(i)
    x2.sort()
    print(x2[c])


Fixed submission:
n = int(input())
x = list(map(int, input().split()))

x2 = x.copy()
x2.sort()
c1 = x2[n // 2 - 1]
c2 = x2[n // 2]
for i in x:
    if(c1 >= i):
        print(c2)
    else:
        print(c1)
Buggy python submission (verdict: Runtime Error):
import sys
s = input() + chr(96)

if len(s) != 26:
    sets = set(s)
    for i in range(ord('a'), ord('z') + 1):
        if chr(i) not in sets:
            print(s[:j] + chr(i))
            sys.exit(0)
j = 26
for j in range(26, 1, -1):
    if s[j - 1] > s[j]:
        continue
    sets = set(list(s[:j]))
    for i in range(ord(s[j]) + 1, ord('z') + 1):
        if chr(i) not in sets:
            print(s[:j] + chr(i))
            sys.exit(0)
print(-1)

Fixed submission:
import sys
s = input() + chr(96)

for j in range(len(s) - 1, -1, -1):
    sets = set(list(s[:j]))
    for i in range(ord(s[j]) + 1, ord('z') + 1):
        if chr(i) not in sets:
            print(s[:j] + chr(i))
            sys.exit(0)
print(-1)
Buggy python submission (verdict: Runtime Error):
(n, m) = map(int, input().split())
if n == 1:
    if m == 1:
        print(1):
    else:
        print(m - 2)
else:
    print((n-2)*(m-2))

Fixed submission:
(n, m) = map(int, input().split())
if n == 1:
    if m == 1:
        print(1)
    else:
        print(m - 2)
elif m == 1:
    print(n - 2)
else:
    print((n-2)*(m-2))

Buggy python submission (verdict: Time Limit Exceeded):
(n, m) = map(int, input().split())
s = []
s.append([0 for _ in range(m + 2)])
for _ in range(n):
    s.append([0] + [1 for _ in range(m)] + [0])
s.append([0 for _ in range(m + 2)])

sans = [[0 for _ in range(m + 2)] for _ in range(n + 2)]

for i in range(1, n + 1):
    for j in range(1, m + 1):
        sans[i][j] = (\
        s[i + 1][j + 1]+ \
        s[i + 1][j]+ \
        s[i + 1][j - 1]+ \
        s[i][j + 1]+ \
        s[i][j] + \
        s[i][j - 1]+ \
        s[i - 1][j + 1]+ \
        s[i - 1][j]+ \
        s[i - 1][j - 1]) % 2

sums = 0
for i in range(len(sans)):
    sums += sum(sans[i])
print(sums)

Fixed submission:
(n, m) = map(int, input().split())
if n == 1:
    if m == 1:
        print(1)
    else:
        print(m - 2)
elif m == 1:
    print(n - 2)
else:
    print((n-2)*(m-2))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
n = int(input())
a = list(map(int, input().split()))
mina =  100000000000000
for i in range(1, n):
    mina = min(mina, abs(sum(a[:i]) - sum(a[i:])))
print(mina)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
x = a[0]
y = sum(a[1:])
mina = abs(x - y)
for i in range(1, n - 1):
    x += a[i]
    y -= a[i]
    mina = min(mina, abs(x - y))
print(mina)
Buggy python submission (verdict: Runtime Error):
import collections, scipy.special 
n, p = map(int, input().split())
a = list(map(int, input().split()))

for i in range(n):
    a[i] %= 2
c = collections.Counter(a)
zero = c[0]
one = c[1]
ans = 0
if p == 0:
    s = 0
else:
    s = 1
for i in range(s, one + 1, 2):
    ans += 2 ** zero * scipy.special.comb(one, i, exact=True)

print(ans)

Fixed submission:
import collections, scipy.misc 
n, p = map(int, input().split())
a = list(map(int, input().split()))

for i in range(n):
    a[i] %= 2
c = collections.Counter(a)
zero = c[0]
one = c[1]
ans = 0
if p == 0:
    s = 0
else:
    s = 1
for i in range(s, one + 1, 2):
    ans += 2 ** zero * scipy.misc.comb(one, i, exact=True)

print(ans)

Buggy python submission (verdict: Runtime Error):
import collections, scipy.special 
n, p = map(int, input().split())
a = list(map(int, input().split()))

for i in range(n):
    a[i] %= 2
c = collections.Counter(a)
zero = c[0]
one = c[1]
ans = 0
if p == 0:
    s = 0
else:
    s = 1
for i in range(s, one, 2):
    ans += 2 ** zero * scipy.special.comb(one, i, exact=True)

print(ans)

Fixed submission:
import collections, scipy.misc 
n, p = map(int, input().split())
a = list(map(int, input().split()))

for i in range(n):
    a[i] %= 2
c = collections.Counter(a)
zero = c[0]
one = c[1]
ans = 0
if p == 0:
    s = 0
else:
    s = 1
for i in range(s, one + 1, 2):
    ans += 2 ** zero * scipy.misc.comb(one, i, exact=True)

print(ans)
Buggy python submission (verdict: Runtime Error):
for i in range(n):
    if a[i] < 400:
        mapa[1] += 1
    elif a[i] < 800:
        mapa[2] += 1
    elif a[i] < 1200:
        mapa[3] += 1
    elif a[i] < 1600:
        mapa[4] += 1
    elif a[i] < 2000:
        mapa[5] += 1
    elif a[i] < 2400:
        mapa[6] += 1
    elif a[i] < 2800:
        mapa[7] += 1
    elif a[i] < 3200:
        mapa[8] += 1
    else:
        el += 1
count = 0
for i in mapa:
    if mapa[i] > 0:
        count += 1
if count > 0:
    print(str(count) + ' ' + str(count + el))
else:
    print('1 ' + str(el))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
mapa = {1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0}
el = 0
for i in range(n):
    if a[i] < 400:
        mapa[1] += 1
    elif a[i] < 800:
        mapa[2] += 1
    elif a[i] < 1200:
        mapa[3] += 1
    elif a[i] < 1600:
        mapa[4] += 1
    elif a[i] < 2000:
        mapa[5] += 1
    elif a[i] < 2400:
        mapa[6] += 1
    elif a[i] < 2800:
        mapa[7] += 1
    elif a[i] < 3200:
        mapa[8] += 1
    else:
        el += 1
count = 0
for i in mapa:
    if mapa[i] > 0:
        count += 1
if count > 0:
    print(str(count) + ' ' + str(count + el))
else:
    print('1 ' + str(el))
Buggy python submission (verdict: Runtime Error):

def culc(a, sum, plus, ans):
    for i in range(1, n):
        plus = not(plus)
        sum += a[i]
        if plus:
            if sum <= 0:
                ans += abs(sum) + 1
                sum = 1
        else:
            if sum >= 0:
                ans += abs(sum) + 1
                sum = -1
    return ans

n = int(input())
a = list(map(int, input().split()))

plus = None
if a[0] > 0:
    plus = True
else:
    plus = False

ans1 = culc(a, a[0], plus, 0)

a[0] = a[0] // abs(a[0]) * -1

ans2 = abs(a[0]) + 1
ans2 = culc(a, a[0], not(plus), abs(a[0]) + 1)

print(min(ans1, ans2))

Fixed submission:

def culc(a, plus):
    sum = 0
    ans = 0
    for i in range(len(a)):
        sum += a[i]
        if plus:
            if sum <= 0:
                ans += abs(sum) + 1
                sum = 1
        else:
            if sum >= 0:
                ans += abs(sum) + 1
                sum = -1
        plus = not(plus)
    return ans

n = int(input())
a = list(map(int, input().split()))

plus = None
if a[0] >= 0:
    plus = True
else:
    plus = False

ans1 = culc(a, plus)
ans2 = culc(a, not(plus))

print(min(ans1, ans2))

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
sum = a[0]
plus = None
if a[0] > 0:
    plus = True
else:
    plus = False

ans1 = 0
for i in range(1, n):
    plus = not(plus)
    sum += a[i]
    if plus:
        if sum <= 0:
            ans1 += abs(sum) + 1
            sum = 1
    else:
        if sum >= 0:
            ans1 +=  abs(sum) + 1
            sum = -1

sum = 0
a[0] = a[0] // abs(a[0]) * -1
if a[0] > 0:
    plus = True
else:
    plus = False

ans2 = abs(a[0]) + 1
for i in range(1, n):
    plus = not(plus)
    sum += a[i]
    if plus:
        if sum <= 0:
            ans2 += abs(sum) + 1
            sum = 1
    else:
        if sum >= 0:
            ans2 +=  abs(sum) + 1
            sum = -1

print(min(ans1, ans2))

Fixed submission:

def culc(a, plus):
    sum = 0
    ans = 0
    for i in range(len(a)):
        sum += a[i]
        if plus:
            if sum <= 0:
                ans += abs(sum) + 1
                sum = 1
        else:
            if sum >= 0:
                ans += abs(sum) + 1
                sum = -1
        plus = not(plus)
    return ans

n = int(input())
a = list(map(int, input().split()))

plus = None
if a[0] >= 0:
    plus = True
else:
    plus = False

ans1 = culc(a, plus)
ans2 = culc(a, not(plus))

print(min(ans1, ans2))
Buggy python submission (verdict: Runtime Error):
import math
import sys
n = int(input())

insu = {}

sq = math.ceil(math.sqrt(n))
for i in range(1, sq + 1):
    if n % i == 0:
        insu[i] = 1
        insu[n // i] = 1

dct = sorted(insu.items())

for i in range(len(dct) // 2 + 1):
    if len(dct) - i * 2 <= 1:
        ans1 = dct[i][0]
        ans2 = dct[len(dct) - i][0]
        for i in range(1, 10):
            if ans2 // 10 == 0:
                print(i)
                break
            ans2 //= 10
        sys.exit(0)

Fixed submission:
import math
import sys
n = int(input())

if n == 1:
    print(1)
    sys.exit()

yakusu = []

sq = math.ceil(math.sqrt(n))
for i in range(1, sq + 1):
    if n % i == 0:
        yakusu.append(i)
        yakusu.append(n // i)

yakusu.sort()
for i in range(len(yakusu) // 2 + 1):
    if len(yakusu) - i * 2 <= 1:
        if len(yakusu) - i * 2 == 0:
            ans = yakusu[len(yakusu) - i]
        else:
            ans = yakusu[i]
        for j in range(1, 11):
            if ans // 10 == 0:
                print(j)
                break
            ans //= 10
        sys.exit(0)
Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <string>

using namespace std;

int main () {
    string S,T;
        cin >> S >> T;
        char X=T[T.length()-1];
        if (S+X==T){
            cout<<"Yes";
        }
        else
            cout<<"No";
    // enter your code here

    return 0;
}


Fixed submission:
S=input()
T=input()
if T==S+T[-1]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
x=[0]*n
for i in range(k):
    y=int(input())
    z=list(map(int,input().split()))
    for j in z:
        x[j-1] +=1
a=0
for b in x:
    if b==0:
        c+=1
print(c)

Fixed submission:
n,k=map(int,input().split())
x=[0]*n
for i in range(k):
    y=int(input())
    z=list(map(int,input().split()))
    for j in z:
        x[j-1] +=1
a=0
for b in x:
    if b==0:
        a+=1
print(a)
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
x=A[0]*N
for i in A:
    x[i-1]+=1
for j in x:
    print(j)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
x=[0]*N
for i in A:
    x[i-1]+=1
for j in x:
    print(j)
Buggy python submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
x=N//(A+B)
y=N%(A+B)
if y<A:
    print(x*A+y)
else:
    print(x*a+a)

Fixed submission:
N,A,B=map(int,input().split())
x=N//(A+B)
y=N%(A+B)
if y<A:
    print(x*A+y)
else:
    print(x*A+A)
Buggy python submission (verdict: Runtime Error):
H,A=map(int,input().split())
if H%A==0:
    print(H//A)
else:
    print((H/A,0)+1)

Fixed submission:
H,A=map(int,input().split())
if H%A==0:
    print(H//A)
else:
    print((H//A)+1)
Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <string>

using namespace std;

int main () {
   string S;
   cin>>S;
   int a=S.length(),x=0;
   for(int i=0;i<a;i++){
       if(S[i]!=S[a-i-1]);{
           x++;
       }
   }
   x=(x-(x%2))/2;
   cout<<x;
   return 0;   }


Fixed submission:
S = input()
x =0
for i in range(len(S)//2):
	if S[i]!=S[-i-1]:x+=1
print(x)
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A>(2*B):
    print(A-(2*B)
else:
    print(0)

Fixed submission:
A, B = map(int, input().split())
if A > (2 * B):
    print(A - (2 * B))
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
n = int(input())
x = list(map(int, input().split()))
a = []
for i in range(min(x), max(x)+1):
    ans = 0
    for p in x:
        ans += (p - i) ** 2
    a.append(ans)
print(min(a))

Fixed submission:
n,k,q = map(int,input().split())
a = [int(input()) for i in range(q)]
player_point = [q]*n
 
for i in range(q):
    player_point[a[i]-1] -= 1
 
for i in range(n):
    if player_point[i] < k:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
x,y = map(int,input().split())
a = []
n=int,input()
for i in range(n):
    b = list(map(int,input().split()))
    a.append(b[1:])
c = [i for i in range (1,m+1)]
for i in a:
    for j in range(m):
        if c[j] not in i:
            c[j]=0
print(m-c.count(0))

Fixed submission:
x,y = map(int,input().split())
a = list(map(int,input().split()))
b = set(a[1:])
for i in range(x-1):
    a = list(map(int,input().split()))
    b = b & set(a[1:])
print(len(b))
Buggy python submission (verdict: Runtime Error):
= int(input())
def f(x):
    if int(x) >N:
        return 0
    if x.count('3')>0 and x.count('5')>0 and x.count('7')>0:
        z = 1
    z=0
    z +=f(x+'3')
    z +=f(x+'5')
    z +=f(x+'7')
    return z
print(f('0'))

Fixed submission:
N= int(input())
def f(x):
    z=0
    if int(x) >N:
        return 0
    if x.count('3')>0 and x.count('5')>0 and x.count('7')>0:
        z = 1
    z +=f(x+'3')
    z +=f(x+'5')
    z +=f(x+'7')
    return z
print(f('0'))
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=int(input())
B=int(input())
if N==1:
    print('Hello World')
if N==2:
    print(A+B)

Fixed submission:
N=int(input())
if N==1:
    print('Hello World')
if N==2:
    A=int(input())
    B=int(input())
    print(A+B)
Buggy python submission (verdict: Runtime Error):
x = input()
y = 0
if x==1:
    print(1)
else:
    for a in range(2,33):
        for b in range (2,10):
            if b==2 and a**b>x:
                print(y)
            elif a**b<x:
                y=max(a**b,y)
                

Fixed submission:
x = int(input())
y = 0
if x==1 or x==2 or x==3:
    print(1)
    exit()
else:
    for a in range(2,(x+1)):
        for b in range (2,10):
            if b==2 and a**b>x:
                print(y)
                exit()
            elif a**b<=x:
                y=max(a**b,y)

Buggy python submission (verdict: Runtime Error):
x,y = map(int,input().split())
a = list(map(int,input().split()))
b = set(a[1:])
for i in range(x-1):
    a = list(map(int,input().split()))
    b = b & set(a[1:])
print(len(b))

Fixed submission:
x = int(input())
y = 0
if x==1 or x==2 or x==3:
    print(1)
    exit()
else:
    for a in range(2,(x+1)):
        for b in range (2,10):
            if b==2 and a**b>x:
                print(y)
                exit()
            elif a**b<=x:
                y=max(a**b,y)
Buggy python submission (verdict: Runtime Error):
x,y,z=input().split()
print(x[0]+y[1]+z[2])

Fixed submission:
x = input()
y = input()
z = input()
print(x[0]+y[1]+z[2])
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=[int(input()) for x in range(N)]
y=list()
for i in A:
    if i in y:
        y.remove(i)
    else:
        y.append(i)
print(len(y))


Fixed submission:
N=int(input())
A=[int(input()) for x in range(N)]
y=set()
for i in A:
    if i in y:
        y.remove(i)
    else:
        y.add(i)
print(len(y))

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=[int(input()) for x in range(N)]
y=set()
for i in A:
    if i in y:
        y.remove(i)
    else:
        y.append(i)
print(len(y))


Fixed submission:
N=int(input())
A=[int(input()) for x in range(N)]
y=set()
for i in A:
    if i in y:
        y.remove(i)
    else:
        y.add(i)
print(len(y))
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

if s[0:len(s)] == t[0:len(t)]:
  print("Yes")
eles:
    print("No")
  

Fixed submission:
s = input()
t = input()
 
if s[0:len(s)] == t[0:len(t)-1]:
  print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import math
print(int(input()*2*math.pi)

Fixed submission:
import math
print(int(input())*2*math.pi)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a<10:
  print(b+(100*(10-a))
else:
  print(b)

Fixed submission:
a,b=map(int,input().split())
if a<10:
  print(b+(100*(10-a)))
else:
  print(b)

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input())
if a<10:
  print(b+(100*(10-a)))
else:
  print(b)

Fixed submission:
a,b=map(int,input().split())
if a<10:
  print(b+(100*(10-a)))
else:
  print(b)

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input())
if a<10:
  print(b+(100*(10-a))
else:
  print(b)
        

Fixed submission:
a,b=map(int,input().split())
if a<10:
  print(b+(100*(10-a)))
else:
  print(b)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input())
if a==3:
  print(3-b)
elif b==3:
  print(3-a)
else:
  print(a+b)    
  

Fixed submission:
a=int(input())
b=int(input())
if a==3:
  print(3-b)
elif b==3:
  print(3-a)
else:
  print(3)
Buggy python submission (verdict: Runtime Error):
e=int(input())
sum=1
for i in e:
  sum*=i**e
print(sum)

Fixed submission:
print(int(input())**3)
Buggy python submission (verdict: Runtime Error):
print('red' if int(int(input())<3200 else input())

Fixed submission:
print('red' if int(input())<3200 else input())
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input())
l=[a+b,a-b,a*b]
print(max(l))

Fixed submission:
a,b=map(int,input().split())
l=[a+b,a-b,a*b]
print(max(l))
Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
print((a+b)//2 if (a+b)%2==0 else 'IMPSSIBLE')

Fixed submission:
a,b=map(int,input().split());print((a+b)//2 if (a+b)%2==0 else 'IMPOSSIBLE')

Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
print(a+b //2 if a+b % 2==0 else 'IMPSSIBLE')

Fixed submission:
a,b=map(int,input().split());print((a+b)//2 if (a+b)%2==0 else 'IMPOSSIBLE')
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input()).split()
print(c if c<=a*b else a*b)

Fixed submission:
a,b,c=map(int,input().split());print(c if c<=a*b else a*b)
Buggy python submission (verdict: Runtime Error):
n=input()
for i in range(len(n)):
  if n[i]==n[i+1]:
    print('Bad')
    exit()
  else:
    print('Good')
  

Fixed submission:
a,b,c,d=input();print(' GBoaodd'[a!=b!=c!=d::2])
Buggy python submission (verdict: Runtime Error):
a,p=map(int,input().split())
_a=a*3
print(int(sum(_a+p)//2))

Fixed submission:
a,p=map(int,input().split());print((a*3+p)//2)

Buggy python submission (verdict: Runtime Error):
a,p=map(int,input().split())
_a=a*3
print(sum(_a+p)/2)

Fixed submission:
a,p=map(int,input().split());print((a*3+p)//2)
Buggy python submission (verdict: Runtime Error):
a,b = input().split()
if a>b:
  print('>')
else if a<b:
  print('<')
else if a==b:
  print('=')

Fixed submission:
a,b = input().split()
if a>b:
  print('>')
elif a<b:
  print('<')
elif a==b:
  print('=')

Buggy python submission (verdict: Runtime Error):
a,b = input().split()
if hex(a)>hex(b):
  print('>')
else if hex(a)<hex(b):
  print('<')
else if hex(a)==hex(b):
  print('=')

Fixed submission:
a,b = input().split()
if a>b:
  print('>')
elif a<b:
  print('<')
elif a==b:
  print('=')
Buggy python submission (verdict: Runtime Error):
val= int(input())
return val^2

Fixed submission:
print(input()**2)

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

numofpoints= int(raw_input())
coords=[]
for index in range(numofpoints):
	x,y= map(int, raw_input.split())
    coords.append((x,y))
    
def factorial(n):
  	if n==0:
      return 1
    else:
		return n*factorial(n-1)

ave=0
c=0
for i in range(numofpoints):
  xi=coords[i][0]
  yi=coords[i][0]
	for j in range(i,numofpoints):
    	xj=coords[j][0]
  		yj=coords[j][0]
        	rij = ((xi-xj)**2 + (yi-yj)**2)**0.5
        ave = ave + rij
print sumofnum/math.factorial(numofpoints)



Fixed submission:
print(input()**2)

Buggy python submission (verdict: Runtime Error):
numofpoints= int(raw_input())
coords=[]
for index in range(numofpoints):
	x,y= map(int, raw_input.split())
    coords.append((x,y))
    
def factorial(n):
  	if n==0:
      return 1
    else:
		return n*factorial(n-1)

sumofnum=0
c=0
for i in range(numofpoints):
	for j in range(numofpoints):
    	if i!=j:
        	sumofnum+=((coords[i][0]-coords[j][0])**2+(coords[j][1]-coords[j][1])**2)**5
			c+=1
print "%.10f"%(sumofnum/c)

Fixed submission:
print(input()**2)