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):
k = int(input())

n = 50
print(n)
nums = list(reversed(range(n)))

for i in range(n):
    nums[i] += k//n

for i in range(k%n):
    nums[i] += 1

t = list(map(str, nums))
print(' '.join(t))

Solution (Python):
ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
ips = lambda:input().split()
import collections
import math
import itertools
import heapq as hq
import sys

k = ni()
n = 50
p,r = divmod(k,n)
ans = [0]*n
for i in range(n):
    if i<n-r:
        ans[i]=i + p
    else:
        ans[i]=i+1 + p
print(n)
print(*ans)

Solution (Python):
k = int(input())
print(50)
ans = [49 + k // 50 for _ in range(50)]
k %= 50
for i in range(k):
    for j in range(50):
        if i == j:
            ans[i] += 50
        else:
            ans[j] -= 1
print(*ans)

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

print("50")
ans = []
a, b = divmod(K, 50)
for i in range(b):
    ans.append(49 + a + 50 - (b - 1))
for i in range(50-b):
    ans.append(49 + a - b)
print(" ".join([str(_) for _ in ans]))

Solution (Python):
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_s = lambda: readline().rstrip().decode('utf-8')
in_nl = lambda: list(map(int, readline().split()))
in_nl2 = lambda H: [in_nl() for _ in range(H)]
in_map = lambda: [s == ord('.') for s in readline() if s != ord('\n')]
in_map2 = lambda H: [in_map() for _ in range(H)]
in_all = lambda: map(int, read().split())


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

    q, r = divmod(K, N)
    ans = np.full(N, N + q)
    cnt = N - r
    ans[:cnt] -= N - (cnt - 1)
    ans[cnt:] += cnt

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


if __name__ == '__main__':
    main()

Solution (Python):







def main():
    K = int(input())
    N = 50
    loop, remain = divmod(K, N)
    a = [N-1+loop+N-remain+1 if i < remain else N-1+loop-remain for i in range(N)]
    print(N)
    print(*a)

    
if __name__ == '__main__':
    main()

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


print(50)

a = [49 + k//50] * 50

for i in range(k % 50):
    a[i] += 50

for i in range(50):
    a[i] -= k % 50

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

Solution (Python):
k=int(input())
n=min(k+2,50)
a=list(range(n))
for i in range(n):
  a[i]+=k//n
for i in range(k%n):
  a[i]+=n
  for j in range(n):
    if i==j:continue
    a[j]-=1
print(n)
print(*a)

Solution (Python):
K = int(input())
N = 50
moku = N-1 + K//N
t = K%N

ans = [moku-t for i in range(N)]
for i in range(t):
    ans[i]=moku+N-t

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

Solution (Python):
import sys
input = sys.stdin.buffer.readline




def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))



def main():
	k=II()


	q,r=divmod(k,50)

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




if __name__ == "__main__":
	main()

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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

k = inp()
b = (k-1)//50+50
r = k%50
l = 50-r
a = b-r-1
if r == 0: a = b
print(50)
res = [-1] * 50
for i in range(50):
    if i < l:
        res[i] = a
    else:
        res[i] = b
print(*res)

Solution (Python):
K = int(input())
N = 50
div_K, rem_K = divmod(K, N)
ans = [l + div_K for l in range(N)]
for i in range(rem_K):
    idx = ans.index(min(ans))
    for i in range(N):
        if i == idx:
            ans[i] += N
        else:
            ans[i] -= 1
print(N)
print(*ans)

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())

if k == 0:
    a = [1, 1]
elif k == 1:
    a = [2, 0]
elif k <= 50:
    a = [i for i in range(1, k+1)]
else:
    a = [i for i in range(1, 51)]
    k -= 50
    d = k // 50
    for i in range(50):
        a[i] += d
    m = k % 50
    for i in range(-1, -m-1, -1):
        a[i] += 1
print(len(a))



a = [str(i) for i in a]
print(' '.join(a))

Solution (Python):
import sys
import math
import copy
from heapq import heappush, heappop, heapify
from functools import cmp_to_key
from bisect import bisect_left, bisect_right
from collections import defaultdict, deque, Counter



input = sys.stdin.readline
getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = float("inf")
MOD = 10**9 + 7
divide = lambda x: pow(x, MOD-2, MOD)

