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 math



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 ValueToBits(x,digit):
    res = [0 for i in range(digit)]
    now = x
    for i in range(digit):
        res[i]=now%2
        now = now >> 1
    return res

def BitsToValue(arr):
    n = len(arr)
    ans = 0
    for i in range(n):
        ans+= arr[i] * 2**i
    return ans

def ZipArray(a):
    aa = [[a[i],i]for i in range(n)]

    aa.sort(key = lambda x : x[0])
    for i in range(n):
        aa[i][0]=i+1
    aa.sort(key = lambda x : x[1])
    b=[aa[i][0] for i in range(len(a))]
    return b

def ValueToArray10(x, digit):
    ans = [0 for i in range(digit)]
    now = x
    for i in range(digit):
        ans[digit-i-1] = now%10
        now = now //10
    return ans

def Zeros(a,b):
    if(b<=-1):
        return [0 for i in range(a)]
    else:
        return [[0 for i in range(b)] for i in range(a)]

def AddV2(v,w):
    return [v[0]+w[0],v[1]+w[1]]

dir4 = [[1,0],[0,1],[-1,0],[0,-1]]


def clamp(x,y,z):
    return max(y,min(z,x))

class Bit:
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
 
    def sum(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s
 
    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
            

def Zaatsu(a):
    a.sort()
    now = a[0][0]
    od = 0
    for i in range(n):
        if(now==a[i][0]):
            a[i][0]=od
        else:
            now = a[i][0]
            od+=1
            a[i][0] = od
    
    a.sort(key = lambda x : x[1])
    return a

class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n+1)]
        self.rank = [0] * (n+1)

    
    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if self.rank[x] < self.rank[y]:
            self.par[x] = y
        else:
            self.par[y] = x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

    
    def same_check(self, x, y):
        return self.find(x) == self.find(y)


'''
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 2
N = 10 ** 6 + 2
fact = [1, 1]  
factinv = [1, 1]  
inv = [0, 1]  

for i in range(2, N + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

'''

def rl(x):
    return range(len(x))












n = int(input())



if(n<50):
    print(50)
    print(' '.join(['50']*n+['0']*(50-n)))
    exit()

ans = ['' for i in range(50)]

q = n//50
r = n%50

for i in rl(ans):
    ans[i] = str(49+q - i + (1 if i<r else 0))

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

Solution (Python):





import sys
readline = sys.stdin.readline

K = int(readline())
N = 50

