Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
q = int(input())
a_set = set(a)
a_dict = dict([(i, a.count(i))for i in a_set])
a_sum = sum(a)

for i in range(q):
    b,c = map(int,input().split())
    if not b in a_dict:
        print(a_sum)
        continue
    a_sum = a_sum - a_dict[b]*b + a_dict[b]*c
    if c in a_dict:
        a_dict[c] = a_dict[c] + a_dict[b]
    else:
        a_dict[c] = a_dict[b]
    a_dict[b] = 0
    print(a_sum)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
q = int(input())
a_dict = dict()
for i in a:
    if i in a_dict:
        a_dict[i] = a_dict[i] + 1
    else:
        a_dict[i] = 1
a_sum = sum(a)

for i in range(q):
    b,c = map(int,input().split())
    if not b in a_dict:
        print(a_sum)
        continue
    a_sum = a_sum - a_dict[b]*b + a_dict[b]*c
    if c in a_dict:
        a_dict[c] = a_dict[c] + a_dict[b]
    else:
        a_dict[c] = a_dict[b]
    a_dict[b] = 0
    print(a_sum)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
q = int(input())
a_sum = sum(a)

for i in range(q):
    b,c = map(int,input().split())
    co = 0
    for j in range(n):
        co = co + (a[j]==b)
        a[j] = c*(a[j]==b)+a[j]*(a[j]!=b)
    a_sum = a_sum - b*co + c*co
    print(a_sum)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
q = int(input())
a_dict = dict()
for i in a:
    if i in a_dict:
        a_dict[i] = a_dict[i] + 1
    else:
        a_dict[i] = 1
a_sum = sum(a)

for i in range(q):
    b,c = map(int,input().split())
    if not b in a_dict:
        print(a_sum)
        continue
    a_sum = a_sum - a_dict[b]*b + a_dict[b]*c
    if c in a_dict:
        a_dict[c] = a_dict[c] + a_dict[b]
    else:
        a_dict[c] = a_dict[b]
    a_dict[b] = 0
    print(a_sum)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
q = int(input())

for i in range(q):
    b,c = map(int,input().split())
    a = [c*(a[j]==b)+a[j]*(a[j]!=b) for j in range(n)]
    print(sum(a))

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
q = int(input())
a_dict = dict()
for i in a:
    if i in a_dict:
        a_dict[i] = a_dict[i] + 1
    else:
        a_dict[i] = 1
a_sum = sum(a)

for i in range(q):
    b,c = map(int,input().split())
    if not b in a_dict:
        print(a_sum)
        continue
    a_sum = a_sum - a_dict[b]*b + a_dict[b]*c
    if c in a_dict:
        a_dict[c] = a_dict[c] + a_dict[b]
    else:
        a_dict[c] = a_dict[b]
    a_dict[b] = 0
    print(a_sum)
Buggy python submission (verdict: Runtime Error):
from math import floor

def f(x,y,n):
  if x >= y:
    return x
  else:
    n += 1
    x += floor(x*0.01)
    return f(x,y,n)

x = int(input())
print(f(100,x,n))

Fixed submission:
from math import floor

y = int(input())
x = 100
n = 0
while x < y:
    x += floor(x * 0.01)
    n += 1

print(n)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
print(f"{c} {a} {b}")

Fixed submission:
a,b,c = map(int,input().split())
print("{} {} {}".format(c,a,b))
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
print("YNeos"[sum([sum(a)/(4*m)<a[i] for i in range(m+1)])<m::2])

Fixed submission:
n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
for i in range(m):
    if a[i] < sum(a)/(4*m):
        print("No")
        exit()
print("Yes")
Buggy python submission (verdict: Runtime Error):
h,w = map(int,s.split())
print(int(h/2+0.5)*w-(h%2)*int(w/2))

Fixed submission:
h,w = map(int,input().split())
print((int(h/2+0.5)*w-(h%2)*int(w/2))if(h-1)and(w-1)else 1)
Buggy python submission (verdict: Runtime Error):
print("Yes" if set(map(int,input().split())).len()==2 else "No")

Fixed submission:
print("Yes" if len(set(map(int,input().split())))==2 else "No")

Buggy python submission (verdict: Runtime Error):
print("YES" if set(map(int,input().split())).len()==2 else "NO")

