Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
    print("Yes" if n == len(set(map(int, input().split()))) else "No")

Fixed submission:
def main():
    n = int(input())
    print("YES" if n == len(set(map(int, input().split()))) else "NO")
    
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n, k = list(map(int, input().split()))
    p = list(map(int, input().split()))
    
    s = []
    for i in range(n-k+1):
        s.append((sum(p[i:i+k])+k)/2)    
    print(max(s))
    
if __name__ == '__main__':
    main()

Fixed submission:
import itertools as iter

def main():
    n, k = list(map(int, input().split()))
    p = [0]
    p.extend(list(iter.accumulate([(1+int(x))/2 for x in input().split()])))
    #print(p)
    
    s = []
    for i in range(n-k+1):
        s.append(p[i+k]-p[i])
    #print(s)
    print(max(s))
    
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    n, k = list(map(int, input().split()))
    p = list(map(int, input().split()))
    
    s = []
    for i in range(len(p)-k):
        s.append((sum(p[i:i+k])+k)/2)    
    print(max(s))
    
if __name__ == '__main__':
    main()

Fixed submission:
import itertools as iter

def main():
    n, k = list(map(int, input().split()))
    p = [0]
    p.extend(list(iter.accumulate([(1+int(x))/2 for x in input().split()])))
    #print(p)
    
    s = []
    for i in range(n-k+1):
        s.append(p[i+k]-p[i])
    #print(s)
    print(max(s))
    
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n, k = list(map(int, input().split()))
    p = list(map(int, input().split()))
    
    s = []
    for i, v in enumerate(p):
        if i + k > len(p):
            break
        #print(p[i:i+k])
        s.append((sum(p[i:i+k])+1*k)/2)    
    print(max(s))
    
if __name__ == '__main__':
    main()

Fixed submission:
import itertools as iter

def main():
    n, k = list(map(int, input().split()))
    p = [0]
    p.extend(list(iter.accumulate([(1+int(x))/2 for x in input().split()])))
    #print(p)
    
    s = []
    for i in range(n-k+1):
        s.append(p[i+k]-p[i])
    #print(s)
    print(max(s))
    
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    a = list(map(int, input().split()))
    
    r = 0
    for i in range(n):
        x = a[i]
        if all(x <= a[j] for j in range(i)):
            r += 1
    
    print(r)

if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    
    d = set()
    mini = a[0]
    for i in range(n):
        if mini >= a[i]:
            mini = a[i]
        d.add(mini)
    print(len(d))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import math