def nck(n, k, kaijyo):
    return (npk(n, k, kaijyo) * divide(kaijyo[k])) % MOD

def npk(n, k, kaijyo):
    if k == 0 or k == n:
        return n % MOD
    return (kaijyo[n] * divide(kaijyo[n-k])) % MOD

def fact_and_inv(SIZE):
    inv = [0] * SIZE  
    fac = [0] * SIZE  
    finv = [0] * SIZE  
    inv[1] = 1
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    for i in range(2, SIZE):
        inv[i] = MOD - (MOD // i) * inv[MOD % i] % MOD
        fac[i] = fac[i - 1] * i % MOD
        finv[i] = finv[i - 1] * inv[i] % MOD

    return fac, finv

def renritsu(A, Y):
    
    
    
    A = np.matrix(A)
    Y = np.matrix(Y)
    Y = np.reshape(Y, (-1, 1))
    X = np.linalg.solve(A, Y)

    
    return X.flatten().tolist()[0]

class TwoDimGrid:
    
    def __init__(self, h, w, wall="
        self.h = h
        self.w = w
        self.size = (h+2) * (w+2)
        self.wall = wall
        self.get_grid()
        

    def get_grid(self):
        grid = [self.wall * (self.w + 2)]
        for i in range(self.h):
            grid.append(self.wall + getS() + self.wall)

        grid.append(self.wall * (self.w + 2))
        self.grid = grid
    def init_cost(self):
        self.cost = [INF] * self.size

    def pos(self, x, y):
        
        return y * (self.w + 2) + x
    def getgrid(self, x, y):
        return self.grid[y][x]
    def get(self, x, y):
        return self.cost[self.pos(x, y)]
    def set(self, x, y, v):
        self.cost[self.pos(x, y)] = v
        return
    def show(self):
        for i in range(self.h+2):
            print(self.cost[(self.w + 2) * i:(self.w + 2) * (i+1)])
    def showsome(self, tgt):
        for t in tgt:
            print(t)
        return
    def showsomejoin(self, tgt):
        for t in tgt:
            print("".join(t))
        return

    def search(self):
        grid = self.grid
        move = [(0, 1), (0, -1), (1, 0), (-1, 0)]
        move_eight = [(0, 1), (0, -1), (1, 0), (-1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
        
        
        
        
        

def solve():
    k = getN()
    if k == 0:
        print(2)
        print(1, 1)
        return
    if k < 50:
        n = k + 1
        print(n)
        ans = [0 if i == 0 else i + 1 for i in range(n)]
        print(*ans)
        return
    if k == 50:
        print(50)
        ans = [i+1 for i in range(50)]
        print(*ans)
        return

    
    n = 50
    print(n)
    if k % 50 == 0:
        print(*[49 + k // 50 for i in range(50)])
        return
    ind = k % 50
    geta = k // 50 - 1
    
    offset = k // 50
    ans = [n - ind + geta if i < n - ind else offset + i + 1 for i in range(n)]
    print(*ans)
def main():
    n = getN()
    for _ in range(n):
        solve()

    return
if __name__ == "__main__":
    
    solve()

Solution (Python):
'''
研究室PCでの解答
'''
import math

import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


ipt = stdin.readline
setrecursionlimit(10**7)
mod = 10**9+7
dir = [(-1,0),(1,0),(0,-1),(0,1)]
alp = "abcdefghijklmnopqrstuvwxyz"


def main():
    k = int(ipt())
    t = k//50
    rs = k%50
    print(50)
    ans = []
    for i in range(rs):
        ans.append(str(100-rs+t))
    for i in range(50-rs):
        ans.append(str(49-rs+t))

    print(" ".join(ans))

    return None

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
import math
import collections
import bisect
import itertools



sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
MOD = 10 ** 9 + 7


ni = lambda: int(sys.stdin.readline().rstrip())
ns = lambda: map(int, sys.stdin.readline().rstrip().split())
na = lambda: list(map(int, sys.stdin.readline().rstrip().split()))
na1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().rstrip().split()))




def main():
    k = ni()
    l = 50
    ans = [l - 1 for _ in range(l)]

    for i in range(l):
        ans[i] += k // l
        
        tgt = k % l
        if i < tgt:
            ans[i] += l
            ans[i] -= tgt - 1
        else:
            ans[i] -= tgt

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


if __name__ == '__main__':
    main()

Solution (Python):
import sys
import math
import collections
import bisect
import itertools



sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
MOD = 10 ** 9 + 7


ni = lambda: int(sys.stdin.readline().rstrip())
ns = lambda: map(int, sys.stdin.readline().rstrip().split())
na = lambda: list(map(int, sys.stdin.readline().rstrip().split()))
na1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().rstrip().split()))




def main():
    k = ni()
    l = 50
    ans = [l - 1 for _ in range(l)]

    for i in range(l):
        ans[i] += k // l

    for i in range(l):
        tgt = k % l
        if i < tgt:
            ans[i] += l
            ans[i] -= tgt - 1
        else:
            ans[i] -= tgt

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


if __name__ == '__main__':
    main()

Solution (Python):
import sys
import math
import heapq
mod=10**9+7
inf=float("inf")
from math import sqrt
from collections import deque
from collections import Counter
from collections import defaultdict

from collections import OrderedDict

from math import ceil
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)
from decimal import Decimal 
from functools import lru_cache





k=int(input())
print(50);n=50
if k==0:
    print(" ".join(["0"]*50));exit()
    
a=k//n
b=k%n
A=[a+49 for i in range(50)]
for  i in range(b):
    A=[A[j]-1 if i!=j else A[j]+n for j in range(50)]
print(*A)

Solution (Python):
import sys
import math
import heapq
mod=10**9+7
inf=float("inf")
from math import sqrt
from collections import deque
from collections import Counter
from collections import defaultdict

from collections import OrderedDict

from math import ceil
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)
from decimal import Decimal 
from functools import lru_cache