Fixed submission:
print("Yes" if len(set(map(int,input().split())))==2 else "No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
ck = 10000000000
for b in range(0,max(A)):
    k = 0
    for i in range(0,N):
        k = k + abs(A[i] - (b+i+1))
    if k < ck:
        ck = k
    elif k >= ck:
        print(ck)
        break


Fixed submission:
N = int(input())
print(N if N%2 == 0 else N*2)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
for i in range(N,N*2+1):
    if i%N == 0 and i%2 == 0:
        print(i)
        break


Fixed submission:
N = int(input())
print(N if N%2 == 0 else N*2)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
n = 0
ans = 0
while n < N:
    sum = 0
    for a in A[n:]:
        sum = sum + a
        if sum == 0:
            ans = ans + 1
    n = n + 1
print(ans)

Fixed submission:
import collections

def comb2(n):
    return (n*(n-1))//2

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

ans = [0]*(n+1)
res = 0

for i in range(n):
    ans[i+1] = a[i]+ans[i]

col = collections.Counter(ans)

for i in col:
    res += comb2(col[i])

print(res)
Buggy python submission (verdict: Runtime Error):
x, y = int(input(),16), int(input(),16)
print("="if x==y else "<"if x<y else">")

Fixed submission:
def c(x):
  return int(x,16)

x, y = map(str,input().split())
x, y = c(x), c(y)
print("="if x==y else"<"if x<y else">")
Buggy python submission (verdict: Runtime Error):
print("ABC{0}".format(intput()))

Fixed submission:
print("ABC{0}".format(input()))
Buggy python submission (verdict: Time Limit Exceeded):
input()
l = list(map(int,input().split()))
s = 0
m = 1000000000000
for i in range(len(l)-1):
    s += l[i]
    if(m > abs(s-sum(l[i+1:]))):
        m = abs(s-sum(l[i+1:]))
print(m)

Fixed submission:
input()
l = list(map(int,input().split()))
tomato = sum(l)
s = 0
m = 1000000000000
for i in range(len(l)-1):
    s += l[i]
    if(m > abs(s-(tomato-s))):
        m = abs(s-(tomato-s))
print(m)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a, b = [0]*n,[0]*n
count = 0
for i in range(n):
    a[i],b[i] = map(int,input().split())

while(n > 0):
    if((a[n-1]+count)%b[n-1] == 0):
        n -= 1
    else:
        count += 1

print(count)

Fixed submission:
n = int(input())
a, b = [0]*n,[0]*n
count = 0
for i in range(n):
    a[i],b[i] = map(int,input().split())

while(n > 0):
    n -= 1
    count += (b[n] if (a[n]+count)%b[n]!=0 else 0)-(a[n]+count)%b[n]

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a, b = [0]*n,[0]*n
count = 0
plus = 0
for i in range(n):
    a[i],b[i] = map(int,input().split())

while(n > 0):
    if((a[n-1]+plus)%b[n-1] == 0):
        n -= 1
        continue
    plus+=1
    count += 1

print(count)

Fixed submission:
n = int(input())
a, b = [0]*n,[0]*n
count = 0
for i in range(n):
    a[i],b[i] = map(int,input().split())

while(n > 0):
    n -= 1
    count += (b[n] if (a[n]+count)%b[n]!=0 else 0)-(a[n]+count)%b[n]

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a, b = [0]*n,[0]*n
count = 0
for i in range(n):
    a[i],b[i] = map(int,input().split())

while(n > 0):
    if(a[n-1]%b[n-1] == 0):
        n -= 1
        continue
    for j in range(0,n):
        a[j] += 1
    count += 1

print(count)

Fixed submission:
n = int(input())
a, b = [0]*n,[0]*n
count = 0
for i in range(n):
    a[i],b[i] = map(int,input().split())

while(n > 0):
    n -= 1
    count += (b[n] if (a[n]+count)%b[n]!=0 else 0)-(a[n]+count)%b[n]

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n,m,k=map(int,input().split())
r=[0]*(n+1)
c=[0]*(m+1)
l=[]
for _ in range(k):
  a,b=map(int,input().split())
  l.append([a,b])
  r[a]+=1
  c[b]+=1
m1=max(r)
x=[]
for i in range(n+1):
  if(r[i]==m1):
    x.append(i)
m2=max(c)
y=[]
for i in range(m+1):
  if(c[i]==m2):
    y.append(i)
ans=m1+m2
z=0
for i in x:
  for j in y:
    if([i,j] not in l):
      z=-1
      break
if(z==0):
  print(ans-1)
else:
  print(ans)   
      

  

Fixed submission:
n,m,k=map(int,input().split())
m+=1
n+=1
r=[0]*(n)
c=[0]*(m)
d={}
for _ in range(k):
  a,b=map(int,input().split())
  d[(a,b)]=1
  r[a]+=1
  c[b]+=1
m1=max(r)
x=[]
for i in range(n):
  if(r[i]==m1):
    x.append(i)
m2=max(c)
y=[]
for i in range(m):
  if(c[i]==m2):
    y.append(i)
ans=m1+m2
z=0
for i in x:
  for j in y:
    if((i,j) not in  d):
      z=-1
      break
if(z==0):
  print(ans-1)
else:
  print(ans)
Buggy python submission (verdict: Runtime Error):
n=input()
print(n+n*n+n*n*n)

Fixed submission:
n=int(input())
print(n+n*n+n*n*n)
Buggy python submission (verdict: Runtime Error):
d,t,s = map(int,input()split(()))
if  t*s >= d:
    print("Yes")
else:
    print("No")

Fixed submission:
d,t,s = map(int,input().split())
if  t*s >= d:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n%9 = 0:
    print("Yes")
else:
    print("No")



Fixed submission:
n = int(input())
if n%9 == 0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())  
c = a*b
if c/2 = 0
print("Even")
elif c/2 = 1
print("Odd")

