ZhenlongDai/ACPR huggingface dataset:
Problem: p02608
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def fx(n):
  s = [0]*(n+1)
  for i in range(1,10000):
    if (i+1+1)**2 - i*1 - 1*1 - 1*i > n: break
    for j in range(1, 10000):
      if (1+j+1)**2 - 1*j - j*1 - 1*1 > n : break
      for k in range(1, 10000):
        if (1+1+k)**2 - 1*1 - 1*k - k*1 > n: break
        formula = (i+j+k)**2 - i*j - j*k - k*i
        if formula <= n and formula > 0:
          s[formula] += 1
        if formula >= n:
          break
  return s


n = int(input())
s = fx(n)
for i in range(1,n):
  print(s[i])

Failing test case input:
334

Expected output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
6
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
12
1
6
6
6
6
0
0
18
0
12
0
3
6
12
0
0
6
3
6
12
0
12
0
0
0
9
3
9
6
12
3
12
0
3
6
6
0
12
0
12
0
9
9
0
0
6
3
6
3
12
6
9
3
6
0
12
3
6
3
9
6
12
6
6
0
6
0
9
6
6
0
12
3
6
0
9
6
6
1
6
0
21
12
6
0
12
0
12
0
0
6
15
6
0
6
12
0
12
0
12
0
0
0
12
0
12
12
3
3
18
3
6
3
6
6
9
9
18
0


Actual output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
6
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
12
1
6
6
6
6
0
0
18
0
12
0
3
6
12
0
0
6
3
6
12
0
12
0
0
0
9
3
9
6
12
3
12
0
3
6
6
0
12
0
12
0
9
9
0
0
6
3
6
3
12
6
9
3
6
0
12
3
6
3
9
6
12
6
6
0
6
0
9
6
6
0
12
3
6
0
9
6
6
1
6
0
21
12
6
0
12
0
12
0
0
6
15
6
0
6
12
0
12
0
12
0
0
0
12
0
12
12
3
3
18
3
6
3
6
6
9
9
18


Fixed submission (verdict: Accepted):
def fx(n):
  s = [0]*(n+1)
  for i in range(1,10000):
    if (i+1+1)**2 - i*1 - 1*1 - 1*i > n: break
    for j in range(1, 10000):
      if (1+j+1)**2 - 1*j - j*1 - 1*1 > n : break
      for k in range(1, 10000):
        if (1+1+k)**2 - 1*1 - 1*k - k*1 > n: break
        formula = (i+j+k)**2 - i*j - j*k - k*i
        if formula <= n and formula > 0:
          s[formula] += 1
        if formula >= n:
          break
  return s


n = int(input())
s = fx(n)
for i in range(1,n+1):
  print(s[i])
Problem: p02608
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())

count = [0] * 10001

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            temp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if(1 <= temp and temp <= 10000):
                count[temp] += 1

for i in range(n):
    print(count[i])

Failing test case input:
334

Expected output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
6
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
12
1
6
6
6
6
0
0
18
0
12
0
3
6
12
0
0
6
3
6
12
0
12
0
0
0
9
3
9
6
12
3
12
0
3
6
6
0
12
0
12
0
9
9
0
0
6
3
6
3
12
6
9
3
6
0
12
3
6
3
9
6
12
6
6
0
6
0
9
6
6
0
12
3
6
0
9
6
6
1
6
0
21
12
6
0
12
0
12
0
0
6
15
6
0
6
12
0
12
0
12
0
0
0
12
0
12
12
3
3
18
3
6
3
6
6
9
9
18
0


Actual output:
0
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
6
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
12
1
6
6
6
6
0
0
18
0
12
0
3
6
12
0
0
6
3
6
12
0
12
0
0
0
9
3
9
6
12
3
12
0
3
6
6
0
12
0
12
0
9
9
0
0
6
3
6
3
12
6
9
3
6
0
12
3
6
3
9
6
12
6
6
0
6
0
9
6
6
0
12
3
6
0
9
6
6
1
6
0
21
12
6
0
12
0
12
0
0
6
15
6
0
6
12
0
12
0
12
0
0
0
12
0
12
12
3
3
18
3
6
3
6
6
9
9
18


Fixed submission (verdict: Accepted):
n = int(input())

count = [0] * 10001

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            temp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if(1 <= temp and temp <= 10000):
                count[temp] += 1

for i in range(1,n+1):
    print(count[i])
Problem: p02608
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import math

N = int(input())
for i in range(1,N+1):
    count = 0
    for x in range(1,int(math.sqrt(i)/6)+2):
        for y in range(x,int(math.sqrt(i)/3)+2):
            for z in range(y,int(math.sqrt(i))+1):
                if x**2+y**2+z**2+x*y+y*z+z*x != i:
                    continue
                if x == y and x == z:
                    count += 1
                elif x == y or x == z or y == z:
                    count += 3
                else:
                    count += 6
    print(count) 

Failing test case input:
334

Expected output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
6
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
12
1
6
6
6
6
0
0
18
0
12
0
3
6
12
0
0
6
3
6
12
0
12
0
0
0
9
3
9
6
12
3
12
0
3
6
6
0
12
0
12
0
9
9
0
0
6
3
6
3
12
6
9
3
6
0
12
3
6
3
9
6
12
6
6
0
6
0
9
6
6
0
12
3
6
0
9
6
6
1
6
0
21
12
6
0
12
0
12
0
0
6
15
6
0
6
12
0
12
0
12
0
0
0
12
0
12
12
3
3
18
3
6
3
6
6
9
9
18
0