k=int(input())
print(50);n=50
if k==0:
    print(" ".join(["0"]*50));exit()
    
a=k//n
b=k%n
A=[a+i for i in range(50)]
for  i in range(b):
    A=[A[j]-1 if i!=j else A[j]+n for j in range(50)]
print(*A)

Solution (Python):


K=int(input())
N=50
S=K//N
T=K%N
L=[N-1+S for i in range(N)]
for i in range(T):
  L[i]+=N+1
for i in range(N):
  L[i]-=T
print(N)
L=list(map(str,L))
print(" ".join(L))

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

k = int(readline())
roops = k//50
remains = k%50
ans = [49+roops]*50


for i in range(50-remains):
    ans[i] -= remains
for i in range(50-remains,50):
    ans[i] += 50-remains
print(50)
print(*ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()


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


if __name__ == "__main__":
    main()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    k = int(input())
    S = list(range(50))
    k, r = divmod(k, 50)
    for i in range(50):
        S[i] += k

    target = 0
    while r:
        for i in range(50):
            if i == target:
                S[i] += 50
            else:
                S[i] -= 1
        target = (target + 1) % 50
        r -= 1
    print(50)
    print(*S)


if __name__ == '__main__':
    resolve()

Solution (Python):

def main():
	n = int(input())
	k = n//50
	rem = n%50
	arr = [0 for i in range(50)]
	for i in range(0 , 50):
		arr[i]=i
	for i in range(0 , 50):
		arr[i]=arr[i]+k
	while rem>0:
		for i in range(0 , 50):
			if arr[i]==k:
				arr[i]=arr[i]+50 
			else:				
				arr[i]=arr[i]-1
		rem=rem-1
	print(50)
	print(*arr)
if __name__ == "__main__":
	main()

Solution (Python):

def main():
	n = int(input())
	k = n//50
	rem = n%50
	arr = [0 for i in range(50)]
	for i in range(0 , 50):
		arr[i]=i
	for i in range(0 , 50):
		arr[i]=arr[i]+k
	while rem>0:
		for i in range(0 , 50):
			if arr[i]==k:
				arr[i]=arr[i]+50
			else:
				arr[i]=arr[i]-1
		rem=rem-1
	print(50)
	print(*arr)
if __name__ == "__main__":
	main()

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

k=int(input())

print(50)
x=k//50
y=k%50

a=49+x
for i in range(50-y):
    print(a-y,end='')
    print(' ',end='')
for i in range(y):
    print(a+51-y,end='')
    print(' ',end='')

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())

