Problem:
 Score : 600 points    Problem Statement We have a sequence of length N consisting of non-negative integers. Consider performing the following operation on this sequence until the largest element in this sequence becomes N-1 or smaller.   Determine the largest element in the sequence (if there is more than one, choose one). Decrease the value of this element by N , and increase each of the other elements by 1 .   It can be proved that the largest element in the sequence becomes N-1 or smaller after a finite number of operations.  You are given an integer K . Find an integer sequence a_i such that the number of times we will perform the above operation is exactly K . It can be shown that there is always such a sequence under the constraints on input and output in this problem.      Constraints  0 ≤ K ≤ 50 \times 10^{16}         Input Input is given from Standard Input in the following format:  K       Output Print a solution in the following format:  N  a_1  a_2 ... a_N   Here, 2 ≤ N ≤ 50 and 0 ≤ a_i ≤ 10^{16} + 1000 must hold.        Sample Input 1 0      Sample Output 1 4
3 3 3 3       Sample Input 2 1      Sample Output 2 3
1 0 3       Sample Input 3 2      Sample Output 3 2
2 2  The operation will be performed twice: [2, 2] -> [0, 3] -> [1, 1].       Sample Input 4 3      Sample Output 4 7
27 0 0 0 0 0 0       Sample Input 5 1234567894848      Sample Output 5 10
1000 193 256 777 0 1 1192 1234567891011 48 425

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

K = INT()

start = K // 50
avoid = start + 50 - K % 50

ans = []
for i in range(start, start+51):
    if i != avoid:
        ans.append(i)

print(len(ans))
print(*ans)