Actual output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
0
6
0
3
0
0
0
0
0
0
0
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
0
6
0
3
6
0
0
6
0
0
0
0
3
0
0
6
0
0
3
6
0
0
0
6
0
0
0
0
0
9
0
6
0
6
0
3
6
0
0
0
0
6
0
0
0
0
6
0
3
6
0
6
0
0
3
6
0
0
0
0
0
6
0
0
0
6
0
0
0
9
0
6
0
0
0
3
6
0
0
0
0
0
0
6
0
0
6
0
0
0
0
6
3
6
0
0
0
0
3
6
6
0
0
6
0
6
0
6
3
6
0
0
6
0
0
6
0
9
0
0
0
0
0
9
6
0
0
6
0
6
0
0
0
9
6
0
0
6
0
0
0
6
0
6
3
0
0
0
6
0
3
6
0
6
0
6
0
0
0
0
3
12
0
0
6
0
0
0
0
6
0
12
0
3
0
6
0
0
6
3
6
6
0
6
0
0
0
6
0
3
6
6
0
6
0
0
0
0
0
12
0
6
0
0
9
0
0
6
0
0
3
12
0
6
0
0
0
6
0
0
3
6
0
6
6
0
0
0
0
6
0
6
0
6
0
6
0
3
6
0
0
0
0
9
6
6
0
0
0
6
0
0
0
3
6
0
0
12
0
0
0
6
0
0
0
6
0
6
6
0
0
6
3
0
0
0
6
6
3
12
0


Fixed submission (verdict: Accepted):
import math

N = int(input())
for i in range(1,N+1):
    count = 0
    for x in range(1,int(math.sqrt(i/6))+2):
        for y in range(x,int(math.sqrt(i/3))+2):
            for z in range(y,int(math.sqrt(i))+1):
                if x**2+y**2+z**2+x*y+y*z+z*x != i:
                    continue
                if x == y and x == z:
                    count += 1
                elif x == y or x == z or y == z:
                    count += 3
                else:
                    count += 6
    print(count)
Problem: p02608
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import itertools

N=int(input())
L=[0]*(10**4+10)
X=[x for x in range(1,12)]
plus=[0,1,3,6]

for v in itertools.combinations_with_replacement(X,3):
  x,y,z=v[0],v[1],v[2]
  temp=len(set(v))
  L[(x+y+z)**2-x*y-x*z-z*x]+=plus[temp]

for i in range(1,N+1):
  print(L[i])


Failing test case input:
334

Expected output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
6
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
12
1
6
6
6
6
0
0
18
0
12
0
3
6
12
0
0
6
3
6
12
0
12
0
0
0
9
3
9
6
12
3
12
0
3
6
6
0
12
0
12
0
9
9
0
0
6
3
6
3
12
6
9
3
6
0
12
3
6
3
9
6
12
6
6
0
6
0
9
6
6
0
12
3
6
0
9
6
6
1
6
0
21
12
6
0
12
0
12
0
0
6
15
6
0
6
12
0
12
0
12
0
0
0
12
0
12
12
3
3
18
3
6
3
6
6
9
9
18
0


Actual output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
0
3
3
0
0
0
0
1
0
0
3
6
0
0
0
0
3
0
0
0
0
3
6
3
0
0
0
3
0
3
0
0
0
0
3
6
6
1
0
0
3
0
6
0
0
0
0
0
0
3
9
6
3
0
0
3
0
6
0
3
0
0
0
0
0
3
3
6
9
6
0
0
3
0
6
0
6
0
0
1
0
0
3
0
0
9
6
6
6
3
0
3
0
6
0
6
3
3
0
0
0
3
0
0
6
0
3
9
6
6
6
0
3
0
6
3
6
0
6
3
0
0
3
0
0
6
0
0
6
3
6
6
6
7
3
3
3
6
0
6
6
6
0
3
0
3
0
0
6
0
0
6
0
0
6
6
6
6
6
9
3
0
6
6
6
0
6
3
6
0
3
0
0
6
0
0
6
3
0
6
0
0
3
6
9
6
6
3
6
6
0
6
6
6
0
6
0
6
0
1
6
0
3
6
0
0
6
6
0
3
0
3
0
6
6
12
6
0
0
6
6
0
6
3
9
0
6
0
0
9
0
0
6
0
6
6
0
0
6
3
3
0
0
0
6
6
6
6
9
0
0
3
6
6
0
6
0
9
3
3
0
0
0
12
0
0
6
0
6
6
0
0
3
0
0
6
0
1
0
12
9
6
0
6
0
0
6
3
6
3
6
0
6
0
6
0
0
0
0
12
0
0
6
0
3
6
3
0
0
0
0
3
6
0
0
6
12
9


Fixed submission (verdict: Accepted):
import itertools

N=int(input())
L=[0]*(10**4+10)
X=[x for x in range(1,101)]
plus=[0,1,3,6]

for v in itertools.combinations_with_replacement(X,3):
  x,y,z=v[0],v[1],v[2]
  temp=len(set(v))
  try:
    L[x**2+y**2+z**2+x*y+y*z+z*x]+=plus[temp]
  except:
    continue

for i in range(1,N+1):
  print(L[i])
Problem: p02608
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())

for i in range(1,n+1):
    cnt = 0
    for j in range(1, 10^2+1): 
        for k in range(1, 10^2+1): 
            for l in range(1, 10^2+1): 
                if j*j+k*k+l*l+j*k+k*l+l*j == i:
                      cnt += 1
    print(cnt)

Failing test case input:
334

Expected output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
6
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
12
1
6
6
6
6
0
0
18
0
12
0
3
6
12
0
0
6
3
6
12
0
12
0
0
0
9
3
9
6
12
3
12
0
3
6
6
0
12
0
12
0
9
9
0
0
6
3
6
3
12
6
9
3
6
0
12
3
6
3
9
6
12
6
6
0
6
0
9
6
6
0
12
3
6
0
9
6
6
1
6
0
21
12
6
0
12
0
12
0
0
6
15
6
0
6
12
0
12
0
12
0
0
0
12
0
12
12
3
3
18
3
6
3
6
6
9
9
18
0