A = [i for i in range(N)]
A = list(map(lambda x:x + (K // N),A))
rest = K % N
for i in range(rest):
  A[i] += N
  for j in range(N):
    if i != j:
      A[j] -= 1

print(N)
print(*A)

Solution (Python):
k=int(input())
print(50)
a=k//50
while (a+1)*50<=k:
  a+=1
r=k%50
for i in range(r):
  print(100+a-r)
for i in range(r,50):
  print(a+50-r-1)

Solution (Python):
k = int(input())
import numpy as np
ans = np.array([i for i in range(50)],dtype=np.int64)

a = k//50
b = k%50

ans += a
for i in range(b):
    ans[i] += 50
    ans[:i] -= 1
    ans[i+1:] -= 1
print(50)
print(' '.join(map(str, ans)))

Solution (Python):
K = int(input())
ans = [49+K//50] * 50

amari = K%50
if amari != 50:
  for i in range(amari):
    ans[i] = ans[i] + 50 - (amari-1)
  for i in range(amari, 50):
    ans[i] = ans[i] - amari
  
print(50)
ansstr = [str(i) for i in ans]
print(' '.join(ansstr))

Solution (Python):
def sub(A):
    m = max(A)
    for i in range(len(A)):
        if A[i] == m:
            A[i] -= len(A)
            m = -(10 ** 40)
        else:
            A[i] += 1

def main():
    K = int(input())
    if K == 0:
        return 2, [1, 1]
    if K == 1:
        return 2, [0, 2]
    if K < 50:
        return K, [K] * K
    k = K // 50
    t = [50 + k] * 50
    for _ in range(50 - (K % 50)):
        sub(t)
    return 50, t
    



N, A = main()
print(N)
print(*A)

Solution (Python):
K = int(input())
N = 50
n = K // N
ans = [49+n] * N
K %= N

for i in range(N):
  if i < K:
    ans[i] += N - K + 1
  else:
    ans[i] -= K

print(N)
print(*ans)

Solution (Python):


import sys






























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    def simulate(seq, num):
        for _ in range(num):
            minimum, min_ind = inf, -1
            for i in range(50):
                if seq[i] < minimum:
                    minimum, min_ind = seq[i], i
            for i in range(50):
                if i == min_ind:
                    seq[i] += 50
                else:
                    seq[i] -= 1


    k = ii()
    q, res = divmod(k, 50)
    ans = list(range(q, q+50))
    simulate(ans, res)
    
    print(50)
    print(*ans)


if __name__ == "__main__":
    main()

Solution (Python):
K = int(input())
N = 50
a = [K//N+i for i in range(N)]
for i in range(K % N):
    ai = (N-1-i)
    a[ai] += 1

print(N)
print(*a)

Solution (Python):











def main():
    K = int(input())
    if K <= 49:
        print(50)
        l = [0] * (50 - K) + [50] * K
        print(' '.join(str(i) for i in l))
        return l
    l = [(K // 50) + 50] * 50
    a = 50 - K % 50
    for i in range(a):
        l[0] -= 50
        for j in range(1, 50):
            l[j] += 1
        l.sort(reverse=True)
    print(50)
    print(' '.join(str(i) for i in l))
    return l
l = main()

Solution (Python):
import sys
import bisect

input = sys.stdin.readline
sys.setrecursionlimit(100000)
mod = 10 ** 9 + 7



def read_values():
    return map(int, input().split())


def read_index():
    return map(lambda x: int(x) - 1, input().split())


def read_list():
    return list(read_values())


def read_lists(N):
    return [read_list() for n in range(N)]


class V:
    def __init__(self, f, v=None):
        self.f = f
        self.v = v

    def __str__(self):
        return str(self.v)

    def ud(self, n):
        if n is None:
            return

        if self.v is None:
            self.v = n
            return
        self.v = self.f(self.v, n)


def main():
    K = int(input())
    N = 50
    M = K // N
    m = K % N
    k = N - m
    A = [N + M - (N - k + 1)] * k + [N + M + k] * (N - k)
    print(N)
    print(" ".join(map(str, A)))


if __name__ == "__main__":
    main()

Solution (Python):
K=int(input())
r,q=divmod(K,50)
A=[r+49]*50

def update():
    M=A.index(min(A))
    for i in range(50):
        if i==M:
            A[i]+=50
        else:
            A[i]-=1
        

for i in range(q):
    update()
print(50)
print(*A)

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


if __name__ == '__main__':
    main()

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

if k==0:
    print(2)
    print("0 0")

elif k ==1:
    print(2)
    print("2 0")

elif k <=50:
    print(k)
    print((str(k)+" ")*(k-1)+str(k))
    
else:
    l = k // 50
    m = k % 50
    print(50)
    print((str(50+l)+" ")*m+(str(49+l-m)+" ")*(49-m)+str(49+l-m))

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

Solution (Python):
K = int(input())
k = K // 50
l = K % 50
ans = [(i + k) for i in range(51) if i != 50 - l]

print(50)
print(*ans)

Solution (Python):
K=int(input());x=K//50;print(50);print(*((50-(K-50*x))*[49-K+51*x]+(K-50*x)*[100-K+51*x]))

Solution (Python):
from math import ceil
K=int(input())
x=K//50
ans=(50-(K-50*x))*[49-K+51*x]+(K-50*x)*[100-K+51*x]
print(50)
print(*ans)

Solution (Python):
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()

    k = NI()

    a = k // 50
    p = [49+a] * 50
    b = k % 50

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


    print(50)
    print(*p,sep=' ')



if __name__ == '__main__':
    main()

Solution (Python):




K = int(input())


"""
愚直解
Nを2~50までは試せるけど、各要素の値は何にすればいいかよくわからない。
なので、全探索的な解き方は期待できない。

一つからN引いて、残りに＋１するので、一回の操作で全体の合計から１減っていることになる
なので、開始時点で全体の合計は、(N-1)*N + K ~ N*N+K になるのか?

ある操作を繰り返して最後に～系の問題は、最後から操作を逆におこなって最初の状態に戻るようにすると解けることがおおい
今回はK回の操作の後に数列の最大値が N-1 以下になるので、N-1から開始して、ある要素にN足して全体から１引く、をK回やればよい。
Nは50までなので、とりあえず５０とする（小さすぎなければよいと判断）

操作が配列の要素すべてに一回ずつ行われたとき、NふえてN-1減るので、1増えただけになる
"""
N = 50
ans = [49] * 50

cnt_all = K // N 
rem = K % N 

for i in range(N):
    if i < rem:
        ans[i] += cnt_all + N - (rem-1)
    else:
        ans[i] += cnt_all - rem


print(50)
print(*ans)

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

sho = k // 50
amr = k%50

ans = []

print(50)
for i in range(50):
    if i < amr:
        ans.append(sho+1+49)
    else:
        ans.append(sho-amr+49)
        
print(*ans)

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

A = K // N + 1
B = A * N - K
a = [49+A] * N
for i in range(B):
  a[i] -= N
  for j in range(N):
    if j == i: continue
    a[j] += 1
    
print(N)
print(' '.join(map(str, a)))

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

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

    print(N)
    print(*a)


if __name__ == '__main__':
    main()

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

    a = [N - 1] * N
    q, r = divmod(K, N)
    for i in range(N):
        cnt_add = q + int(i < r)
        a[i] += N * cnt_add
        a[i] -= K - cnt_add

    print(N)
    print(*a)


if __name__ == '__main__':
    main()

Solution (Python):
k = int(input())
if k == 0:
    print("2\n1 1")
    exit(0)
if k == 1:
    print("2\n2 0")
    exit(0)
n = min(50,k)
a = [i for i in range(n)]
c = k // n

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

for i in range(k % n):
    a[i] += n
    for j in range(n):
        if i != j:
            a[j] -= 1
print(n)
for i in a:
    if i in range(10**16 + 1001):
        print(i, end=' ')
    '''else:
        exit(1)'''
print()

Solution (Python):
K = int(input())
ans = [i for i in range(50)]
cnt = 0
loop = K%50
plus = K//50
ans = list(map(lambda x: x+plus, ans))
for i in range(loop):
    cnt%=50
    ans = list(map(lambda x: x-1, ans))
    ans[cnt] += 51
    cnt+=1
print(50)
print(*ans)

Solution (Python):
K = int(input())
if K >= 50:
  N = 50
  wari = K//N -1
  amari = K%N
  l = [(50+wari)+1]*amari + [(50+wari)-amari]*(N-amari)
if 50>K>1:
  N = K
  l = [K]*K
if K == 1:
  N = 2
  l = [0,2]  
if K == 0:
  N = 2
  l = [1,1]

print(N)
print(*l)

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
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()
n = 50
x,b = k//50, k%50
a = x+(n-1)
print(n)
for i in range(n):
    if i < b:
        print(n+1-b+a)
    else:
        print(a-b)

Solution (Python):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
import numpy as np
INF = float("inf")











K = int(input())
if K <= 50 and K >= 2:
    a = [K]*K
    print(K)
    print(*a)
elif K == 0:
    print(2)
    print(1,1)
elif K == 1:
    print(2)
    print(0,3)
else:
    x = K // 50
    y = K % 50
    a = []
    for i in range(y):
        a.append(49+x+1)
    for j in range(50-y):
        a.append(49+x-y)
    print(50)
    print(*a)

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

mul = K//50
red = K%50

lis = [49+mul]*50
for i in range(red):
    lis[i] += 51
    for j in range(50):
        lis[j] -= 1

print(50)
print(*lis)

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


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

Solution (Python):
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  








K = read_a_int()
N = 50

kn = K // N
A = [N - 1 + kn] * N

rest = K % N

for i in range(rest):
    mi = min(A)
    idx = A.index(mi)
    for j in range(N):
        if idx == j:
            A[j] += N
        else:
            A[j] -= 1

print(N)
print(*A)

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):
K = int(input())
q,r = K//50,K%50
a = [50+q for i in range(r)] + [49+q-r for j in range(50-r)]

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

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())
summ = 49*50+K
a,b = summ//50,summ%50
low = (summ-b*51)//50
high = low + 51
ans = [low]*50
for i in range(b):
    ans[i] += 51
print(50)
print(*ans)

Solution (Python):


import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))

def resolve():
    K,=pin()
    if K==0:
        print(4)
        print(3,3,3,3)
    elif K==1:
        print(3)
        print(1,0,3)
    elif K<=50:
        print(K)
        t=[K]*K
        print(*t)
    else:
        print(50)
        s=K%50
        t=K//50
        t=[50+t-1]*50
        if s>0:
            for i in range(s):
                t=[tt-1 for tt in t]
                t[i]+=51
        print(*t)

resolve()

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 9)
MOD = 10 ** 9 + 7

K = int(input())
N = 50

tmp1 = N - 1 + (K // N)
tmp2 = K % 50

ans = [0] * N
for i in range(N - tmp2):
    ans[i] = tmp1 - tmp2
for j in range(i + 1, N):
    ans[j] = tmp1 + N - tmp2 + 1

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

Solution (Python):
def main():
    K = int(input())
    N = 50
    ans = [i for i in range(N)]
    d = K//50
    r = K % 50
    if K != 0:
        for i in range(r):
            for j in range(N):
                if i == j:
                    ans[j] += N
                else:
                    ans[j] -= 1
        for i in range(N):
            ans[i] += d
    print(N)
    print(*ans)


if __name__ == '__main__':
    main()

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

N = 50
res = [i - K for i in range(N)]
p,q = divmod(K, N)
for i in range(N):
    if i < q:
        res[i] += (p + 1) * (N + 1)
    else:
        res[i] += p * (N + 1)
print(N)
print(*res)

Solution (Python):
def examA():
    S = SI()
    T = SI()
    N = len(S)
    ans = "No"
    for i in range(N):
        cur = S[i:] + S[:i]
        
        if cur==T:
            ans = "Yes"
    print(ans)
    return

def examB():
    H, W = LI()
    S = [SI()for _ in range(H)]
    flag = True
    ans = 0
    print(ans)
    return

def examC():
    L, R = LI()
    ans = inf
    if R-L>=3000:
        R = L+3000

    for l in range(L, R + 1):
        for r in range(l+1, R + 1):
            now = (l*r) %2019
            ans = min(ans,now)
    print(ans)
    return

def examD():
    T = ["dream", "dreamer", "erase", "eraser"]
    S = SI()
    ans = "NO"
    t = ""
    for s in S[::-1]:
        t += s
        if t[::-1] in T:
            t = ""
    if t=="":
        ans = "YES"
    print(ans)
    return

def examE():
    N = 50
    K = I()
    base = K//N
    A = [base+i for i in range(N)]
    rest = K%N
    for i in range(rest):
        A[-i-1] += 1
    print(N)
    print(" ".join(map(str,A)))
    return

def examF():
    L = I()

    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examE()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

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

Solution (Python):
K=int(input())
print(50)
A=[]
for i in range(50):
  a=K%50
  b=K//50
  d=i+b
  if i<a:
    d+=50-a+1
  else:
    d-=a
  A.append(d)
print(*A)

Solution (Python):
import numpy as np
K=int(input())

N=50
num=K//N
r=K%N
L=[N-1]*N
L=np.array(L)
L+=num
for i in range(N):
    if i<r:
        L[i]+=N-(r-1)
    else:
        L[i]-=r

print(N)
print(*L)

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

print(50)
l = [i for i in range(50)]

for i in range(50):
    l[i] += k//50
a = k%50
for i in range(a):
    for j in range(50):
        if i == j:
            l[j] += 50
        else:
            l[j] -= 1
print(*l)

Solution (Python):
def main():
    K = int(input())
    op = K//50
    ans = [i+op for i in range(50)]
    op_d = K % 50
    for i in range(op_d):
        for j in range(50):
            if i == j:
                ans[j] += 50
            else:
                ans[j] -= 1
    print(50)
    print(*ans)


if __name__ == '__main__':
    main()

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

if K == 1:
    print(3)
    print(1,0,3)
elif K == 0:
    print(4)
    print(3,3,3,3)

else:
    div = -1
    
    if K <= 50:
        print(K)
        print(*[K for _ in range(K)])
    
    else:
        print(50)
        ans = [K//50+i for i in range(50)]

        for i in range(K%50):
            ans[i] += 50
            for j in range(50):
                if i != j:
                    ans[j] -= 1
        
        print(*ans)

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

k = int(input())
n = 50
k_m_50 = k % 50
k_q_50 = k // 50

ans = [50]*50
for i in range(k_m_50, 50):
    ans[i] = 49 - k_m_50
for i in range(n):
    ans[i] += k_q_50
print(n)
print(*ans)

Solution (Python):
k = int(input())
n = 50
x, y = divmod(k, n)
ans = [i+x for i in range(n)]
for i in range(y):
    i %= n
    ans[i] += n
    for j in range(n):
        if i == j:
            continue
        ans[j] -= 1
print(n)
print(*ans)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

k = int(read())
n = 50
a = [n - 1] * n
x, y = divmod(k, n)
for i in range(n):
    a[i] += x - y
    if i < y:
        a[i] += n + 1
print(n)
print(*a)

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

q, r = divmod(k, n)
A = [n-1]*n
for i in range(n):
    A[i] += q

for i in range(r):
    A[i] += n+1
    for j in range(n):
        A[j] -= 1

print(n)
print(*A)

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

q, r = divmod(k, n)
A = [n-1]*n
for i in range(n):
    A[i] += q

for i in range(r):
    A[i] += n+1
    for j in range(n):
        A[j] -= 1

print(n)
print(*A)

Solution (Python):
import sys
def main():
    input = sys.stdin.readline
    K=int(input())
    N=50
    ans=[]
    m=K%N
    for i in range(N):
        t = N-1 + K//N
        ans.append(t)
    for i in range(m):
        for j in range(N):
            if i==j: ans[j]+=N
            else: ans[j]-=1
    print(N)
    print(*ans)

if __name__ == '__main__':
    main()

Solution (Python):
import sys
def main():
    input = sys.stdin.readline
    K=int(input())
    N=50
    ans=[]
    m=K%N
    for i in range(N):
        t = K//N + (1 if i<m else 0)
        ans.append(N*(t+1) - (K-t) - 1)
    print(N)
    print(*ans)

if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    K=int(readline())

    N=50
    M=K//N
    L=K%N
    A=range(N)
    A=list(map(lambda x:x+M,A))
    for i in range(L):
        A[i]+=N+1
        A=list(map(lambda x:x-1,A))

    print(N)
    print(*A)

if __name__=="__main__":
    main()

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

n = 50
a = k//n
m = k%n
ans = list(range(a,a+n))
for i in range(m):
    ans[n-i-1] += 1

print(50)
print(*ans)

Solution (Python):
import sys
def main():
    input = sys.stdin.readline
    K=int(input())
    N=max(2,min(50,K))
    ans=[i+K//N for i in range(N)]
    m=K%N
    for i in range(m):
        for j in range(N):
            if i==j: ans[j]+=N
            else: ans[j]-=1
    print(N)
    print(*ans)

if __name__ == '__main__':
    main()

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

q, r = divmod(K, 50)

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

print(50)
print(*ans)

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

K = int(input())
N = 50
s, a = divmod(K, N)
ans = [N-1+s]*N

for i in range(a):
    ans[i] += N
    
    for j in range(N):
        if i!=j:
            ans[j] -= 1

print(N)
print(*ans)

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

d,m = divmod(K,50)
if m==0:
    a = [d+49] * 50
    print(50)
    print(*a)
    exit()

a = [d+50] * 50
rem = 50 - m
for i in range(m):
    a[i] += rem
for i in range(m,50):
    a[i] -= (m+1)
print(50)
print(*a)

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

tasu = k // 50
lst = list(range(tasu, tasu+50))
amari = k % 50
for i in range(amari):
    idx = 49 - i
    lst[idx] += 1

print(50)
print(' '.join(map(str, lst)))

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

    n = 50
    a = [None for _ in range(n)]
    for i in range(n):
        a[i] = i + (k + i) // n

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

if __name__ == '__main__':
    main()

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

a = [50 - i - 1 for i in range(50)]
div, mod = divmod(k, 50)

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

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

print(len(a))
print(*a)

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

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

ans = [49+k//50 for i in range(50)]
for i in range(k%50):
    for j in range(50):
        if i == j:
            ans[j] += 50
        else:
            ans[j] -= 1

print(50)
print(*ans)

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

k1 = k // 50
k2 = k % 50

n = 50
a = list(range(n))[::-1]
for i in range(n):
    a[i] += k1
for i in range(k2):
    a[i] += 1

print(n)
print(*a)

Solution (Python):
K=int(input());N=50;
Q=K//N;R=K%N;
print(N);
for i in range(R):
  print(N-1+Q -R + N+1,end=" ")
for i in range(N-R):
  print(N-1+Q -R,end=" ")

Solution (Python):
K=int(input())
K1=K//50
K2=K%50

answer_list=[]
for i in reversed(range(50-K2)):
  answer_list.append(i)
for i in range(K2):
  answer_list.append(50-i)


for i in range(50):
  answer_list[i]+=K1

print(50)
print(*answer_list)

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

p = k // 50
q = k % 50

ansl = [100]*q + [49]*(50-q)
for i in range(50):
    ansl[i] += p - q
print(50)
print(*ansl)

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

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

Solution (Python):
K = int(input())
d, m = divmod(K, 50)

A = [d + 49 - m] * (50 - m) + [d + 100 - m] * m
print(50)
print(*A)

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

ans = [49 + k//50 - k%50 + 51] * (k%50) + [49 + k//50 - k%50] * (50-k%50)

print(50)
print(*ans)

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

K = int(input())


if K < 10 ** 15:
    a, b = K // 2 + 1, K // 2 + 1

    if K % 2 == 1:
        a += 2
        b -= 1

    print(2)
    print(a, b)
else:
    N = 50
    A = [i for i in range(50)]
    A = list(map(lambda x: x + K // 50, A))
    r = K % 50
    for i in range(50):
        if i < r:
            A[i] += N
            A[i] -= r - 1
        else:
            A[i] -= r

    print(N)
    print(*A)

Solution (Python):

K = int(input())
N=50 

ans=[N-1]*N 

d = K//N 
r = K % N  

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

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

for i in range(r,N):
    ans[i] -=r
print(N)
print(" ".join(map(str,ans)))

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

ans=[N-1]*N

d = K//N
r = K%N
for i in range(N):
    ans[i] += N*d-d*(N-1)

for i in range(r):
    ans[i] += N-(r-1)
for i in range(r,N):
    ans[i] -=r
print(N)
print(" ".join(map(str,ans)))

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    K=int(input())
    q,r=divmod(K,50)
    a=[50+q]*r+[49-r+q]*(50-r)
    print(50)
    print(*a)

if __name__ == '__main__':
    main()

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

counter = 50
q = data // counter
r = data % counter

a = (counter - 1 + q) + counter - (r - 1)
b = (counter - 1 + q) - r

answer = [a] * r + [b] * (counter - r)
print(counter)
print(' '.join(list(map(str, answer))))

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

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

Solution (Python):
K = int(input())
q, mod = divmod(K, 50)
print(50)
pas = 50 + q - mod
for i in range(q, q + 51):
    if i == pas:
        continue
    print(str(i) + ' ', end='')
print('')

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

Solution (Python):
k = int(input())
d, m = divmod(k, 50)

ans = [49 + d for _ in range(50)]

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

print(50)
print(*ans)

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

ans = list(map(lambda x: x + (k // n), range(n)))

for i in range(k % n):
    for j in range(n):
        if i == j:
            ans[j] += n
        else:
            ans[j] -= 1
print(n)
print(" ".join(list(map(str, ans))))

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

n = 50

q, r = divmod(k, n)
ans = [n - 1 - k + q * (n + 1)] * n
for i in range(r):
    ans[i] += n + 1

print(n)
print(*ans)

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

n = 50
q, r = divmod(k, n)
ans = [i + q - r for i in range(n)]
for i in range(r):
    ans[i] += n + 1

print(n)
print(*ans)

Solution (Python):






ra = range
enu = enumerate
K = int(input())
N = 50

base = N + K // N - 1
n_operate = K % N

ans = []

for _ in ra(K % N):
    ans.append(base + N - K % N + 1)

for _ in ra(N - K % N):
    ans.append(base - K % N)
print(N)
print(*ans)

Solution (Python):
K = int(input())
N = 50
num = [i for i in range(N)]
for i in range(N):
    num[i] += K//N
r = K%N
for i in range(r):
    num[i] += N
    for j in range(N):
        if j != i:
            num[j] -= 1
print(N)
print(*num)

Solution (Python):






ra = range
enu = enumerate
K = int(input())
N = 50

base = N + K // N - 1
n_operate = K % N

ans = []

for _ in ra(K % N):
    ans.append(base + N - K % N + 1)

for _ in ra(N - K % N):
    ans.append(base - K % N)
print(N)
print(*ans)