Fixed submission:
a, b = map(int, input().split())  
if (a*b) % 2:
    print("Odd")
else:
    print("Even")
Buggy python submission (verdict: Time Limit Exceeded):
cur = []

def recur(n):
    if n > 10 ** 18:
        return
    cur.append(n)
    for i in range(10):
        if abs(n % 10 - i) <= 1:
            recur(10 * n + i)

for i in range(1, 10):
    recur(i)
cur.sort()
n = int(input())
print((cur[n - 1]))

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

print(cur[2], cur[0], cur[1])
Buggy python submission (verdict: Time Limit Exceeded):
cur = []

def recur(n):
    if n > 10 ** 18:
        return
    cur.append(n)
    for i in range(10):
        if abs(n % 10 - i) <= 1:
            recur(10 * n + i)

for i in range(1, 10):
    recur(i)
cur.sort()
n = int(input())
print((cur[n - 1]))

Fixed submission:
cur = []

def recur(n):
    if n > 10 ** 10:
        return
    cur.append(n)
    for i in range(10):
        if abs(n % 10 - i) <= 1:
            recur(10 * n + i)

for i in range(1, 10):
    recur(i)
cur.sort()
n = int(input())
print((cur[n - 1]))

Buggy python submission (verdict: Runtime Error):
cur = []

def recur(n):
    if n > 10 ** 9:
        return
    cur.append(n)
    for i in range(10):
        if abs(n % 10 - i) <= 1:
            recur(10 * n + i)

for i in range(1, 10):
    recur(i)
cur.sort()
n = int(input())
print((cur[n - 1]))

Fixed submission:
cur = []

def recur(n):
    if n > 10 ** 10:
        return
    cur.append(n)
    for i in range(10):
        if abs(n % 10 - i) <= 1:
            recur(10 * n + i)

for i in range(1, 10):
    recur(i)
cur.sort()
n = int(input())
print((cur[n - 1]))
Buggy python submission (verdict: Runtime Error):
x, y, a, b, c = map(int, input().split())

red = list(map(int, input().split()))
green = list(map(int, input().split()))
colorless = list(map(int, input().split()))

red.sort(reverse = True)
green.sort(reverse = True)
colorless.sort(reverse = True)

ret = red[:x] + green[:y]
ret.sort()

for i in range(len(colorless)):
    if ret[i] < colorless[i]:
        ret[i] = colorless[i]

print(sum(ret))

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

red = list(map(int, input().split()))
green = list(map(int, input().split()))
colorless = list(map(int, input().split()))

red.sort(reverse = True)
green.sort(reverse = True)
colorless.sort(reverse = True)

ret = red[:x] + green[:y]
ret.sort()

for i in range(len(colorless)):
    if ret[i] < colorless[i]:
        ret[i] = colorless[i]
    else:
        break

print(sum(ret))
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