Actual output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
0
12
0
6
0
0
3
6
0
0
0
3
3
6
0
6
3
6
0
3
6
6
0
6
0
0
0
0
0
3
3
6
0
6
3
6
0
3
6
6
0
6
0
0
0
0
0
0
1
6
0
6
6
0
0
12
0
6
0
0
3
6
0
0
0
0
0
0
0
3
3
6
0
6
3
6
0
3
6
0
0
0
0
6
0
0
0
0
0
0
0
3
3
6
0
6
3
6
0
0
0
6
0
0
0
0
0
3
0
0
0
0
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
0
0
0
0
0
0
0
0
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
6
0
3
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
3
0
0
0
0
0
0
0
0
0
0


Fixed submission (verdict: Accepted):
n = int(input())
ans = [0 for _ in range(10**4+1)]
for x in range(1, 101): 
    for y in range(1, 101): 
        for z in range(1,101): 
            if (m:=x*x+y*y+z*z+x*y+y*z+z*x) <= n:
                
                ans[m] += 1

for i in range(n):
    print(ans[i+1])
Problem: p02608
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
Pls = [0]*(10**4+1)
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            k = x**2+y**2+z**2+x*y+y*z+z*x
            if k <= 10**4:
                Pls[k] = Pls[k] + 1
for i in range(N+1):
    print(Pls[i])

Failing test case input:
334

Expected output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
6
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
12
1
6
6
6
6
0
0
18
0
12
0
3
6
12
0
0
6
3
6
12
0
12
0
0
0
9
3
9
6
12
3
12
0
3
6
6
0
12
0
12
0
9
9
0
0
6
3
6
3
12
6
9
3
6
0
12
3
6
3
9
6
12
6
6
0
6
0
9
6
6
0
12
3
6
0
9
6
6
1
6
0
21
12
6
0
12
0
12
0
0
6
15
6
0
6
12
0
12
0
12
0
0
0
12
0
12
12
3
3
18
3
6
3
6
6
9
9
18
0


Actual output:
0
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
6
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
12
1
6
6
6
6
0
0
18
0
12
0
3
6
12
0
0
6
3
6
12
0
12
0
0
0
9
3
9
6
12
3
12
0
3
6
6
0
12
0
12
0
9
9
0
0
6
3
6
3
12
6
9
3
6
0
12
3
6
3
9
6
12
6
6
0
6
0
9
6
6
0
12
3
6
0
9
6
6
1
6
0
21
12
6
0
12
0
12
0
0
6
15
6
0
6
12
0
12
0
12
0
0
0
12
0
12
12
3
3
18
3
6
3
6
6
9
9
18
0


Fixed submission (verdict: Accepted):
N = int(input())
Pls = [0]*(10**4+1)
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            k = x**2+y**2+z**2+x*y+y*z+z*x
            if k <= 10**4:
                Pls[k] = Pls[k] + 1
Pls.pop(0)
for i in range(N):
    print(Pls[i])
Problem: p02608
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import itertools

N=int(input())
L=[0]*(10**4+10)
X=[x for x in range(1,13)]
plus=[0,1,3,6]

for v in itertools.combinations_with_replacement(X,3):
  x,y,z=v[0],v[1],v[2]
  temp=len(set(v))
  L[x**2+y**2+z**2+x*y+y*z+z*x]+=plus[temp]


for i in range(1,N+1):
  print(L[i])


Failing test case input:
334

Expected output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
6
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
12
1
6
6
6
6
0
0
18
0
12
0
3
6
12
0
0
6
3
6
12
0
12
0
0
0
9
3
9
6
12
3
12
0
3
6
6
0
12
0
12
0
9
9
0
0
6
3
6
3
12
6
9
3
6
0
12
3
6
3
9
6
12
6
6
0
6
0
9
6
6
0
12
3
6
0
9
6
6
1
6
0
21
12
6
0
12
0
12
0
0
6
15
6
0
6
12
0
12
0
12
0
0
0
12
0
12
12
3
3
18
3
6
3
6
6
9
9
18
0


Actual output:
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
0
0
1
6
0
3
0
0
0
0
0
3
3
6
0
0
3
0
0
0
0
3
3
6
0
6
0
0
0
3
0
0
1
6
0
6
6
0
0
6
0
0
0
0
3
3
3
6
0
6
3
6
0
0
0
6
0
0
0
3
3
9
0
6
3
6
0
3
6
0
0
0
0
6
1
6
0
6
6
0
3
12
0
6
0
0
3
6
0
0
0
3
3
12
0
6
3
6
0
3
6
9
0
6
0
0
0
3
6
3
3
6
0
6
3
12
0
3
6
6
0
6
0
6
3
6
0
0
1
6
3
12
6
0
0
12
0
6
0
6
6
12
0
0
6
0
0
6
0
12
3
6
0
6
3
9
6
3
6
6
0
6
0
6
0
15
6
0
0
6
0
3
3
12
0
12
3
6
0
3
6
6
3
12
0
6
0
9
6
0
0
6
3
6
1
6
6
6
6
0
0
18
0
12
0
0
6
12
0
0
6
0
0
12
0
12
0
0
0
9
3
9
6
6
3
12
0
3
6
6
0
6
0
6
0
9
6
0
0
6
3
6
0
6
6
9
3
6
0
12
3
6
0
3
6
6
0
6
0
6
0
9
6
0
0
6
3
6
0
6
6
6
1
6
0
12
6
0
0
12
0
6
0
0
6
12
0
0
6
0
0
12
0
12
0
0
0
6
0
3
6
3
3
12
0
6
3
6
0
3
6
6
0


Fixed submission (verdict: Accepted):
import itertools

N=int(input())
L=[0]*(10**4+10)
X=[x for x in range(1,101)]
plus=[0,1,3,6]

for v in itertools.combinations_with_replacement(X,3):
  x,y,z=v[0],v[1],v[2]
  temp=len(set(v))
  try:
    L[x**2+y**2+z**2+x*y+y*z+z*x]+=plus[temp]
  except:
    continue