def main():
    x, y = map(int, input().split())
    print(x*y // math.gcd(x,y))

if __name__ == '__main__':
    main()

Fixed submission:
import fractions as math

def main():
    x, y = map(int, input().split())
    print(x*y // math.gcd(x,y))

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    l = sorted(list(map(int, input().split())), reverse=True)
    count = 0
    for i in range(n-2):
        a = l[i]
        for j in range(i+1,n-1):
            b = l[j]
            x = a-b
            z = a+b
            for k in range(j+1, n):
                c = l[k]
                if x >= c:
                    break
                if c < z:
                    count += 1
    print(count)
    
if __name__ == "__main__":
    main()

Fixed submission:
import bisect

def main():
    n = int(input())
    l = sorted(list(map(int, input().split())))
    count = 0
    for i in range(n-2):
        a = l[i]
        for j in range(i+1, n-1):
            b = l[j]
            kmax = bisect.bisect_left(l, a+b)
            #print("k", kmax, "j", j, "k-j", kmax-(j+1), a, b)
            count += max(kmax-(j+1),0)
    print(count)
    
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import itertools

def main():
    n = int(input())
    l = sorted(list(map(int, input().split())), reverse=True)
    count = 0
    for i in range(n-2):
        a = l[i]
        for j in range(i+1,n-1):
            b = l[j]
            x = a-b
            z = a+b
            for k in range(j+1, n):
                c = l[k]
                if x >= c:
                    break
                if c < z:
                    count += 1
    print(count)
    
if __name__ == "__main__":
    main()

Fixed submission:
import bisect

def main():
    n = int(input())
    l = sorted(list(map(int, input().split())))
    count = 0
    for i in range(n-2):
        a = l[i]
        for j in range(i+1, n-1):
            b = l[j]
            kmax = bisect.bisect_left(l, a+b)
            #print("k", kmax, "j", j, "k-j", kmax-(j+1), a, b)
            count += max(kmax-(j+1),0)
    print(count)
    
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import itertools

def main():
    n = int(input())
    l = map(int, input().split())
    ts = set()
    for a,b,c in itertools.combinations(l, 3):
        if a < b+c and b < c+a and c < a+b:
            ts.add((a,b,c))
    print(len(ts))
    
if __name__ == "__main__":
    main()

Fixed submission:
import bisect

def main():
    n = int(input())
    l = sorted(list(map(int, input().split())))
    count = 0
    for i in range(n-2):
        a = l[i]
        for j in range(i+1, n-1):
            b = l[j]
            kmax = bisect.bisect_left(l, a+b)
            #print("k", kmax, "j", j, "k-j", kmax-(j+1), a, b)
            count += max(kmax-(j+1),0)
    print(count)
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
n = range(1,int(input())+1)
a = list(map(int, input().split()))
print(*[a.index(i)+1 for i in n])

Fixed submission:
n = int(input())
x = [0]*n
for i, v in enumerate(map(int, input().split())):
    x[v-1] = i+1
print(*x)
Buggy python submission (verdict: Runtime Error):
def main():
    n = int(input())
    p = list(range(1,n+1))
    q = p[1:]
    q.append(p[0])
    s = 0
    for i, v in enumerate(q):
        s += (i+1) % v
    print(s)

if __name__ == "__main__":
    main()

Fixed submission:
n=int(input());print(int(n*(n-1)//2))
Buggy python submission (verdict: Time Limit Exceeded):
import collections
import itertools

def main():
    s=["".join(sorted(input())) for _ in range(int(input()))]
    c=0
    for i in collections.Counter(s).values():
        c+=len(list(itertools.combinations(range(i),2)))
    print(c)

if __name__ == "__main__":
    main()

Fixed submission:
import collections

def main():
    s=["".join(sorted(input())) for _ in range(int(input()))]
    c=0
    for i in collections.Counter(s).values():
        c+=i*(i-1)//2
    print(c)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    x = [int(input()) for _ in range(5)]
    d = min(((i % 10, i) for i in x if i % 10 != 0), key=lambda x: x[0])
    i = x.index(d[1])
    t = 0
    for idx, v in enumerate(x):
        if idx == i or v % 10 == 0:
            t += v
        else:
            t += v + 10 - (v % 10)
        #print(idx, t)
    print(t)
    
if __name__ == "__main__":
    main()

Fixed submission:
from itertools import permutations
def main():
    a=[int(input()) for _ in range(5)]
    ans=[]
    for x in permutations(a):
        t = 0
        for y in x:
            if t % 10 != 0:
                t = (t//10 + 1) * 10
            t += y
        ans.append(t)
    print(min(ans))
            
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    ans = []
    s = input()
    count = 0
    for i in s:
        if i in "ATGC":
            count += 1
        else:
            ans.append(count)
    print(max(ans))
        
if __name__ == "__main__":
    main()

Fixed submission:
def main():
    ans = []
    s = input()
    count = 0
    for i in s:
        if i in "ATGC":
            count += 1
        else:
            ans.append(count)
            count = 0
    ans.append(count)
    print(max(ans))
        
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    s=input()
    l = len(s)
    while "01" in s or "10" in s:
        s = s.replace("01", "").replace("10", "")
    print((l-len(s)))
        
if __name__ == "__main__":
    main()

Fixed submission:
s=input()
zero = s.count("0")
one = s.count("1")
print(len(s)-abs(zero-one))

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    s = input()
    ss = s
    for i in range(len(s)//2):
        f = len(ss)
        ss = ss.replace("01", "").replace("10", "")
        if f == len(ss):
            break
    print(len(s)-len(ss))
    
if __name__ == "__main__":
    main()

Fixed submission:
s=input()
zero = s.count("0")
one = s.count("1")
print(len(s)-abs(zero-one))

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    s = input()
    ss = s
    for i in range(len(s)//2):
        ss = ss.replace("01", "").replace("10", "")
    print(len(s)-len(ss))
    
if __name__ == "__main__":
    main()

Fixed submission:
s=input()
zero = s.count("0")
one = s.count("1")
print(len(s)-abs(zero-one))
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    s=[0 if i == "B" else 1 for i in input()]
    l=len(s)
    count = 0
    while True:
        p = count
        for i in range(l-1):
            if s[i] == 0 and s[i+1] == 1:
                s[i] = 1
                s[i+1] = 0
                count += 1
        if p == count:
            break
    print(count)
    
if __name__ == "__main__":
    main()

Fixed submission:
def main():
    s=input()
    l=0
    man=0
    for i,v in enumerate(s):
        if v == "W":
            man += i-l
            l += 1
    print(man)
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
n,m,X,Y=sorted(map(int,input().split()))
x=max([X],max(map(int,input().split())))
y=min([Y],min(map(int,input().split())))
print("No War" if x<y else "War")

Fixed submission:
def main():
    a=sorted(map(int,input().split()))
    print(a[2]*10+a[0]+a[1])
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
n,m,X,Y=sorted(map(int,input().split()))
x=max([X],max(map(int,input().split())))
y=min([Y],min(map(int,input().split())))
print("No War" if x<y else "War")

Fixed submission:
n,m,X,Y=map(int,input().split())
x=max(X,max(map(int,input().split())))
y=min(Y,min(map(int,input().split())))
print(["War","No War"][x<y])
Buggy python submission (verdict: Runtime Error):
import math
def main():
    N,X=map(int,input().split())
    x=[a-X for a in sorted(map(int,input().split()), reverse=True)]
    if N == 1:
        print(x[0])
        return
    d=[]
    for i in range(N-1):
        d.append(x[i]-x[i+1])
    ans=math.gcd(d[0], d[1])
    for a in d[1:]:
        ans = math.gcd(ans, a)
    print(ans)
    
if __name__ == "__main__":
    main()

Fixed submission:
import math
def main():
    n,x=map(int,input().split())
    p=0
    for i in map(int,input().split()):
        p = math.gcd(p, i-x)
    print(p)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import math
def main():
    n,x=map(int,input().split())
    x=sorted(map(int,input().split()), reverse=True)
    d=[]
    for i in range(n-1):
        d.append(x[i]-x[i+1])
    if len(d) < 1:
        print(x[0]-1)
        return
    ans=math.gcd(d[0], d[1])
    for a in d[1:]:
        ans = math.gcd(ans, a)
    print(ans)
    
if __name__ == "__main__":
    main()

Fixed submission:
import math
def main():
    n,x=map(int,input().split())
    p=0
    for i in map(int,input().split()):
        p = math.gcd(p, i-x)
    print(p)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
from collections import Counter
def main():
    s,k = input(), int(input())
    for i,v in enumerate(s):
        if v != '1':
            r = v
            break
    if k < i:
        print(1)
    else:
        print(r)

if __name__ == "__main__":
    main()

Fixed submission:
def main():
    s = input()
    k = int(input())
    r = '1'
    for i,v in enumerate(s):
        if v != '1':
            r = v
            break
    if i >= k:
        print(1)
    else:
        print(r)
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=input()
a=[]
for i in range(1,n-1):
    s1=set(s[:i])
    s2=set(s[i:])
    a.append(len(s1&s2))
print(max(a))

Fixed submission:
n=int(input())
s=input()
a=[]
for i in range(1,n):
    s1=set(s[:i])
    s2=set(s[i:])
    a.append(len(s1&s2))
print(max(a))
Buggy python submission (verdict: Runtime Error):
def main():
    H,W=map(int,input().split())
    m=[input() for _ in range(H)]
    is_ok = True
    for h in range(H):
        for w in range(W):
            if m[w][h] == "#":
                if 0 < h-1 and m[w][h-1] == "#":
                    pass
                elif 0 < w-1 and m[w-1][h] == "#":
                    pass
                elif h+1 < H and m[w][h+1] == "#":
                    pass
                elif w+1 < W and m[w+1][h] == "#":
                    pass
                else:
                    print("No")
                    return
    print("Yes")
        
if __name__ == "__main__":
    main()

Fixed submission:
def main():
    H,W=map(int,input().split())
    m=[input() for _ in range(H)]
    is_ok = True
    for h in range(H):
        for w in range(W):
            if m[h][w] == "#":
                if -1 < h-1 and m[h-1][w] == "#":
                    pass
                elif -1 < w-1 and m[h][w-1] == "#":
                    pass
                elif h+1 < H and m[h+1][w] == "#":
                    pass
                elif w+1 < W and m[h][w+1] == "#":
                    pass
                else:
                    print("No")
                    return
    print("Yes")
        
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
x=list(map(int,input().split()))
m=len(x)//2-1
for i in range(len(x)):
    t = sorted(x[0:i] + x[i+1:])
    print(t[m])

Fixed submission:
def main():
    n=int(input())
    x=list(map(int,input().split()))
    sx = sorted(x)
    lx = len(x)//2
    m = sx[lx]
    _m = sx[lx-1] if 0 < m-1 else sx[0]
    for i in x:
        print(m if i<m else _m)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    n=int(input())
    csf=[list(map(int,input().split())) for _ in range(n-1)]
    for i in range(n):
        if i == n-1:
            print(0)
        else:
            t=0
            for c,s,f in csf[i:]:
                t = max(s,t)
                t = math.ceil(t/f)*f+c
                #print("start:", i, t)
            print(t)

if __name__ == "__main__":
    main()

Fixed submission:
import math
def main():
    n=int(input())
    csf=[list(map(int,input().split())) for _ in range(n-1)]
    for i in range(n):
        if i == n-1:
            print(0)
        else:
            t=0
            for c,s,f in csf[i:]:
                t = max(s,t)
                t = math.ceil(t/f)*f+c
                #print("start:", i, t)
            print(t)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
from itertools import product, combinations
def main():
    n=int(input())
    csf=[list(map(int,input().split())) for _ in range(n-1)]
    for i in range(n):
        if i == n-1:
            print(0)
        else:
            t=0
            for c,s,f in csf[i:]:
                t = max(s,t)
                t = lcm(t,f)+c
                #print("start:",i, t)
            print(t)

if __name__ == "__main__":
    main()

Fixed submission:
import math
def main():
    n=int(input())
    csf=[list(map(int,input().split())) for _ in range(n-1)]
    for i in range(n):
        if i == n-1:
            print(0)
        else:
            t=0
            for c,s,f in csf[i:]:
                t = max(s,t)
                t = math.ceil(t/f)*f+c
                #print("start:", i, t)
            print(t)

if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n,k=map(int,input().split())
    arr = []
    for _ in range(n):
        a,b=map(int,input().split())
        arr.extend([a]*b)
    arr.sort()
    print(arr[k-1])
    
if __name__ == "__main__":
    main()

Fixed submission:
def main():
    n,k=map(int,input().split())
    arr = []
    for _ in range(n):
        a,b=map(int,input().split())
        arr.append((a, b))
    arr.sort()
    for x, c in arr:
        if k <= c:
            print(x)
            break
        else:
            k -= c
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n=int(input())
    a=sorted(map(int,input().split()))
    cnt=0
    for i in range(n):
        c=a[i]
        for j in range(n):
            #print(f"c:{c} <> a:{a[j]}")
            if i == j:
                continue
            if 2*c < a[j]:
                break
            c += a[j]
        else:
            break
    return n-i
    
if __name__ == "__main__":
    print(main())

Fixed submission:
import itertools
def main():
    n=int(input())
    a=sorted(map(int,input().split()))
    b=list(itertools.accumulate(a))
    cnt=0
    for i in reversed(range(1, n)):
        if b[i-1]*2 < a[i]:
            return n-i
    return n
            
if __name__ == "__main__":
    print(main())
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

def main():
    k,s=map(int,input().split())
    count = 0
    for x,y,z in itertools.product(range(k+1), repeat=3):
        if x + y + z == s:
            count += 1
    print(count)
        
if __name__ == "__main__":
    main()

Fixed submission:
import itertools

def main():
    k,s=map(int,input().split())
    count = 0
    for x,y in itertools.product(range(k+1), repeat=2):
        if 0 <= s-(x+y) <= k:
            count += 1
    print(count)
        
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    h,w=map(int,input().split())
    a=[]
    for _ in range(h):
        a.append(input())
    now = [0, 0]
    end = [h-1, w-1]
    while now != end:
        nxt = None
        if now[0]+1 < len(a) and a[now[0]+1][now[1]] == "#":
            nxt = now[:]
            nxt[0] += 1
        if now[1]+1 < len(a[now[0]]) and a[now[0]][now[1]+1] == "#":
            if nxt != None:
                print("Impossible")
                return
            nxt = now[:]
            nxt[1] += 1
        now = nxt
    print("Possible")
    
if __name__ == "__main__":
    main()

Fixed submission:
def main():
    h,w=map(int,input().split())
    a=[]
    for _ in range(h):
        a.append(input())
    now = (0, 0)
    end = (h-1, w-1)
    visited = set([now])
    while True:
        nxt = None
        #print(now)
        if now[0]+1 < len(a) and a[now[0]+1][now[1]] == "#":
            nxt = (now[0]+1, now[1])
        if now[1]+1 < len(a[now[0]]) and a[now[0]][now[1]+1] == "#":
            if nxt is not None:
                print("Impossible")
                return
            nxt = (now[0], now[1]+1)
        #print("next", nxt)
        if now[0]-1 >= 0 and a[now[0]-1][now[1]] == "#":
            if (now[0]-1,now[1]) not in visited:
                print("Impossible")
                return
        if now[1]-1 >= 0 and a[now[0]][now[1]-1] == "#":
            if (now[0],now[1]-1) not in visited:
                print("Impossible")
                return
        
        if now == end:
            break
        if nxt is None:
            print("Impossible")
            return
        now = nxt
        visited.add(nxt)
    print("Possible")
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
A = list(map(int, input().split()))
B = A
A = np.array(A)
B = np.array(B)
emp = np.zeros(N)
Amax_ind = np.argmax(A)
emp[Amax_ind:] = max(A)
A[Amax_ind:] = 0
while 0 in emp:
    subAmax_ind = np.argmax(A)
    emp[subAmax_ind:Amax_ind] = max(A)
    A[subAmax_ind:Amax_ind] = 0
    Amax_ind = subAmax_ind
print(int(sum(emp-B)))
    

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

ans = 0
cur_max = 0

for x in a:
    if cur_max > x:
        ans += cur_max - x
    cur_max = max(cur_max, x)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
def input():
    return sys.stdin.readline()[:-1]

import numpy as np
N = int(input())
A = list(map(int, input().split()))
B = A
A = np.array(A)
B = np.array(B)
emp = np.zeros(N)
Amax_ind = np.argmax(A)
emp[Amax_ind:] = max(A)
A[Amax_ind:] = 0
while True:
    subAmax_ind = np.argmax(A)
    emp[subAmax_ind:Amax_ind] = max(A)
    A[subAmax_ind:Amax_ind] = 0
    Amax_ind = subAmax_ind
    if 0 not in emp:
        break
print(int(sum(emp-B)))
    

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

ans = 0
cur_max = 0

for x in a:
    if cur_max > x:
        ans += cur_max - x
    cur_max = max(cur_max, x)

print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())
A = list(map(int, input().split()))
B = A
A = np.array(A)
B = np.array(B)
emp = np.zeros(N)
Amax_ind = np.argmax(A)
emp[Amax_ind:] = max(A)
A[Amax_ind:] = 0
while True:
    subAmax_ind = np.argmax(A)
    emp[subAmax_ind:Amax_ind] = max(A)
    A[subAmax_ind:Amax_ind] = 0
    Amax_ind = subAmax_ind
    if 0 not in emp:
        break
print(int(sum(emp-B)))

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

ans = 0
cur_max = 0

for x in a:
    if cur_max > x:
        ans += cur_max - x
    cur_max = max(cur_max, x)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
A = list(map(int, input().split()))
B = A
A = np.array(A)
B = np.array(B)
emp = np.zeros(N)
Amax_ind = np.argmax(A)
emp[Amax_ind:] = max(A)
A[Amax_ind:] = 0
while True:
    subAmax_ind = np.argmax(A)
    emp[subAmax_ind:Amax_ind] = max(A)
    A[subAmax_ind:Amax_ind] = 0
    Amax_ind = subAmax_ind
    if 0 not in emp:
        break
print(int(sum(emp-B)))

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

ans = 0
cur_max = 0

for x in a:
    if cur_max > x:
        ans += cur_max - x
    cur_max = max(cur_max, x)

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = list(map(int, input().split()))

count = 0
for a in itertools.combinations(L, 3):
    if len(set(a)) != 3:
        continue
    a = sorted(a)
    if a[2] < a[0] + a[1]:
        count += 1
print(count)

Fixed submission:
import itertools

N = int(input())
L = list(map(int, input().split()))

count = 0
for a in itertools.combinations(L, 3):
    if len(set(a)) != 3:
        continue
    a = sorted(a)
    if a[2] < a[0] + a[1]:
        count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
    for j in range(1,105):
        for k in range(1,105):
            v = i*i+j*j+k*k+i*j+j*k+k*i;
            if v<10050:
            ans[v]+=1
for i in range(n):
    print(ans[i+1])

Fixed submission:
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
    for j in range(1,105):
        for k in range(1,105):
            v = i*i+j*j+k*k+i*j+j*k+k*i;
            if v<10050:
            	ans[v]+=1
for i in range(n):
    print(ans[i+1])