K = I()
q,r = K//50,K % 50
A = [49+q-i for i in range(50)]
B = [50+q-i for i in range(50)]
C = A[r:] + B[:r]

print(50)
print(*C)

Solution (Python):
K = int(input())
N = 50
if K <= 50:
    print(N)
    ans = [50]*K + [0]*(N-K)
    print(*ans)
    exit()

d,m = divmod(K,50)
ans = [d+49] * N
for i in range(N):
    if i < m:
        ans[i] += N-m+1
    else:
        ans[i] -= m
print(N)
print(*ans)

Solution (Python):
MAX = pow(10,16)+1000
K = int(input())
N = 50
kaisu = [K//N for _ in range(N)]
ans = [-1 for _ in range(N)]
nokori = K%N
for i in range(nokori):
  kaisu[i] += 1


for i in range(N):
  temp = (N+1)*kaisu[i]+N-1-K
  ans[i] = temp

print(N)
print(*ans)

Solution (Python):
N = 50
A = [i for i in range(N)]
K = int(input())
a = K//N
k = K%N
A = [A[i]+a for i in range(N)]
for _ in range(k):
    amin = 10**17
    for i in range(N):
        if A[i]<amin:
            ind = i
            amin = A[i]
    for i in range(N):
        if i==ind:
            A[i] += N
        else:
            A[i] -= 1
print(N)
print(*A)

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

A = [X - 1] * X
A = [a + K // X for a in A]
for i in range(K % X):
    A[i] += 1
for i in range(X - (K % X)):
    A[-i - 1] -= K % X

print(X)
print(*A, sep=' ')

Solution (Python):
k = int(input())
n = 50
if k <= n-1:
    aas = [0] * n
    aas[0] += n * k
else:
    t = k // n
    k %= n
    aas = [n-k+t-1] * n
    i = 0
    cnt = 0
    while cnt < k:
        aas[i] += 1 + k
        i += 1
        cnt += 1
print(n)
print(*aas)

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

    q, r = divmod(K, N)
    A = [N - 1 + (N + 1) * q - K] * N

    for i in range(r):
        A[i] += N + 1

    print(N)
    print(' '.join(map(str, A)))
    return


if __name__ == '__main__':
    main()

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    K = int(readline())

    N = 50

    q, r = divmod(K, N)
    A = [0] * N
    for i in range(N):
        if i < r:
            A[i] = N - 1 + (N + 1) * (q + 1) - K
        else:
            A[i] = N - 1 + (N + 1) * q - K

    print(N)
    print(*A)
    return


if __name__ == '__main__':
    main()

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

n=50
a=[n+k//n-1]*n

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


print(n)
print(' '.join([str(c) for c in a]))

Solution (Python):
k = int(input())
v = [i  + (k // 50) for i in range(50)]
for i in range(k % 50):
    for j in range(50):
        if i == j:
            v[j] += 50
            continue
        v[j] -= 1
print(50)
print(*v)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

K = ini()
N = 50


def solve():
    a = K // N
    h = (N - 1) + a
    r = K % N
    hs = [h + N - (r - 1)] * r + [h - r] * (N - r)
    return hs


ans = solve()
print(len(ans))
print(*ans)

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

ans = list(range(50))[::-1]
q,r = divmod(K, 50)

for i in range(50):
  ans[i] += q
for i in range(r):
  ans[i] += 1

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

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

Solution (Python):
import heapq
k = int(input())
a = [49] * 50
for i in range(50):
    a[i] += k//50
k%=50


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

print(len(a))
print(' '.join(list(map(str, a))))

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

N = 50
res = [i for i in range(N)]
for i in range(K % N):
    for j in range(N):
        if i == j:
            res[j] += N
        else:
            res[j] -= 1
for j in range(N):
    res[j] += K // N

print(N)
print(" ".join([str(n) for n in res]))

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

Solution (Python):
def solve():
  K = int(input())
  if K==49:
    print(2)
    return [27,24]
  print(50)
  a,b = K//50,K%50
  ans = [49+a]*50
  for i in range(50):
    if i<b:
      ans[i] += 51-b
    else:
      ans[i] -= b
  return ans
print(*solve())

Solution (Python):


import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
import copy
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

n=I()
lis=[50 for i in range(50)]
lists=[]
for i in range(50):
    mx=-inf
    for j in range(50):
        if lis[j]>=mx:
            mx=lis[j]
            ind=j
    for j in range(50):
        lis[j]+=1
    lis[ind]-=51
    lists.append(copy.deepcopy(lis))
    


u=n%50
x=n//50
base=lists[50-u-1]
for i in range(50):
    base[i]+=x
print(50)
print(*base)

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

a = [49 + k // 50] * 50

b = k % 50

if b:
    for i in range(50):
        if i < b:
            a[i] += 50 - (b-1)
        else:
            a[i] -= b

print(50)
print(" ".join(list(map(str, a))))

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    k = int(readline())
    a = [0] * 50

    for i in range(50):
        a[i] = i + (k//50) - (k % 50)
        if i < k % 50:
            a[i] += 51
    print(50)
    print(*a)


if __name__ == '__main__':
    main()

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

Solution (Python):
k = int(input())
q = k//50
r = k%50
print(50)
a = [0]*50
for i in range(50):
    if i < r:
        a[i] = 100+q-r
        
    else:
        a[i] = 49+q-r
        
print(*a)

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

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

r = K%n
for i in range(n):
    if i <  r:
        a[i] = a[i] + n - r + 1
    else:
        a[i] = a[i] - r
    
print(*a)

Solution (Python):

K = int(input())

N = 50
u, v = divmod(K, 50)
P = [u+i for i in range(N)]
for i in range(1, v+1):
    P[-i] += 1
print(N)
print(*P)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache





MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n): return kaijo_memo[n]
  if(len(kaijo_memo) == 0): kaijo_memo.append(1)
  while(len(kaijo_memo) <= n): kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n): return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0): gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n): gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if n == r: return 1
  if n < r or r < 0: return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1: arr.append([temp, 1])
  if arr==[]: arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


def gcd(a, b):
    while b: a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n-1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n: return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

def base_10_to_n_without_0(X, n):
  X -= 1
  if X//n: return base_10_to_n_without_0(X//n, n)+[X%n]
  return [X%n]


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





K = I()
print(50)
ans = []
for i in range(K%50):
  ans.append(100+K//50-K%50)
for i in range(50-K%50):
  ans.append(49+K//50-K%50)
print(*ans)

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

div = k // 50
mod = k % 50
A = [100 + div - mod] * mod + [49 + div -mod] * (50-mod)
print(50)
print(*A)

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

div, mod = divmod(k, 50)
A = [100 + div - mod] * mod + [49 + div -mod] * (50-mod)
print(50)
print(*A)

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

div, mod = divmod(k, 50)
A = [49+div] * 50

for i in range(mod):
    A[i] += 50
    for j in range(50):
        if i == j:
            continue
        A[j] -= 1

print(50)
print(*A)

Solution (Python):
import sys

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

N = 50
V = [49 + K // 50 for _ in range(N)]

K %= 50
for i in range(K):
    V[i] += N+1
    for j in range(N):
        V[j] -= 1

print(N)
print(*V)

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
import math
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 998244353






K = getN()
N = 50
ans = [49 + K // N] * N

for i in range(K % N):
    ans[i] += 1


for j in range(K % N, N):
    ans[j] -= K%N

print(N)
print(*ans)

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

if '__main__' == __name__:
    resolve()

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

ini=(K//50)*50+49
A=[ini]*50
for i in range(K%50):
    A[i]+=50
add=K%50
for i in range(50):
    a=A[i]
    if a>ini:
        A[i]-=(K//50+1)*(add-1)+(K//50)*(50-add)
    else:
        A[i]-=(K//50+1)*(add)+(K//50)*(50-add-1)
print(50)
print(*A)

Solution (Python):
k=int(input())
max_a=pow(10,16)+1000
for i in range(2,51):
  a=[j+k//i for j in range(i)]
  for j in range(k%i):
    a[-1-j]+=1
  if max(a)<=max_a:
    print(i)
    print(' '.join(list(map(str,a))))
    exit()

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

i = k % 50
j = k // 50

print(50)
for _ in range(n-i):
    print(n + j - i - 1, end = ' ')
for _ in range(i):
    print(2 * n + j - i, end = ' ')