for i in range(1,N+1):
  print(L[i])
Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


def main():
    k = int(input().strip())
    s = input().strip()
    if len(s) <= k:
        print(s)
    else:
        print(s[:k]+"…")

if __name__=="__main__":
    main()

Failing test case input:
7
uscvclfqokbiopk

Expected output:
uscvclf...


Actual output:
uscvclf…


Fixed submission (verdict: Accepted):


def main():
    k = int(input().strip())
    s = input().strip()
    if len(s) <= k:
        print(s)
    elif len(s) > k:
        print(s[:k]+"...")

if __name__=="__main__":
    main()

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()
if len(S) <= K:
 print(S)
else:
 print(S[:K+1] + '...')

Failing test case input:
7
jpniclopfkcusct

Expected output:
jpniclo...


Actual output:
jpniclop...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()
if len(S) <= K:
 print(S)
else:
 print(S[:K] + '...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[:5]+'...')


Failing test case input:
7
kunilkoqfbcvdso

Expected output:
kunilko...


Actual output:
kunil...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[:K]+'...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K=int(input())
S=str(input())
import sys
s=''
for i in range(K+1):
    try:
        s+=S[i]
    except IndexError:
        print (s)
        sys.exit()
s=s+'...'
print (s)

Failing test case input:
7
nikoandrolstice

Expected output:
nikoand...


Actual output:
nikoandr...


Fixed submission (verdict: Accepted):
K=int(input())
S=str(input())
import sys
s=''
for i in range(K):
    try:
        s+=S[i]
    except IndexError:
        print (s)
        sys.exit()
if s==S:
    print (s)
else:
    s=s+'...'
    print (s)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

if K == 1:
  print(S[0])
elif len(S) <= K:
  print(S)
else:
  S_ = S[0:K-1]
  print(S+'...')

Failing test case input:
7
kumilloqfnbvdtb

Expected output:
kumillo...


Actual output:
kumilloqfnbvdtb...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  S_ = S[0:K]
  print(S_+'...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = str(input())
if k>=len(s):
  print(s)
else:
  a = s+'...'
  print(a)


Failing test case input:
7
kpniclopfkcusct

Expected output:
kpniclo...


Actual output:
kpniclopfkcusct...


Fixed submission (verdict: Accepted):
k = int(input())
s = str(input())
if k>=len(s):
  print(s)
else:
  a = s[0:k]+'...'
  print(a)
Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = list(input())
l = len(s)
if k >= l:
  print(s)
else:
  print(s[:k])
  

Failing test case input:
7
tdstckfpolcinpj

Expected output:
tdstckf...


Actual output:
t, d, s, t, c, k, f

Fixed submission (verdict: Accepted):
k = int(input())
s = input()
l = len(s)
if k >= l:
  print(s)
else:
  print(str(s[:k])+str("..."))

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = str(input())

if len(s) <= k:
  print(s)
elif len(s) > k:
  print(s[0:k-1] + '...')

Failing test case input:
7
btdvbnfqollimuk

Expected output:
btdvbnf...


Actual output:
btdvbn...


Fixed submission (verdict: Accepted):
k = int(input())
s = str(input())

if len(s) <= k:
  print(s)
elif len(s) > k:
  print(s[:k] + '...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = input()
if len(s) < k:
    print(s)
else:
    print(s[:k+1]+'...')

Failing test case input:
7
oiksbncooletics

Expected output:
oiksbnc...


Actual output:
oiksbnco...


Fixed submission (verdict: Accepted):
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(s[:k]+'...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input('数字：'))
S = input('文字列：')


if len(S) <= K:
    print(S)
else:
    print(S[0: K] + '...')

Failing test case input:
40
tnhtfsgtnvoodvoueerrhonmihretmqbflcedg

Expected output:
tnhtfsgtnvoodvoueerrhonmihretmqbflcedg


Actual output:
数字：文字列：tnhtfsgtnvoodvoueerrhonmihretmqbflcedg


Fixed submission (verdict: Accepted):
K = int(input())
S = input()


if len(S) <= K:
    print(S)
else:
    print(S[0: K] + '...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
Sub = input()

if len(Sub) <= K:
  print(Sub)
elif len(Sub) > K:
  print(Sub[0:K-1]+"...")

Failing test case input:
7
oiksbncooletics

Expected output:
oiksbnc...


Actual output:
oiksbn...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()
 
if len(S) <= K:
  print(S)
elif len(S) > K:
  print(S[0:K]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = list(input())

if (len(S) <= K):
	print(''.join(S))
else:
	string = S[0:K+1]
	print(''.join(string) + '...')

Failing test case input:
7
kumilloqfnbvdtb

Expected output:
kumillo...


Actual output:
kumilloq...


Fixed submission (verdict: Accepted):
K = int(input())
S = list(input())

if (len(S) <= K):
	print(''.join(S))
else:
	string = S[0:K]
	print(''.join(string) + '...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = input()


if len(s) <= k :
    print(s)

else :
    print(s[0:k],"...")

Failing test case input:
7
jpniclopfkcusct

Expected output:
jpniclo...


Actual output:
jpniclo ...


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

if len(s) <= k :
    print(s)
else :
    print(s[:k] + "...")
Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = str(input())
if k > len(s):
    print(s[:k]+'...')
else:
    print(s)

Failing test case input:
7
kumilkoqfbbvdtn

Expected output:
kumilko...


Actual output:
kumilkoqfbbvdtn


Fixed submission (verdict: Accepted):
k = int(input())
s = str(input())
if k < len(s):
    print(s[:k]+'...')
else:
    print(s)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = input()
S = len(s)
if S <= k:
    print(s)
else:
    print(s[:k],"...")

Failing test case input:
7
kuoibkoqflcvdso

Expected output:
kuoibko...


Actual output:
kuoibko ...


Fixed submission (verdict: Accepted):
k = int(input())
s = str(input())

if len(s) <= k:
    print(s)
else:
    print(s[:k]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = input()
if len(s) <=k:
  print(k)
else:
  s = s[:k] + "..."
  print(s)

Failing test case input:
40
gddhlfbqmteshimoohtereuovdopvntgsftcnt

Expected output:
gddhlfbqmteshimoohtereuovdopvntgsftcnt


Actual output:
40


Fixed submission (verdict: Accepted):
k = int(input())
s = input()
if len(s) <=k:
  print(s)
else:
  s = s[:k] + "..."
  print(s)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k=int(input())
s=input()
char=[]
if len(s) <= k:
    print(s)
else:
    for i in range(k):
        char.append((s[i]))
        
print(''.join(char) + "...")

Failing test case input:
40
gddhlfbqmteshimoohtereuovdopvntgsftcnt

Expected output:
gddhlfbqmteshimoohtereuovdopvntgsftcnt


Actual output:
gddhlfbqmteshimoohtereuovdopvntgsftcnt
...


Fixed submission (verdict: Accepted):
k=int(input())
s=input()
char=[]
if len(s) <= k:
    print(s)
elif len(s) > k:
    for i in range(k):
        char.append((s[i]))
    print(''.join(char) + "...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = [input() for i in range(2)]

k = int(n[0])
s = n[1]

print(k,s)

if len(s) <= k:
    print(s)

else:
    s = s[0:k] + "..."
    print(s)
    

Failing test case input:
40
ferclhbenterhominesidquodvonunteretdnt

Expected output:
ferclhbenterhominesidquodvonunteretdnt


Actual output:
40 ferclhbenterhominesidquodvonunteretdnt
ferclhbenterhominesidquodvonunteretdnt


Fixed submission (verdict: Accepted):
n = [input() for i in range(2)]

k = int(n[0])
s = n[1]

if len(s) <= k:
    print(s)

else:
    s = s[0:k] + "..."
    print(s)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = input()

if(len(s) <= k):
  print(s)
else:
  print(s[:k])

Failing test case input:
7
nikoandsolstice

Expected output:
nikoand...

Actual output:
nikoand


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

if(len(s) <= k):
  print(s)
else:
  print(s[:k] + "...")
Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
keta = int(input())
word = str(input())

if len(word) <= keta:
  print(word)
else:
  print(word[:keta-1] + "...")

Failing test case input:
7
btdvbnfqollimuk

Expected output:
btdvbnf...


Actual output:
btdvbn...


Fixed submission (verdict: Accepted):
keta = int(input())
word = str(input())
 
if len(word) <= keta:
  print(word)
else:
  print(word[:keta] + "...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
  k = str(input())
  s = str(input())
  h = len(k)
  w = len(s)
  
  if w<h:
    print(s)
  else:
    print(s[:h] + '...')
    
main()

Failing test case input:
40
ferclebhmterhnmioesidquodvonunteretdnt

Expected output:
ferclebhmterhnmioesidquodvonunteretdnt


Actual output:
fe...


Fixed submission (verdict: Accepted):
def main():
  k = int(input())
  s = str(input())
  w = len(s)
  
  if w<=k:
    print(s)
  else:
    print(s[:k] + '...')
    
main()

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K=int(input())
S=list(input())

if len(S) <= K:
    print(S)
else:
    print(S[0:(K-1):1],"...")


Failing test case input:
40
tndteretnunoveouedrsqoimnhretmhbelchef

Expected output:
tndteretnunoveouedrsqoimnhretmhbelchef


Actual output:
t n d t e r e t n u n o v e o u e d r s q o i m n h r e t m h b e l c h e f

Fixed submission (verdict: Accepted):
K=int(input())
S=input()
s=list(S)

if len(s) <= K:
    print(S)
else:
    print(S[0:K:]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
m = input()

m_1 = list(m)

if len(m_1)>int(n):
  a = "".join(m_1[0:int(n)])
  print(a+"...")
else:
  print(n)

Failing test case input:
40
gddhlmbqlteshifoohtereuovdopfntgsvtcnt

Expected output:
gddhlmbqlteshifoohtereuovdopfntgsvtcnt


Actual output:
40


Fixed submission (verdict: Accepted):
n = input()
m = input()
 
m_1 = list(m)
 
if len(m_1)>int(n):
  a = "".join(m_1[0:int(n)])
  print(a+"...")
else:
  print(m)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
arr=input()
z=len(arr)
if z<=n:
    print(arr)
else:
    print(arr[:n],"...")

Failing test case input:
7
uscuckfqolcinpk

Expected output:
uscuckf...


Actual output:
uscuckf ...


Fixed submission (verdict: Accepted):
n=int(input())
arr=input()
z=len(arr)
if z<=n:
    print(arr)
else:
    print(arr[:n]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = input()
w = len(s)
if w <= k:
    print(s)
else:
    ans = s[0:k-1]
    print('%s...' % ans)

Failing test case input:
7
tcsuckfpolcinpj

Expected output:
tcsuckf...


Actual output:
tcsuck...


Fixed submission (verdict: Accepted):
k = int(input())
s = input()
w = len(s)
if w <= k:
    print(s)
else:
    ans = s[0:k]
    print('%s...' % ans)
Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()
s = len(S)

if s <= K:
  print(S)
if s > K:
  print(S + '...')



Failing test case input:
7
scctskoofnciljp

Expected output:
scctsko...


Actual output:
scctskoofnciljp...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()
s = len(S)

if s <= K:
  print(S)
else:
  print(S[:K] + '...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()
s = len(S)

if s <= K:
  print(S)
else:
  print(S + "...")


Failing test case input:
7
oiksbncooletics

Expected output:
oiksbnc...


Actual output:
oiksbncooletics...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()
s = len(S)

if s <= K:
  print(S)
else:
  print(S[:K] + "...")

Problem: p02676
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
k=int(input())
s=input()
if len(s) <= k:
  print(s)
else:
  print(s[:k])

Failing test case input:
7
kpniclopfkcusct

Expected output:
kpniclo...


Actual output:
kpniclo


Fixed submission (verdict: Accepted):
k=int(input())
s=input()
if len(s) <= k:
  print(s)
else:
  print(f"{s[:k]}...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = input()
lists = list(s)
news = list()
if len(lists) <= k:
    print(s)
else:
    for i in range(k):
        news.append(lists[i])
result = "".join(news)
print(result + "...")

Failing test case input:
40
gdeclfbqmterhimnohrreeuovdoovntgsfthnt

Expected output:
gdeclfbqmterhimnohrreeuovdoovntgsfthnt


Actual output:
gdeclfbqmterhimnohrreeuovdoovntgsfthnt
...


Fixed submission (verdict: Accepted):
k = int(input())
s = input()
lists = list(s)
news = list()
if len(lists) <= k:
    print(s)
else:
    for i in range(k):
        news.append(lists[i])
    result = "".join(news)
    print(result + "...")

Problem: p02676
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
k=int(input())
s=input()
print(s[:k] + (len(s)-k)*'.')

Failing test case input:
7
uscvckfqolbiopk

Expected output:
uscvckf...


Actual output:
uscvckf........


Fixed submission (verdict: Accepted):
k=int(input())
s=input()
print(s[:k] + (len(s)>k)*'...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k=int(input())
s=str(input())
if len(s)<=k:
  print(s)
  exit()
else:
  print(s[:len(s)-1]+"...")

Failing test case input:
7
tscuckfqolcinpk

Expected output:
tscuckf...


Actual output:
tscuckfqolcinp...


Fixed submission (verdict: Accepted):
k=int(input())
s=str(input())
if len(s)<=k:
  print(s)
  exit()
else:
  print(s[0:k]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = input()

if k <= len(str(s)):
  print(s)
else:
  print(s[k:] + '...')

Failing test case input:
40
gddhlfbqmteshimoohtereuovdopvntgsftcnt

Expected output:
gddhlfbqmteshimoohtereuovdopvntgsftcnt


Actual output:
...


Fixed submission (verdict: Accepted):
k = int(input())
s = input()
 
if len(str(s)) <= k:
  print(s)
else:
  print(s[:k] + '...')
Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K=int(input())
S=list(input())
answer=[]
if len(S)>=K:
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  g+='...'
  print(g)

Failing test case input:
40
tnduerctnunovdouqdisenimohretnebhleref

Expected output:
tnduerctnunovdouqdisenimohretnebhleref


Actual output:
tnduerctnunovdouqdisenimohretnebhleref...


Fixed submission (verdict: Accepted):
K=int(input())
S=list(input())
if len(S)>K:
  answer=[]
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  print(g)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  S = S[0:K+1]
  print(S+'...')

Failing test case input:
7
tcstckfpolcinpj

Expected output:
tcstckf...


Actual output:
tcstckfp...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  S = S[0:K]
  print(S+'...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

if K <= len(S):
  print(S)
else:
  print(S[:K] + "...")

Failing test case input:
7
ktnillnqtmbvdbf

Expected output:
ktnilln...


Actual output:
ktnillnqtmbvdbf


Fixed submission (verdict: Accepted):
K = int(input())
S = input()
 
if K >= len(S):
  print(S)
else:
  print(S[:K] + "...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = input()
if k >= len(s):
    print(s)
else:
    length = len(s)-k
    print(s[:k]+'.'*length)


Failing test case input:
7
ftdvbnbqollinuk

Expected output:
ftdvbnb...


Actual output:
ftdvbnb........


Fixed submission (verdict: Accepted):
k = int(input())
s = input()
if k >= len(s):
    print(s)
else:
    print(s[:k]+'...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = int(input())
K = str(input())

if S <= len(K):
    print(S)
else:
    print(K[:S] + "...")

Failing test case input:
40
gddhlmbqlteshifoohtereuovdopfntgsvtcnt

Expected output:
gddhlmbqlteshifoohtereuovdopfntgsvtcnt


Actual output:
gddhlmbqlteshifoohtereuovdopfntgsvtcnt...


Fixed submission (verdict: Accepted):
K = int(input())
S = str(input())

if len(S) <= K:
    print(S)
else:
    print(S[:K] + "...")
Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def triple_dot():
    k = int(input())
    s = list(input())
    len_s =len(s)
    result_s = []
    
    if len_s > k:
        for i in range(k):
            result_s.append(s[i])
    if len_s < k:
        print("".join(s))

triple_dot()

Failing test case input:
7
uscvckfqolbiopk

Expected output:
uscvckf...


Actual output:

Fixed submission (verdict: Accepted):
def triple_dot():
    k = int(input())
    s = input()
    len_s =len(s)
    result_s = []
    
    if len_s > k:
        for i in range(k):
            result_s.append(s[i])
        print("".join(result_s) + "...")
    else:
        print("".join(s))
triple_dot()

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

ls = len(S)
if ls <= K:
  print(S)
else:
  print(S[:K])

Failing test case input:
7
jpniclfookstccs

Expected output:
jpniclf...


Actual output:
jpniclf


Fixed submission (verdict: Accepted):
K = int(input())
S = input()

ls = len(S)
if ls <= K:
  print(S)
else:
  print(S[:K]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

if K < len(S):
    print(S[0:K] + '･･･')


else:
    print(S)

Failing test case input:
7
tscuckfqolcinpk

Expected output:
tscuckf...


Actual output:
tscuckf･･･


Fixed submission (verdict: Accepted):
K = int(input())
S = input()

if K < len(S):
    print(S[0:K] + '...')


else:
    print(S)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = input()

if len(s) <= k :
    print(s)
else :
    print(s[:k]+"...")
print(len(s))

Failing test case input:
7
oiksbncooletics

Expected output:
oiksbnc...


Actual output:
oiksbnc...
15


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

if len(s) <= k :
    print(s)
else :
    print(s[:k]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math

def dict_sort(ans):
    ans=sorted(ans.items(),reverse=True,key=lambda kv:(kv[1]))
def is_prime(n,k):
    if n==1:
        return 0
    for i in range(2,int(math.sqrt(n))+1):
        if n%i==0:
            res=i
            break
    return res
def inp():
    ls=list(map(int,input().split()))
    return ls
t=int(input())
s=input()
if len(s)<=t:
    print(s)
else:
    print(s[0:t],end="")
    for i in range(len(s)-t):
        print('.',end='')
    print()


Failing test case input:
7
oiksbncooletics

Expected output:
oiksbnc...


Actual output:
oiksbnc........


Fixed submission (verdict: Accepted):
import math

def dict_sort(ans):
    ans=sorted(ans.items(),reverse=True,key=lambda kv:(kv[1]))
def is_prime(n,k):
    if n==1:
        return 0
    for i in range(2,int(math.sqrt(n))+1):
        if n%i==0:
            res=i
            break
    return res
def inp():
    ls=list(map(int,input().split()))
    return ls
t=int(input())
s=input()
if len(s)<=t:
    print(s)
else:
    print(s[0:t]+"...")
Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = str(input())
if len(S) == K:
    print(K)
if len(S) > K:
    print(S[:K]+"...")

Failing test case input:
40
tnetesetnvooevouedrrhoimnhrftmqbelchef

Expected output:
tnetesetnvooevouedrrhoimnhrftmqbelchef


Actual output:

Fixed submission (verdict: Accepted):
K = int(input())
S = str(input())
if len(S) <= K:
    print(S)
if len(S) > K:
    print(S[:K]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  S_ = S[0:K-1]
  print(S+'...')

Failing test case input:
7
fbdvbmtqnllintk

Expected output:
fbdvbmt...


Actual output:
fbdvbmtqnllintk...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  S_ = S[0:K]
  print(S_+'...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K=int(input())
S=str(input())
if len(S) <= K:
    print(S)
elif len(S) > K:
    print(S[0:int(K)])

Failing test case input:
7
uscvckfqolbiopk

Expected output:
uscvckf...


Actual output:
uscvckf


Fixed submission (verdict: Accepted):
K=int(input())
S=str(input())
if len(S) <= K:
    print(S)
elif len(S) > K:
    print(S[0:int(K)]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

if len(S) <+ K:
    print(S)
elif len(S) > K:
    SK = S[: K]+ "…"
    print(SK)

Failing test case input:
7
oikoandrolstice

Expected output:
oikoand...


Actual output:
oikoand…


Fixed submission (verdict: Accepted):
K = int(input())
S = input()

if len(S) <= K:
    print(S)
elif len(S) > K:
    SK = S[: K]+ "..."
    print(SK)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect






import sys

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

K = ni()
S = ns()
if len(S) <= K:
    print(S)
else:
    print(S[:K] + '..')

Failing test case input:
7
ksnjllnqtmbvdbf

Expected output:
ksnjlln...


Actual output:
ksnjlln..


Fixed submission (verdict: Accepted):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect






import sys

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

K = ni()
S = ns()
if len(S) <= K:
    print(S)
else:
    print(S[:K] + '...')
Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = input()
if len(a) > n:
  print(a[0:n+1])
else:
  print(a)

Failing test case input:
7
kumilloqfnbvdtb

Expected output:
kumillo...


Actual output:
kumilloq


Fixed submission (verdict: Accepted):
n = int(input())
a = input()
if len(a) > n:
  print(a[0:n]+'...')
else:
  print(a )

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

if len(S) <= K:
    print(K)
else:
    print(S[0:K]+'...')


Failing test case input:
40
tnetesftnvooevouedrrhoimnhretmqbelcheg

Expected output:
tnetesftnvooevouedrrhoimnhretmqbelcheg


Actual output:
40


Fixed submission (verdict: Accepted):
K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    print(S[0:K]+'...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[K:]+"...")

Failing test case input:
7
oikoandrolstice

Expected output:
oikoand...


Actual output:
rolstice...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()

if len(S) > K:
  S = S[:K] + "..."
print(S)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

if K - len(S) >= 0:
    print(S)
else:
    print(S[0:K+1].format(...))

Failing test case input:
7
oikoancrolstice

Expected output:
oikoanc...


Actual output:
oikoancr


Fixed submission (verdict: Accepted):
K = int(input())
S = input()

if K - len(S) >= 0:
    print(S)
else:
    print("{}...".format(S[0:K]))

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K=int(input())
S=input()

if len(S) <= K:
  print(S)
else:
  print(S[0:K]+"…")

Failing test case input:
7
kuoilkoqfbcvdso

Expected output:
kuoilko...


Actual output:
kuoilko…


Fixed submission (verdict: Accepted):
K=int(input())
S=input()

if len(S) <= K:
  print(S)
else:
  print(S[0:K]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k=int(input())
s=input()

if len(s)<=k:
  print(s)
else:
  print(s[:k])

Failing test case input:
7
fbdvbntqollinuk

Expected output:
fbdvbnt...


Actual output:
fbdvbnt


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

if len(s)<=k:
  print(s)
else:
  print(s[:k]+'...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
s = input()

if len(s) < K:
  print(s)
else:
  print(s[:K])
  

Failing test case input:
7
ftdvbnbqollinuk

Expected output:
ftdvbnb...


Actual output:
ftdvbnb


Fixed submission (verdict: Accepted):
K = int(input())
s = input()

if len(s) <= K:
  print(s)
else:
  print(s[:K] + '...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

k =int(input())
s=input()

if len(s)<=k:
    print(s)
else:
    print(s[0:k]+'…')

Failing test case input:
7
kuoibkoqflcvdso

Expected output:
kuoibko...


Actual output:
kuoibko…


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

if len(s)<=k:
    print(s)
else:
    print(s[0:k]+'...')
Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  print(S[K:]+"...")


Failing test case input:
7
tscuckfqolcinpk

Expected output:
tscuckf...


Actual output:
qolcinpk...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  print(S[:K]+"...");

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
s = input()
if len(s)<=n:
  print(s)
else:
  print(s[:7]+'.'*(len(s)-n))


Failing test case input:
7
oikobncsoletics

Expected output:
oikobnc...


Actual output:
oikobnc........


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
if len(s)<=n:
  print(s)
else:
  print(s[:n]+'...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[:]+'...')


Failing test case input:
7
uscuckfqolcinpk

Expected output:
uscuckf...


Actual output:
uscuckfqolcinpk...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[:K]+'...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
s=input()
score=''
if n>=len(s):
	print(s)
else:
	for i in range(n):
		score+=s[i]
print("{}...".format(score)) 
	
	

Failing test case input:
40
fehclebhltfrhnmioqsrdeuoveoounteretent

Expected output:
fehclebhltfrhnmioqsrdeuoveoounteretent


Actual output:
fehclebhltfrhnmioqsrdeuoveoounteretent
...


Fixed submission (verdict: Accepted):
n=int(input())
s=input()
score=''
if n>=len(s):
	print(s)
else:
	for i in range(n):
		score+=s[i]
	print("{}...".format(score))

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K=int(input())
S=input()
if(len(S)<=K):
  print(S)
else:
  print(S[:K]+"…")

Failing test case input:
7
uscvckfqolbiopk

Expected output:
uscvckf...


Actual output:
uscvckf…


Fixed submission (verdict: Accepted):
K=int(input())
S=input()
if(len(S)<=K):
  print(S)
else:
  print(S[:K]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K = int(input())
S = input()

n = len(S)
if n <= K:
    print(S)
else:
    print(S[0:K+1] + '...')


Failing test case input:
7
oikoandrolstice

Expected output:
oikoand...


Actual output:
oikoandr...


Fixed submission (verdict: Accepted):
K = int(input())
S = input()

n = len(S)
if n <= K:
    print(S)
else:
    print(S[0:K] + '...')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = list(input())
if k>=len(s):
    print(s)
else:
    for i in range (k):
        print(s[i])
    print("...")
  

Failing test case input:
40
tnetesetnvooevouedrrhoimnhrftmqbelchef

Expected output:
tnetesetnvooevouedrrhoimnhrftmqbelchef


Actual output:
t n e t e s e t n v o o e v o u e d r r h o i m n h r f t m q b e l c h e f

Fixed submission (verdict: Accepted):
k = int(input())
s =input()
if k>=len(s):
    print(s)
else:
    for i in range (k):
        print(s[i],end="")
    print("...")
Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
s = str(input())

if n >= len(s):
    print(s)
else:
    print(s[0] + "...")

Failing test case input:
7
kooibkoqflcvcsu

Expected output:
kooibko...


Actual output:
k...


Fixed submission (verdict: Accepted):

n = int(input())
s = str(input())

if n >= len(s):
    print(s)
else:
    print(s[0:n] + "...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = input()
S = len(s)
if S > k :
    print(s[:k],"...")
else:
    print(s)

Failing test case input:
7
oikoandrolstice

Expected output:
oikoand...


Actual output:
oikoand ...


Fixed submission (verdict: Accepted):
k = int(input())
s = str(input())

if len(s) <= k:
    print(s)
else:
    print(s[:k]+"...")

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
K=int(input())
S=input()
if len(S) <= K :
    print(S)
else:
    print(S[:K],'...',end='')    

Failing test case input:
7
scctskoofnciljp

Expected output:
scctsko...


Actual output:
scctsko ...

Fixed submission (verdict: Accepted):
K=int(input())
S=input()
if len(S) <= K :
    print(S)
else:
    print(S[:K]+'...',end='')

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
limit=int(input())
s=list(input())
if len(s)>limit:
	s=''.join(s[:limit])+'...'
print(s)

Failing test case input:
40
ferclebhmterhnmioesidquodvonunteretdnt

Expected output:
ferclebhmterhnmioesidquodvonunteretdnt


Actual output:
f e r c l e b h m t e r h n m i o e s i d q u o d v o n u n t e r e t d n t

Fixed submission (verdict: Accepted):
limit=int(input())
s=input()
if len(s)>limit:
	s=s[:limit]+'...'
print(s)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):






K = int(input())
S = input()

if(len(S) <= K):
    print(S)
else:
    print(S[K:] + '.' * 3)
    

Failing test case input:
7
ecitslosdnaokin

Expected output:
ecitslo...


Actual output:
sdnaokin...


Fixed submission (verdict: Accepted):






K = int(input())
S = input()



if(len(S) <= K):
    print(S)
else:
    print(S[:K] + '.' * 3)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
k = int(input())
s = str(input())




if len(s) > k:
  print(s[:k] , '...')
else :
  print(s)

Failing test case input:
7
scctslooenbikjp

Expected output:
scctslo...


Actual output:
scctslo ...


Fixed submission (verdict: Accepted):
k = int(input())
s = str(input())




if len(s) > k:
  temp = s[:k] + '...'  
  print(temp)
else :
  print(s)

Problem: p02676
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
K = int(input())
S = input()

if(len(S)>K):
    print(S)
else:
    print(S[:K])

Failing test case input:
7
ecitslosdnaokin

Expected output:
ecitslo...


Actual output:
ecitslosdnaokin


Fixed submission (verdict: Accepted):
import sys
K = int(input())
S = input()

if(len(S)<=K):
    print(S)
else:
    print(S[:K]+"...")