Solution (Python):
import numpy as np
k=int(input())
t=np.array([49+((k-1)//50+1)]*50)
for i in range(0 if k%50==0 else 50-k%50):
    k=np.argmax(t)
    t+=1
    t[k]-=50+1
print(50)
print(*t)

Solution (Python):
k = int(input())
ans = [i for i in range(50)]

def inv_process(arr,i):
    arr[i] += 50
    for j in range(50):
        if j == i:
            continue
        else:
            arr[j]-=1
loop = k//50
sup = k-loop*50

for i in range(50):
    ans[i] += loop


for i in range(sup):
    inv_process(ans,i)

print(50)
for i in range(49):
    print(ans[i],end=" ")
print(ans[-1])

Solution (Python):
import sys,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

n = onem()
print(50)
a = [i + n//(50) for i in range(50)]

if n%(50) == 0:
    print(jo(a))
else:
    for i in range(50):
        if n%(50) >= i+1:
            a[i] += 50 - n%(50) +1
        else:
            a[i] -= n%(50)
    print(jo(a))

Solution (Python):

K = int(input())

print(50)
align = [i for i in range(50)]
n = K//50
for i in range(50):
    align[i]+=n
    
L = K-50*n
for i in range(L):
    align[i]+=50
    for j in range(50):
        if i != j:
            align[j]-=1
            
print(*align)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

def main(): 
    K = II()
    N = 50

    div, mod = divmod(K, N)

    li = list(range(div, div+N))

    for _ in range(mod):
        li.sort()
        li = [li[0]+N] + [i-1 for i in li[1:]]

    print(N)
    print(' '.join(map(str, li)))

main()

Solution (Python):
from decimal import *

k_str = input()
k = Decimal(k_str)
n = 50

A = [0] * (n)
pl = k // n

amari = k % n
kakanai = n - amari
start = (n + 1 - amari) % (n+1)
ind = 0

print(n)
for i in range(n+1):
    if start != kakanai:
        A[ind] = start + pl
        ind += 1
    start = (start + 1) % (n+1)

print(" ".join(map(str, A)))

Solution (Python):
K=int(input())
print(50)
a=[K//50+i for i in range(49,-1,-1)]
for i in range(K%50):
    a[i]+=1
print(*a)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007


def A():
    n = II()
    print("ABC"+str(n))
    return


def B():
    ni = [2 ** i for i in range(1, 10)]
    n = II()
    ans = 1
    for i in range(1, n + 1):
        if i in ni:
            ans = i
    print(ans)        
    return


def C():
    n, m = LI()
    edg = [[] for i in range(n)]
    for _ in range(m):
        a, b = LI_()
        edg[a].append(b)
        edg[b].append(a)
    next = []
    for i in edg[0]:
        next.append(i)
    for ne in next:
        for i in edg[ne]:
            if i == n - 1:
                print("POSSIBLE")
                return
    print("IMPOSSIBLE")
    return


def D():
    k = II()
    a = k // 50
    b = k % 50
    print(50)
    a = [49 + a] * 50
    for i in range(b):
        for j in range(50):
            if i == j:
                a[j] += 50
            else:
                a[j] -= 1
    print(" ".join(map(str, a)))
    return


if __name__ == '__main__':
    D()

Solution (Python):
k,s=divmod(int(input()),50);d=50-s;print(50);print(*[50+k]*s+[d+k-1]*d)

Solution (Python):
n=50;k,s=divmod(int(input()),n);d=n-s;print(n);print(*[n+k]*s+[d+k-1]*d)

Solution (Python):
k,n=int(input()),50
b,c=k%n,k//n
d=n-b
print(n)
print(*[n+c]*b+[d+c-1]*d)

Solution (Python):
k = int(input())
n = 50
b,c = k % n, k // n
ans = [n + c] * (b) + [n + c - b - 1] * (n - b)
print(n)
print(*ans)

Solution (Python):
K = int(input())
N = 50
p, r = divmod(K, N)
ans = [2 * N + p - r] * r + [N + p - r - 1] * (N - r)
print(N)
print(*ans)

Solution (Python):
K = int(input())
N = 50
p = (K - 1) // N
r = (K - 1) % N + 1
ans = [2 * N + p - r] * r + [N + p - r - 1] * (N - r)
print(N)
print(*ans)

Solution (Python):
K = int(input())
N = 50
As = [K//N]*N
K = K%50
for i in range(N):
  if i < N-K:
    As[i] += i
  else:
    As[i] += i+1
print(N)
print(" ".join(map(str, As)))

Solution (Python):
K = int(input())
N = 50

A = []
for k in range(N):
    a = -(K%N)
    if K%N > k:
        a += N+1
    A.append(k + K//N + a)

print(N)
for a in A:
    print(a, end=' ')
print()

Solution (Python):
K = int(input())
N = 50

a = N + (K // N) + (N - K % N)
ret = [a] * (K % N) + [a-(N+1)] * (N - K % N)
print(N)
print(*ret)

Solution (Python):
K = int(input())
N = 50

print(N)
br = (K-1)//50
pos = K-50*br
ans_list = list(range(br,br+50))
for i in range(pos,N):
    ans_list[i] -= 1*pos
for i in range(0,pos):
    ans_list[i] = ans_list[i]+N-(1*pos)+1

print(" ".join(map(str,ans_list)))

Solution (Python):
import sys
import numpy as np
input = sys.stdin.readline

def main():
    N = 50
    K = int(input())
    
    tmp = K // N
    K %= N
    a = np.array([i for i in range(N)])
    for i in range(K):
        a -= 1
        a[i] += N + 1
    print(N)
    for i in range(N-1):
        print(a[i]+tmp, end=" ")
    print(a[N-1]+tmp)

if __name__ == "__main__":
    main()

Solution (Python):
K = int(input())
q = K // 50
r = K % 50
A = list(range(q, 50 + q))

for i in range(r):
    A[i] += 51 - r
for i in range(r, 50):
    A[i] -= r
print(50)
print(*A)

Solution (Python):



import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

k = I()
n = 50
ans = [i for i in range(n)]
d,m = divmod(k,n)
for i in range(n):
    ans[i] += d
    if n - i <= m:
        ans[i] += 1
print(n)
print(*ans)

Solution (Python):

import sys
INF = float("inf")


def solve(K: int):
    N = 50
    div, mod = divmod(K, N)
    ans = [i+div for i in range(N)]
    for i in range(mod):
        ans[i] += N
        for j in range(N):
            if i == j:
                continue
            ans[j] -= 1

    print(N)
    print(*ans, sep=" ")

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  
    solve(K)


if __name__ == '__main__':
    main()

Solution (Python):
import sys, math, itertools, bisect, copy, re, heapq
from collections import Counter, deque, defaultdict
from itertools import accumulate, permutations, combinations, takewhile, compress, cycle






INF = float('inf')
MOD = 10 ** 9 + 7
EPS = 10 ** -7
sys.setrecursionlimit(1000000)








K = int(input())

MAX = 10 ** 16


def f(i, j):
    P = K % 50
    Q = i // 50
    if j < P:
        ret = 49 + 50 - P + 1 + Q
    else:
        ret = 49 - P + Q
    return ret


A = []
for j in range(50):
    A.append(f(K, j))


print(50)
print(" ".join([str(x) for x in A]))

Solution (Python):
K = int(input())
N = 50

q, r = divmod(K, N)

ans = [q + (N - 1) - r] * (50 - r) + [q + (N - 1) + N - (r - 1)] * r

print(50)
print(*ans)

Solution (Python):


import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 




k = int(input())

q,r = divmod(k,50)
c =q+49
a = [c-r]*(50-r) + [c+50-(r-1)]*r

print(50)
print(*a)

Solution (Python):
K = int(input())
if(K==0):
    print(4)
    print(3,3,3,3)
elif(K==1):
    print(3)
    print(1,0,3)
elif(K<50):
    n = K
    li = [i for i in range(n)]
    for i in range(n):
        for j in range(n):
            if(i==j):
                li[j] += n
            else:
                li[j] -= 1
    print(n)
    print(*li)
else:
    x = K%50
    y = K//50
    li = [y+i for i in range(50)]
    for i in range(x):
        for j in range(50):
            if(i==j):
                li[j] += 50
            else:
                li[j] -= 1
    print(50)
    print(*li)

Solution (Python):
k = int(input())
n = 50
a = k // n
b = k % n
print(n)
for i in range(b):
    print(n - 1 + a + 50 - (b - 1), end = " ")
for i in range(n - b):
    print(n - 1 + a - b, end = " ")

Solution (Python):
k = int(input())
ans = [k//50] * 50
for i in range(50):
    ans[i] += i + 1
for i in range(50 - (k % 50)):
    ans[i] -= 1
print(50)
print(" ".join(map(str, ans)))

Solution (Python):
K = int(input())
N = 50
r = K % N
a = [N - 1 + K // N - r] * N
for i in range(r):
    a[i] += N + 1
print(N)
print(" ".join(map(str, a)))

Solution (Python):
import math

def f(l):
    mx=max(l)
    flg=True
    for i in range(len(l)):
        if (mx==l[i] and flg==True):
            flg=False
            l[i]-=50
            l[i]=max(0,l[i])
        else:
            l[i]+=1
    return l


def solve(k):
    
    N=50
    a=k//N+1
    if (k%N==0) :
        a-=1
    l=[a+i for i in range(50)]
    mod=(N-(k%N))%N
    for i in range(mod):
        l=f(l)
    l=sorted(l,reverse=True)
    print(50)
    for i in range(50):
        print(str(l[i])+" ",end="")
    print("")
    ret=0
solve(int(input()))

Solution (Python):
K = int(input())
N = 50
a = [i for i in range(50)]
d, m = divmod(K, N)
for i in range(N):
  a[i] += d
  if N - i <= m:
    a[i] += 1

print(N)
print(" ".join(map(str, a)))

Solution (Python):
K = int(input())
N = 50
r = K % N
a = [N - 1 + K // N - r] * N
for i in range(r):
    a[i] += N + 1
print(N)
print(" ".join(map(str, a)))

Solution (Python):
K = int(input())
N = 50
a = [N-1] * N
for _ in range(K % N):
    a.sort()
    for p in range(N):
        if a[p] + N >= a[N - 1] - 1:
            for i in range(N):
                if i == p:
                    a[i] += N
                else:
                    a[i] -= 1
            break
for i in range(N):
    a[i] += K // N
print(N)
print(" ".join(map(str, a)))

Solution (Python):
import numpy as np
K = int(input())
q, r = divmod(K, 50)
print(50)
print(*(np.array([100 - r] * r + [49 - r] * (50 - r)) + q))

Solution (Python):
def f(k):
    n = 50
    a = [k//n + n-1] * n
    for i in range(k%n):
        for j in range(n):
            if i == j:
                a[j] += n
            else:
                a[j] -= 1
    return a

def solve(k):
    a = f(k)
    print(len(a))
    print(" ".join(map(str, a)))

solve(k=int(input()))

Solution (Python):



def main():
    k = int(input())
    n = 50
    p, q = divmod(k, n)
    a = [i + p for i in range(n)]

    for i in range(q):
        for j in range(n):
            if j == i:
                a[j] += 50
            else:
                a[j] -= 1

    print(n)
    print(' '.join(map(str, a)))


if __name__ == '__main__':
    main()

Solution (Python):
import sys
import numpy as np


def main():
    k = int(input())
    n = 50
    an = [n - 1 + (k // n) - (k % n) for _ in range(n)]
    for i in range(k % n):
        an[i] += n + 1
    print(n)
    print(*an)


main()

Solution (Python):
K = int(input())

a = K//50
b = K%50

print (50)
for i in range(49-b):
    print (48 + a -b, end = ' ')
for i in range(b):
    print (48 + a + 50 - (b-1), end = ' ')
print (49 + a - b)

Solution (Python):
k=int(input())
n=50

a=[k//n+49 for i in range(n)]

for i in range(n):
    if i<k%n:
        a[i]+=n-k%n+1
    else:
        a[i]-=k%n

print(n)
for i in range(n):
    if i<n-1:
        print(a[i],end=" ")
    else:
        print(a[i])

Solution (Python):
k = int(input())
n = 50
a = [49 + k // n] * n
for i in range(k - k // n * n):
    a[i] += n + 1
    for j in range(n):
        a[j] -= 1
print(n)
print(' '.join(map(str, a)))

Solution (Python):
import sys

sys.setrecursionlimit(100000)
INF = float('inf')

K = int(sys.stdin.readline())

N = 50
ans = [a + K // N for a in range(N)]
for _ in range(K % N):
    min_a = min(ans)
    ans = [a + N if a == min_a else a - 1 for a in ans]
print(N)
print(*ans)

Solution (Python):
k = int(input())
n = 50
p,q = k//n,k%n
l = list(range(p-q,50+p-q))
for i in range(q):
  l[i] += n+1
print(n)
print(" ".join(map(str,l)))

Solution (Python):
k = int(input())
n = 50
p,q = k//n,k%n
l = list(range(p-q,50+p-q))
for i in range(q):
  l[i] += n+1
print(n)
print(" ".join(map(str,l)))

Solution (Python):










K = int(input())
N = 50

x,r = K//N,K%N
a = (N-1+x)+N-(r-1)
b = (N-1+x)-r
answer = [str(a)] * r + [str(b)]*(N-r)
print(N)
print(' '.join(answer))

Solution (Python):
k=int(input())
x=k//50
y=k%50
ans=[x-y+49 for i in range(50)]
for i in range(y):
    ans[i]+=51
print(50)
print(" ".join(map(str,ans)))

Solution (Python):
k=int(input())
n=50
a=[0]*n
cnt=k//n
rest=k%n
for i in range(n):
  a[i]=cnt+i
for i in range(rest):
  for j in range(n):
    if i==j:
      a[j]+=n
    else:
      a[j]-=1
print(50)
print(*a)

Solution (Python):
k = int(input())
base = k//50
ans = [i for i in range(base,base+51)]
for i in range(k%50):
    ans[i] += 50
    for j in range(50):
        if i!=j:
            ans[j] -= 1
print(50)
for i in range(50):
    print(ans[i],end=' ')
print()

Solution (Python):
k=int(input())
arr=[0]*50
for i in range(50):
  if k%50==0:
    arr[i]+=50*min(1,k)+max((k//50-1),0)
  else:
    if i<=(k%50-1):
      if k<50:
        arr[i]+=50
      else:
        arr[i]+=50+(k//50)
    else:
      if k<50:
        arr[i]=0
      else:
        arr[i]+=50+(k//50-1)-k%50
print(50)
print(*arr)

Solution (Python):
k = int(input())

b = k%50
c = k//50

a = [i+c for i in range(50)]

for i in range(b):
    a[-i-1] += 1

print(50)

for i in range(50):
    print(a[i],end=' ')

Solution (Python):
N=50;k,s=divmod(int(input()),N);print(N);print(*([49-s+k]*(N-s)+[100-s+k]*s))

Solution (Python):
K = int(input())

core = [[49-i]*(50-i) + [50*2-i]*i for i in range(50)]

print(50)
print(' '.join([str(a+K//50) for a in core[K%50]]))

Solution (Python):
k = int(input())

p = k//50
a = k%50

l = list(range(50))

if a > 0:
  l[50-a] = 50

print(50)
print(" ".join([str(p+l[i]) for i in range(50)]))

Solution (Python):
k = int(input())
n = 50
a = [0] * n
cnt = k // n
rest = k % n
for i in range(n):
	a[i] = cnt + i
for i in range(rest):
	for j in range(n):
		if i == j:
			a[j] += n
		else:
			a[j] -= 1
print(50)
print(*a)

Solution (Python):
k = int(input())

n = 50

a = [0] * n

cnt = k // n
rest = k % n


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


for i in range(rest):
	for j in range(n):
		if i == j:
			a[j] += n
		else:
			a[j] -= 1

print(50)
print(*a)

Solution (Python):
K=int(input("50\n"))
N=50
r=(K-1)%N+1
a=(K-r)//N+N
print(*([a]*r+[a-r-1]*(N-r)))

Solution (Python):
K = int(input())
N = 50
r = (K-1)%N+1
q = (K-r)//N
a = [N+q]*r + [N+q-r-1]*(N-r)
print(N)
print(*a)

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math


K = int(input())

N = 50
cnt = 0
ans_count = [0 for i in range(N)]
if K//N > 0:
    cnt = K//N
    for i in range(N):
        ans_count[i] = cnt
rest =K-cnt*N
for i in range(rest):
    ans_count[i] += 1

ans = [0 for i in range(N)]
for i in range(N):
    L = ans_count[i]
    ans[i] = (L+1)*(N+1)-2-K

print(N)
for i in range(N):
    print(ans[i],end=" ")

print()




'''
K回操作がある
そのうちじぶんが操作される回数をLとすると
L*N
それ以外はKーL
よって今の数がN-1とすると
元の数は
N-1＋L*N-K+L
=(L+1)*(N+1)-2-K


K=10
N = 3
L=3,3,4
3-1+3*3-10+3 = 4
4
8

4 4 8
5 5 5
1 6 6
2 3 7
3 4 4
'''

Solution (Python):
K = int(input())


N = 50
cnt = [K // 50 + (1 if K % 50 > i else 0) for i in range(50)]
A = [49 + (50 * c) - (K - c) for c in cnt]
print(N)
print(*A, sep=' ')

Solution (Python):
k = int(input())
d,f = k//50,k%50
n = 50
flow = [50-f-1]*(50-f) + [50-f+50]*f
base = [d]*50
print(n)
for i in range(50):
    print(base[i]+flow[i],end=" ")
print("")

Solution (Python):
k = int(input())
ans = [k//50] * 50
for i in range(50):
    ans[i] += i + 1
for i in range(50 - (k % 50)):
    ans[i] -= 1

print(50)
for item in ans:
    print(item, end=" ")

Solution (Python):
K=int(input())
n=50
t=K//50
r=K%50
a=49+t
s=[a]*n
for i in range(r):
    for j in range(n):
        if j==n-i-1:
            s[j]+=n
        else:
            s[j]-=1
print(n)
print(*s)

Solution (Python):
import sys

def f(A):
    n = len(A)
    A = sorted(A)
    B = [A[0] + n]
    for a in A[1:]:
        B.append(a-1)

    return B


def main():
    input = sys.stdin.readline
    K = int(input())

    i = 2
    while i <= 50:
        n = K // i
        m = K % i

        A = [0 for _ in range(i)]
        for j in range(i):
            A[j] = n + j

        for _ in range(m):
            A = f(A)

        if max(A) <= 10**16 + 1000:
            print(i)
            print(*A)
            return 0
        else:
            i += 1


if __name__ == '__main__':
    main()

Solution (Python):
def decrease(K: int)->list:
    ret = [i + (K//50) for i in range(50)]
    for i in range(K % 50):
        for j in range(50):
            if j == i:
                ret[j] += 50
            else:
                ret[j] -= 1

    return ret


if __name__ == "__main__":
    K = int(input())
    ans = decrease(K)
    print(len(ans))
    print(' '.join(map(str, ans)))

Solution (Python):
K=int(input())
print(50)
ans=[i for i in range(51)]
ans.pop(50-K%50)
res=''
for i in range(50):
    res+=str(K//50+ans[i])+' '
print(res[:-1])

Solution (Python):
def main():
    K = int(input())
    N = 50
    ans = list(range(50, 0, -1))
    if K <= 50:
        ans = ans[:K] + [0]*(50-K)
    else:
        x = (K-50) // 50
        y = (K-50) % 50
        for i in range(50):
            ans[i] += x
            if i < y:
                ans[i] += 1
    print(N)
    print(" ".join(map(str, ans)))


if __name__ == "__main__":
    main()

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007






"""
def dijkstra():
    d[0] = 0
    q = [[0,0]]
    while q:
        dx, x = heappop(q)
        for y in v[x]:
            if d[y] > dx+1:
                d[y] = dx+1
                heappush(q,[d[y],y])
n,m = LI()
v = [[] for i in range(n)]
for i in range(m):
    a,b = LI()
    a -= 1
    b -= 1
    v[a].append(b)
    v[b].append(a)
d = [float("inf") for i in range(n)]
dijkstra()
if d[n-1] <= 2:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
"""


k = I()
ans = [i+k//50 for i in range(50)]
k %= 50
for i in range(k):
    ans[i] += 51
    for j in range(50):
        ans[j] -= 1
print(50)
print(*ans)

Solution (Python):
k = int(input())
a = [49 for _ in range(50)]
for i in range(50):
  a[i] += k // 50
for i in range(k % 50):
  a[i] += 51
  a = list(map(lambda x:x-1, a))
print(50)
print(" ".join(map(str, a)))

Solution (Python):
k = int(input())

ans = [i for i in range(50)]
cnt = k//50

for i in range(50):
  ans[i]+=cnt

amari = k%50
for i in range(50)[::-1]:
  if amari ==0:
    break
  ans[i]+=1
  amari -= 1
print(50)
print(str(ans).replace("[","").replace("]","").replace(",",""))

Solution (Python):
K = int(input())
print(50)
s, t = K//50, K%50
ANS = [ s + i for i in range(50)]
for j in range(t):
    for i in range(50):
        if j == i:
            ANS[i] += 50
        else:
            ANS[i] -= 1
print(" ".join( map( str, ANS)))

Solution (Python):
k=int(input());n=50;print(n);print(*[n+k//n-(0 if i<k%n else 1+k%n) for i in range(n)])

Solution (Python):
k=int(input());n=50;print(n);print(*[n+k//n if i<k%n else n+(k//n-1)-k%n for i in range(n)])

Solution (Python):
k = int(input())
rest = k % 50
print(50)
lst = [50 + k // 50  if i < rest else 50 + (k // 50 - 1) - rest for i in range(50)]
print(*lst)

Solution (Python):
K = int(input())

N = 50
a = [N-1]*N
d = K//N
m = K % N
for i in range(N):
    a[i] += d

for i in range(m):
    for j in range(N):
        if j == i:
            a[j] += N
        else:
            a[j] -= 1
print(N)
print(' '.join(map(str, a)))

Solution (Python):
K = int(input())

if K==0:
    print(2)
    print(0,0)
else:
    Ans = []
    N = K%50
    M = (K-1)//50
    if K%50==0:
        N = 50
    for i in range(N):
        Ans.append(50-i + M)
    for i in range(50-N):
        Ans.append(50-N-1 + M)
    
    print(50)
    print(" ".join(map(str,Ans)))

Solution (Python):
K = int(input())

N = 50
ans = [49] * N

ans = [a + (K // 50) - (K % 50) for a in ans]
for i in range(K % 50):
    ans[i] += (K % 50) + 1

print(N)
print(*ans, sep=' ')

Solution (Python):
k = int(input())
if k == 0:
    print(2)
    print(0, 0)
elif k == 1:
    print(3)
    print(1, 0, 3)
elif k < 10 ** 16:
    n = 2
    print(n)
    a = k // n * (n + 1) + n - k - 1
    b = (k // n + 1) * (n + 1) + n - k - 1
    if k % n == 0:
        print(a, a)
    elif k % n == 1:
        print(a, b)
else:
    n = 50
    print(n)
    a = k // n * (n + 1) + n - k - 1  
    b = (k // n + 1) * (n + 1) + n - k - 1  
    for i in range(k % n):
        print(b, "", end = "")
    for i in range(n - k % n):
        print(a, "", end = "")

Solution (Python):
K = int(input())
k = K//50
r = K%50
import numpy as np
a = np.arange(50)
x,y = a[50-r:].copy(),a[:50-r].copy()
a[:r] = x+1
a[r:] = y
a += k
print(50)
print(*a)

Solution (Python):
K = int(input())
a, roop = K % 50, K // 50
if roop >= 1:
    Ans = [50 + roop] * a + [50 - a + roop - 1] * (50-a)
else:
    Ans = [100 - a] * a + [49 - a] * (50 - a)
print(50)
print(" ".join(map(str, Ans)))

Solution (Python):
k = int(input())

n = 50

p = k // n
q = k % n

a = [i+p for i in range(n-1, -1, -1)]

if q > 0:
    for i in range(q):
        a[i] += 1

print(n)
print(*a)

Solution (Python):
import sys
stdin = sys.stdin

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

def operation(a:list, n:int, idx:int):
    for i,ai in enumerate(a):
        if i==idx:
            a[i] += n
        else:
            a[i] -= 1
            
    return a

k = ni()
mod = k%50

a = [i for i in range(50)]

for m in range(mod):
    a = operation(a,50,m)

geta = k//50

a = [ai+geta for ai in a]

print(50)
print(*a)

Solution (Python):
K = int(input())
N = 50
div = K // N
mod = K % N
A = [i + div - mod for i in range(N)]
for i in range(mod):
  A[i] += N + 1
print(N)
print(' '.join([str(a) for a in A]))

Solution (Python):
K = int(input())

N = 50
a = [K // N + i for i in range(N)]
for i in range(K % N):
    a[i] += N + 1
for i in range(N):
    a[i] -= K % N
print(N)
print(*a)

Solution (Python):
'''input
0
'''
k = input()
arr = []
zz = k%50
for i in range(50-zz):
	arr.append(49-zz)
for i in range(zz):
	arr.append(50)
zzz = k//50
arr = [arr[i]+zzz for i in range(50)]
print 50
for i in range(50):
	print arr[i],

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def main():
    K = int(input())
    ans = [49 + K // 50] * 50
    rest = K % 50
    for i in range(50):
        if i < rest:
            ans[i] += 1
        else:
            ans[i] -= rest
    
    print(50)
    print(*ans, sep=" ")


if __name__ == '__main__':
    main()

Solution (Python):
K = int(input())

N = 50

bias = K // 50
modn = K % 50

work = N - modn + 1
ans = []
for a in range(50-modn):
  ans.append(str(a+bias))

for a in range(50, 50-modn, -1):
  ans.append(str(a+bias))

print(N)
print(' '.join(ans))

Solution (Python):
k = int(input())

print(50)
ans = [49+k//50]*50
for i in range(50):
    if i < k%50:
        ans[i] = ans[i]+50-(k%50-1)
    else:
        ans[i] -= k%50
print(' '.join(list(map(str, ans))))

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return




dp = None


def main():
    N = 50
    K = int(input())

    L = [49] * N

    D, M = divmod(K, N)

    L = list(map(lambda x: x + D, L))

    for i in range(M):
        for j in range(N):
            if i == j:
                L[j] += N
            else:
                L[j] -= 1

    print(N)
    print(" ".join(list(map(str, L))))


main()

Solution (Python):
import math
k = int(input()) - 1
moto = list(range(0,49)) + [50]
ka = k%50
for i in range(ka):
  syo = moto.index(min(moto))
  moto[syo] += 51
  for j in range(50):
    moto[j] -= 1
k = k//50
for j in range(50):
  moto[j] += k
print(50)
print(" ".join(map(str,moto)))

Solution (Python):
K=int(input());m=K%50;s=49+K//50;print(50);print((50-m)*(str(s-m)+" ")+m*(str(s-m+51)+" "))