print(len(input()) * 'X)

Fixed submission:

s = str(input())
print(len(s) * "x")
Buggy python submission (verdict: Runtime Error):
import sys
import math
from math import gcd

input = sys.stdin.readline

def prime(n):
    primes = {}
    bound = int(math.sqrt(n)) + 1
    for i in range(2, bound):
        if n % i == 0:
            cnt = 0
            while n % i == 0:
                n //= i
                if not i in primes.keys():
                    primes[i] = 1
                else:
                    primes[i] += 1
    if n != 1:
        if not n in primes.keys():
            primes[n] = 1
        else:
            primes[n] += 1
    return primes

A, B = map(int, input().split())
g = gcd(A, B)
print(len(prime(g)) + 1)

Fixed submission:
import sys
import math
from fractions import gcd

input = sys.stdin.readline

def prime(n):
    primes = {}
    bound = int(math.sqrt(n)) + 1
    for i in range(2, bound):
        while n % i == 0:
            n //= i
            if not i in primes.keys():
                primes[i] = 1
            else:
                primes[i] += 1
    if n != 1:
        if n not in primes.keys():
            primes[n] = 1
        else:
            primes[n] += 1
    return primes

A, B = map(int, input().split())
g = gcd(A, B)
cur = prime(g)
print(len(cur) + 1)

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

input = sys.stdin.readline

def prime(n):
    primes = {}
    bound = int(math.sqrt(n)) + 1
    for i in range(2, bound):
        if n % i == 0:
            cnt = 0
            while n % i == 0:
                n //= i
                if not i in primes.keys():
                    primes[i] = 1
                else:
                    primes[i] += 1
    if n != 1:
        if not n in primes.keys():
            primes[n] = 1
        else:
            primes[n] += 1
    return primes

A, B = map(int, input().split())
g = gcd(A, B)
print(len(prime(g)) + 1)

Fixed submission:
import sys
import math
from fractions import gcd

input = sys.stdin.readline

def prime(n):
    primes = {}
    bound = int(math.sqrt(n)) + 1
    for i in range(2, bound):
        while n % i == 0:
            n //= i
            if not i in primes.keys():
                primes[i] = 1
            else:
                primes[i] += 1
    if n != 1:
        if n not in primes.keys():
            primes[n] = 1
        else:
            primes[n] += 1
    return primes

A, B = map(int, input().split())
g = gcd(A, B)
cur = prime(g)
print(len(cur) + 1)
Buggy python submission (verdict: Runtime Error):
n=int(input())
array=list(map(int,input().split()))
list2=[]
for i in range(n-1):
  for j in range(i+1,n):
    list2.append(array[i]*array[j])
a=n*(n-1)/2
ans=0
for m in range(a):
  ans=ans+list2[m]
  if ans>=10**9+7:
    ans=ans-(10**9+7)
print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=sum(a)*sum(a)
for i in range(n):
  ans-=a[i]*a[i]
ans//=2
mod=10**9+7
ans%=mod
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
array=list(map(int,input().split()))
list2=[]
for i in range(n):
  for j in range(i+1,n):
    list2.append(array[i]*array[j])
a=n*(n-1)/2
ans=0
for m in range(a):
  ans=ans+list2[m]
  if ans>=10**9+7:
    ans=ans-(10**9+7)
print(ans)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=sum(a)*sum(a)
for i in range(n):
  ans-=a[i]*a[i]
ans//=2
mod=10**9+7
ans%=mod
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
array=list(map(int,input().split()))
list2=[]
for i in range(n):
  for j in range(i+1,n):
    list2.append(array[i]*array[j])
a=n*(n-1)
ans=0
for m in range(a):
  ans=ans+list2[m]
  if ans>10**9+7:
    ans=ans-10**9+7
print(ans//10**9+7)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=sum(a)*sum(a)
for i in range(n):
  ans-=a[i]*a[i]
ans//=2
mod=10**9+7
ans%=mod
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int()
array=list(map(int,n))
a=sum(array)
if a%9==0:
  print('Yes')
else:
  print('No')

Fixed submission:
n=input()
array=list(map(int,n))
a=sum(array)
if a%9==0:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
X=input()
if X >= 30:
  print('Yes')
else:
  print('No')


Fixed submission:
X=int(input())
if X >= 30:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
X=input()
if X>=30:
  print('Yes')
else:
  print('No')

Fixed submission:
X=int(input())
if X >= 30:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
a=input()
if a>=30:
  print('Yes')
else:
  print('No')

Fixed submission:
X=int(input())
if X >= 30:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
a=int(input())
print(8) if 400<=a<=599
print(7) if 600<=a<=799
print(6) if 800<=a<=999
print(5) if 1000<=a<=1199
print(4) if 1200<=a<=1399
print(3) if 1400<=a<=1599
print(2) if 1600<=a<=1799
print(1) if 1800<=a<=1999

Fixed submission:
a=int(input())
if 400<=a<=599:
  print(8) 
if 600<=a<=799:
  print(7)
if 800<=a<=999:
  print(6)
if 1000<=a<=1199:
  print(5)
if 1200<=a<=1399:
  print(4)
if 1400<=a<=1599:
  print(3)
if 1600<=a<=1799:
  print(2)
if 1800<=a<=1999:
  print(1)

Buggy python submission (verdict: Runtime Error):
a=int(input())
print(8 if 400 <= a <= 599)
print(7 if 600 <= a <= 799)
print(6 if 800 <= a <= 999)
print(5 if 1000 <= a <= 1199)
print(4 if 1200 <= a <= 1399)
print(3 if 1400 <= a <= 1599)
print(2 if 1600 <= a <= 1799)
print(1 if 1800 <= a <= 1999)

Fixed submission:
a=int(input())
if 400<=a<=599:
  print(8) 
if 600<=a<=799:
  print(7)
if 800<=a<=999:
  print(6)
if 1000<=a<=1199:
  print(5)
if 1200<=a<=1399:
  print(4)
if 1400<=a<=1599:
  print(3)
if 1600<=a<=1799:
  print(2)
if 1800<=a<=1999:
  print(1)

Buggy python submission (verdict: Runtime Error):
a=int(input())
print('8' if 400 <= a <= 599)
print('7' if 600 <= a <= 799)
print('6' if 800 <= a <= 999)
print('5' if 1000 <= a <= 1199)
print('4' if 1200 <= a <= 1399)
print('3' if 1400 <= a <= 1599)
print('2' if 1600 <= a <= 1799)
print('1' if 1800 <= a <= 1999)

Fixed submission:
a=int(input())
if 400<=a<=599:
  print(8) 
if 600<=a<=799:
  print(7)
if 800<=a<=999:
  print(6)
if 1000<=a<=1199:
  print(5)
if 1200<=a<=1399:
  print(4)
if 1400<=a<=1599:
  print(3)
if 1600<=a<=1799:
  print(2)
if 1800<=a<=1999:
  print(1)

Buggy python submission (verdict: Runtime Error):
a=int(input())
print('8') if 400<=a<=599
print('7') if 600<=a<=799
print('6') if 800<=a<=999
print('5') if 1000<=a<=1199
print('4') if 1200<=a<=1399
print('3') if 1400<=a<=1599
print('2') if 1600<=a<=1799
print('1') if 1800<=a<=1999

Fixed submission:
a=int(input())
if 400<=a<=599:
  print(8) 
if 600<=a<=799:
  print(7)
if 800<=a<=999:
  print(6)
if 1000<=a<=1199:
  print(5)
if 1200<=a<=1399:
  print(4)
if 1400<=a<=1599:
  print(3)
if 1600<=a<=1799:
  print(2)
if 1800<=a<=1999:
  print(1)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
k=int(input())
B=b
for n in range(k):
  if a>b:
    b=b*2
  else:
    break
e=b/B
f=e//2
for m in range(k-f):
  if b>c:
    c=c*2
  else:
    break
if b>a and c>b:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c=map(int,input().split())
k=int(input())
for n in range(k):
  if a>=b:
    b=b*2
  elif b>=c:
    c=c*2
if b>a and c>b:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
k=int(input())
B=b
for n in range(k):
  if a>b:
    b=b*2
  else:
    break
e=b/B
for n in range(k-e):
  if b>c:
    c=c*2
  else:
    break
if b>a and c>b:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c=map(int,input().split())
k=int(input())
for n in range(k):
  if a>=b:
    b=b*2
  elif b>=c:
    c=c*2
if b>a and c>b:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
L=int(input())
R=int(input())
d=int(input())
a=L // d
b=R // d
c=L % d
if c==0:
  print(b-a+1)
else:
  print(b-a)

Fixed submission:
L,R,d=map(int,input().split())
a=L//d
b=R//d
c=L%d
if c==0:
  print(b-a+1)
else:
  print(b-a)

Buggy python submission (verdict: Runtime Error):
L=int(input())
R=int(input())
d=int(input())
a=L//d
b=R//d
c=L%d
if c==0:
  print(b-a+1)
else:
  print(b-a)

Fixed submission:
L,R,d=map(int,input().split())
a=L//d
b=R//d
c=L%d
if c==0:
  print(b-a+1)
else:
  print(b-a)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[0]*10001
for i in range(101):
  for j in range(101):
    for k in range(101):
      v=i**2+j**2+k**2+i*j+j*k+k*i
      if v<=10001:
        a[v]+=1
for m in range(n):
  print(a[m+1])

Fixed submission:
n=int(input())
a=[0]*10001
for i in range(1,101):
  for j in range(1,101):
    for k in range(1,101):
      v=i**2+j**2+k**2+i*j+j*k+k*i
      if v<10001:
        a[v]+=1
for m in range(n):
  print(a[m+1])

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[ 0 for _ in range (10000)]
for i in range(100):
  for j in range(100):
    for k in range(100):
      v=i**2+j**2+k**2+i*j+j*k+k*i
      if v<=10000:
        a[v]+=1
for m in range(n):
  print(a[m+1])

Fixed submission:
n=int(input())
a=[0]*10001
for i in range(1,101):
  for j in range(1,101):
    for k in range(1,101):
      v=i**2+j**2+k**2+i*j+j*k+k*i
      if v<10001:
        a[v]+=1
for m in range(n):
  print(a[m+1])

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[ 0 for _ in range (10000)]
for i in range(100):
  for J in range(100):
    for k in range(100):
      v=i**2+j**2+k**2+i*J+j*k+k*i
      if v<=10000:
        a[v]+=1
for m in range(n):
  print(a[m+1])

Fixed submission:
n=int(input())
a=[0]*10001
for i in range(1,101):
  for j in range(1,101):
    for k in range(1,101):
      v=i**2+j**2+k**2+i*j+j*k+k*i
      if v<10001:
        a[v]+=1
for m in range(n):
  print(a[m+1])
Buggy python submission (verdict: Runtime Error):
n=int(input())
ac=0
wa=0
tle=0
re=0
for m in range(n):
  a=input()
  if a=='AC':
    ac=ac+1
  elif a=='WA':
    wa=wa+1
  elif a=='TLE':
    tle=tle+1
  else:
    re=re+1
print('AC x %ac' % ac)
print('WA x %wa' % wa)
print('TLE x %tle' % tle)
print('RE x %re' % re)

Fixed submission:
n=int(input())
ac=0
wa=0
tle=0
re=0
for m in range(n):
  a=input()
  if a=='AC':
    ac=ac+1
  elif a=='WA':
    wa=wa+1
  elif a=='TLE':
    tle=tle+1
  else:
    re=re+1
print('AC x '+str(ac))
print('WA x '+str(wa))
print('TLE x '+str(tle))
print('RE x '+str(re))
Buggy python submission (verdict: Runtime Error):
n=int(input())
array=list(map(int,input().split()))
ans=1
if 0 in array:
  ans=0
else:
  for i in range(n):
  if ans>10**18:
    break
  else:
    ans=ans*array[i]
if ans>10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
array=list(map(int,input().split()))
ans=1
if 0 in array:
  ans=0
else:
  for i in range(n):
    if ans>10**18:
      break
    else:
      ans=ans*array[i]
if ans>10**18:
  print(-1)
else:
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
array=list(map(int,input().split()))
ans=1
for i in range(n):
  ans=ans*array[i]
if ans>10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
array=list(map(int,input().split()))
ans=1
if 0 in array:
  ans=0
else:
  for i in range(n):
    if ans>10**18:
      break
    else:
      ans=ans*array[i]
if ans>10**18:
  print(-1)
else:
  print(ans)
Buggy python submission (verdict: Runtime Error):
N=int(input())
a=N%10
if a==2,4,5,7,9:
  print('hon')
elif a==0,1,6,8:
  print('pon')
else:
  print('bon')

Fixed submission:
N=int(input())
a=N%10
if a==3:
  print('bon')
elif a==0 or a==1 or a==6 or a==8:
  print('pon')
else:
  print('hon')
Buggy python submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split)
c=B-A
d=c-K
if d>-2:
  print('OK')
else:
  print('NG')

Fixed submission:
x = int(input())
a, b = map(int, input().split())
ans=0
for i in range(a,b+1):
  if i%x==0:
    ans=1
    break
if ans==1:
  print('OK')
else:
  print('NG')
Buggy python submission (verdict: Runtime Error):
N=int(input())
if 7 in N:
  print('Yes')
else:
  print('No')

Fixed submission:
N=input()
if '7' in N:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
x,y,z=map(int,input().split())
print(z x y)

Fixed submission:
x,y,z=map(int,input().split())
print(z, x, y)