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



Sample input:
0


Sample output:
4
3 3 3 3

Submission status: Wrong Answer

Solution code:
import sys

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


def resolve():
    k = int(input())
    nums = list(range(50))

    if k <= 50:
        for i in range(k):
            for j in range(50):
                if j == i:
                    nums[j] += 50
                else:
                    nums[j] -= 1
        print(50)
        print(nums)
    else:
        q, r = divmod(k, 50)
        nums = [num + q for num in nums]
        for i in range(r):
            for j in range(50):
                if j == i:
                    nums[j] += 50
                else:
                    nums[j] -= 1
        print(50)
        print(nums)


if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

Solution code:
#!/usr/bin python3
# -*- coding: utf-8 -*-

k = int(input())
n = 50
x = k%n
a = k//n
ret = [a + n-x]*(n-x) + [a + n]*x
print(n)
print(' '.join(list(map(str,ret))))

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import sys
read = sys.stdin.read
readline = sys.stdin.readline

k, = map(int,read().split())

if k==0:
    print(1)
    print(0)
    exit()

k -= 1
n = 50
q = k//n
r = k%n

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


print(n)
print(*a)

Submission status: Wrong Answer

Solution code:
k = int(input())
arr = [49 + k//50 - k%50] * 50
for i in range(k%50):
    arr[i] += 50
print(*arr)

Submission status: Wrong Answer

Solution code:
print(1)
print(input())

Submission status: Wrong Answer

Solution code:
k = int(input())
a,b = k//50, k%50

base = 49+(a if not b else a+1) 
print(50)
if b==0:
    print(" ".join(map(str, [base]*50)))
else:
    i = 50 - b
    print(" ".join(map(str, [i-1]*i + [base+i]*(50-i))))

Submission status: Wrong Answer

Solution code:

K = int(input())

MAX = 10**16 + 1000
N = 2
for n in range(2,51):
    SUM = n*(n-1)+K
    if 0--SUM//n > MAX:
        continue
    else:
        N = n
        break

A = []
nump = SUM%N
numn = N-nump
    

vp = 0--SUM//N
vn = SUM//N


for i in range(N):
    if i<nump:
        A.append(vp)
    else:
        A.append(vn)

dx = 0
amari = 0
limit = (MAX-vp)*nump

if nump:
    amari = min(limit, numn*(vn))
    amari_n = amari
    for i in range(N):
        if i<nump:
            if A[i]+amari<=MAX:
                A[i] += amari
                amari = 0
            else:
                amari -= (MAX-A[i])
                A[i] = MAX
        else:
            if A[i]-amari_n>=0:
                A[i] -= amari_n
                amari_n = 0
            else:
                amari_n -= (A[i])
                A[i] = 0

             


print(N)
print(*A)

Submission status: Wrong Answer

Solution code:

K = int(input())

MAX = 10**16 + 1000
N = 2
for n in range(2,51):
    SUM = n*(n-1)+K
    if 0--SUM//n > MAX:
        continue
    else:
        N = n
        break

A = []
nump = SUM%N
for i in range(N):
    if i<nump:
        A.append(0--SUM//N)
    else:
        A.append(SUM//N)

print(N)
print(*A)

Submission status: Wrong Answer

Solution code:
K=int(input())
N=50
A,B=divmod(K,N)
rs = []
print(N)
for i in range(N):
    rs.append(max((K//N+(i<B))*(N+1)-K, 0))
print(*rs)

Submission status: Wrong Answer

Solution code:
K=int(input())
N=50
A,B=divmod(K,N)
rs = []
for i in range(N):
    rs.append(max((K//N+(i<B))*(N+1)-K, 0))
print(*rs)

Submission status: Wrong Answer

Solution code:
# input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
# import functools
# import itertools
# import math
K=int(input())
if K%2==0:
    A0=K//2+1
    A1=K//2+1
else:
    A0=(K+3)//2-2
    A1=(K+3)//2+1
print(2)
print(A0,A1)

Submission status: Wrong Answer

Solution code:
# input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
# import functools
# import itertools
# import math
K=int(input())
if K%2==0:
    A0=K//2+1
    A1=K//2+1
else:
    A0=(K+1)//2-2
    A1=(K+1)//2+1
print(2)
print(A0,A1)

Submission status: Wrong Answer

Solution code:
# input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
# import functools
# import itertools
# import math
K=int(input())
if K%2==0:
    A0=K//2+1
    A1=K//2+1
else:
    A0=(K+1)//2-2
    A1=(K+1)//2+1
print(K)
print(A0,A1)

Submission status: Wrong Answer

Solution code:
# input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
# import functools
# import itertools
# import math
K=int(input())
if K%2==0:
    A0=K//2+1
    A1=K//2+1
else:
    A0=(K+1)//2-2
    A1=(K+1)//2+1

print(A0,A1)

Submission status: Wrong Answer

Solution code:
# input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
# import functools
# import itertools
# import math
K=int(input())

N=2
A0=2*K
A1=K
print(N)
print(A0,A1)

Submission status: Wrong Answer

Solution code:
# input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
# import functools
# import itertools
# import math
K=int(input())

N=2
A0=2*K
A1=K

print(A0,A1)

Submission status: Wrong Answer

Solution code:
K = int(input())
n = 50

ans = [n-1+n*(K//n)-(K-K//n)]*(n-K%n) + [n-1+n*(K//n+1)-(K-K//n+1)]*(K%n)
print(n)
print(*ans)

Submission status: Wrong Answer

Solution code:
K = int(input())
n = 50
ans = [n*(K//n)-(K-K//n)]*(n-K%n) + [n*(K//n+1)-(K-K//n+1)]*(K%n)
print(n)
print(*ans)

Submission status: Wrong Answer

Solution code:
K = int(input())
n = 50
ans = [n*(K//n)-(K-K//n)]*(n-K%n) + [n*(K//n+1)-(K-K//n+1)]*(K%n)
print(*ans)

Submission status: Wrong Answer

Solution code:
k = int(input())
for n in range(2,51):
  if n-1-k<0 or n-1+k*n>10**16+1000:continue
  else:
    print(n)
    print(n-1+k*n,*[0 for _ in range(n-1)])
    exit()

Submission status: Wrong Answer

Solution code:
K = int(input())
N = K+1
print(N)
print((K+1)*N-1,*[0 for _ in range(N-1)])

Submission status: Wrong Answer

Solution code:
K = int(input())
N = K+1
print(N)
print((K+1)*N-1,*[0 for _ in range(N)])

Submission status: Wrong Answer

Solution code:
K = int(input())
N = K+1
print((K+1)*N-1,*[0 for _ in range(N)])

Submission status: Wrong Answer

Solution code:
from datetime import date
from math import factorial
import functools
from heapq import*
from collections import deque
import collections
import math
from collections import defaultdict, Counter
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
inf = float("inf")


def main():
    k = int(input())
    if k == 0:
        print(1)
        print(0)
        exit()
    elif k == 1:
        print(3)
        print("1 0 3")
        exit()
    a = min(k, 50)
    b = k % a
    ans = [i + k//a for i in range(a)]
    for i in range(b):
        ans.sort()
        for j in range(1, a):
            ans[j] -= 1
        ans[0] += a

    print(a)
    print(*ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from datetime import date
from math import factorial
import functools
from heapq import*
from collections import deque
import collections
import math
from collections import defaultdict, Counter
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
inf = float("inf")


def main():
    k = int(input())
    if k == 0:
        print(1)
        print(1)
        exit()
    elif k == 1:
        print(3)
        print("1 0 3")
        exit()
    a = min(k, 50)
    b = k % a
    ans = [i + k//a for i in range(a)]
    for i in range(b):
        ans.sort()
        for j in range(1, a):
            ans[j] -= 1
        ans[0] += a

    print(a)
    print(*ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    k = int(input())
    a = 10
    ans = [i + k + 1 for i in range(a)]
    print(a)
    print(*ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from math import ceil

# 入力
K = int(input())

# N = 50で決め打ち。操作回数がなるべく均等となるようにaを定める。
N = 50
a = [
    ceil(K / N) * (N + 1) + N - (K + 1)
    for _ in range(K % N)
] + [
    K // N * (N + 1) + N - (K + 1)
    for _ in range(N - K % N)
]
ans = '{}\n{}'.format(N, ' '.join(map(str, a)))

# 出力
print(ans)

Submission status: Wrong Answer

Solution code:
k=int(input())
print(2)
print(k//2+k%2+1,k//2-k%2+1)

Submission status: Wrong Answer

Solution code:
k = int(input())
a = k//50
b = k%50
ans = [str(50+a)]*b+[str(49+a)]*(50-b)
print(50)
print(" ".join(ans))

Submission status: Wrong Answer

Solution code:
n = 50
k = int(input())
a = k//50
b = k%50
ans = [str(49+a+1)]*b+[str(49+a)]*(n-b)
print(n)
print(" ".join(ans))

Submission status: Wrong Answer

Solution code:
n = 50
k = int(input())
a = k//50
b = k%50
ans = [str(49+a+1)]*b+[str(49+a)]*(n-b)
print(" ".join(ans))

Submission status: Wrong Answer

Solution code:
k = int(input())
import math
offset = math.ceil(k/50)
nums = [i+offset for i in range(50)]
for i in range(k%50):
        nums[-i] -= 50

if k >= 50:
    print(50)
    for i in range(len(nums)):
        if nums[-i] < 0:
            nums[-i] = 0
    print(" ".join(list(map(str,nums))))

else:
    print(k)
    print(" ".join(map(str,[i+1 for i in range(k)])))

Submission status: Wrong Answer

Solution code:
k = int(input())

n = 50

a = k//n
b = k%n

if b == 0:
    res = [a]*n
    for i in range(n):
        res[i] += i
else:
    res = [0]*(n+1)
    for i in range(n+1):
        res[i] = i
    del res[n-b]
    for i in range(n):
        res[i]+=a
print(n)
print(res)

Submission status: Wrong Answer

Solution code:
K = int(input())
ans = [K//50 + i for i in range(50)]
if K%50:
  for i in range(K%50):
    ans[i] += 50
print(50)
ans = [str(a) for a in ans]
print(" ".join(ans))

Submission status: Wrong Answer

Solution code:
K=int(input())

i=int(K/50)
j=K%50

ans = []

for k in range(j):
    ans.append(str(100+i-j))
for k in range(50-j):
    ans.append(str(50+i-1-j))
    
print(50)
print(" ".join(ans))

Submission status: Wrong Answer

Solution code:
k = int(input())
n = 50
print(n)

l = []
for i in range(n):
    tmp = [n+1]*i + [-i]*(n-i)
    l.append(tmp)

res = []
for i in range(n):
    res.append(k//n + i + l[k%n][i])
print(*res)

Submission status: Wrong Answer

Solution code:
k = int(input())
n = k//2
print(2)
print(n,n+1+(k%2==1))

Submission status: Wrong Answer

Solution code:
k = int(input())
n = k//2
print(2)
print(n,n+(k%2==1))

Submission status: Wrong Answer

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

ans = list(range(N,0,-1))
d,m = divmod(K,N)
for i in range(N):
    ans[i] += d-1 + int(i < m)

print(K)
print(*ans)

Submission status: Wrong Answer

Solution code:
K = int(input())
N = 50
a = [0] * 50

if K <= 50:
    for i in range(K):
        a[i] = 50
else:
    m = K // 50
    base = 100 + m
    r = K % 50
    big = base - r
    small = base - 50 - r

    for i in range(r):
        a[i] = big
    for i in range(r, N, 1):
        a[i] = small

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

Submission status: Wrong Answer

Solution code:
N = 50
big = 10 ** 16

K = int(input())

if K <= 50 * 50:
    a = [49] * 50
    a[0] += K * 50
else:
    a = [0] * 50
    index = 0 
    i = 0
    for i in range(K // big):
        a[i] = big
    a[i] = K % big
print(N)
print(" ".join(map(str, a)))

Submission status: Wrong Answer

Solution code:
k = int(input())
if k == 0:
	print(2)
	print("1 1")
elif k == 1:
	print(2)
	print("2 1")
elif k <= 50:
	print(k)
	print(*[k for _ in range(k)])
else:
	div = k // 50 - 1
	mod = k % 50
	ans = [50 + div + 1] * mod + [50 + div] * (50 - mod)
	print(50)
	print(*ans)

Submission status: Wrong Answer

Solution code:
k = int(input())
if k == 0:
	print(1)
	print(0)
elif k <= 50:
	print(k)
	print(*[k for _ in range(k)])
else:
	div = k // 50
	mod = k % 50
	ans = [50 + div + 1] * mod + [50 + div] * (50 - mod)
	print(50)
	print(*ans)

Submission status: Wrong Answer

Solution code:
K=int(input())

print(2)
if K==0:
  print(1,1)
elif K%2==0:
  print(K//2+1,K//2+1)
else:
  print(K//2,K//2+3)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k = int(input())
if k == 0 :
    print(2)
    print(1, 1, 1)
elif k == 1 :
    print(3)
    print(3, 1, 1)
else :
    n = k
    p = k // n
    a = [i + p for i in range(n)]
    m = k % n
    for i in range(n) :
        if i < m : a[i] += n - (m - 1)
        else :     a[i] -= m
    print(n)
    print(*a)

Submission status: Wrong Answer

Solution code:
k = int(input())
if k == 0 :
    print(2)
    print(1, 1, 1)
elif k == 1 :
    print(3)
    print(3, 1, 1)
else :
    n = 10
    p = k // n
    a = [i + p for i in range(n)]
    m = k % n
    for i in range(n) :
        if i < m : a[i] += n - (m - 1)
        else :     a[i] -= m
    print(n)
    print(*a)

Submission status: Wrong Answer

Solution code:
k = int(input())
n = 50
m = k % n
q = k // n

a = [n - 3 + q - m] * n
for i in range(m):
    a[n - 1 - i] += n

print(n)
print(*a)

Submission status: Wrong Answer

Solution code:
k = int(input())
n = 50
m = k % n
q = k // n

a = [n - 3 + q - m] * n
for i in range(m):
    a[n-1-i] += n
print(*a)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
K = int(input())

N = 50
As = [N-1 for _ in range(N)]
ind = 0

modk = K % 50
base = 49 + math.floor(K/50) - modk

ans = []

if modk != 0:
    for i in range(N):
        if i >= N - modk:
            ans.append(base + N + 1)
        else:
            ans.append(base)
    # for i in range(0,modk,1):
    #     ans.append(base + N + 1)
    # for i in range(modk,N,1):
    #     ans.append(base)
else:
    for i in range(N):
        ans.append(49 + math.floor(K/50))
# for k in range(K):
#     for i in range(N):
#         As[i] -= 1
#     As[ind] += N + 1
#     ind += 1
#     ind = ind % N
# print(N)
# print(*As)
print(N)
print(*ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
K = int(input())

N = 50
As = [N-1 for _ in range(N)]
ind = 0

modk = K % 50
base = 49 + math.floor(K/50) - modk

ans = []

if modk != 0:
    for i in range(0,modk,1):
        ans.append(base + N + 1)
    for i in range(modk,N,1):
        ans.append(base)
else:
    for i in range(N):
        ans.append(49 + math.floor(K/50))
# for k in range(K):
#     for i in range(N):
#         As[i] -= 1
#     As[ind] += N + 1
#     ind += 1
#     ind = ind % N
# print(N)
# print(*As)
print(N)
print(*ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
K = int(input())

N = 50
As = [N-1 for _ in range(N)]
ind = 0

modk = K % 50
base = 49 + math.floor(K/50) - modk

ans = []

for i in range(0,modk,1):
    ans.append(base + N + 1)
for i in range(modk,N,1):
    ans.append(base)

# for k in range(K):
#     for i in range(N):
#         As[i] -= 1
#     As[ind] += N + 1
#     ind += 1
#     ind = ind % N
# print(N)
# print(*As)
print(N)
print(*ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
K = int(input())

N = 2
# As = [N-1 for _ in range(N)]
# ind = 0

# for k in range(K):
#     for i in range(N):
#         As[i] -= 1
#     As[ind] += N + 1
#     ind += 1
#     ind = ind % N
# print(*As)
print(N)
if K%2==0:
    print(int(K/2)+1, int(K/2)+1)
else:
    print(math.floor(K/2), math.floor(K/2)+3)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
K = int(input())

N = 2
# As = [N-1 for _ in range(N)]
# ind = 0

# for k in range(K):
#     for i in range(N):
#         As[i] -= 1
#     As[ind] += N + 1
#     ind += 1
#     ind = ind % N
# print(*As)

if K%2==0:
    print(int(K/2)+1, int(K/2)+1)
else:
    print(math.floor(K/2), math.floor(K/2)+3)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

K = int(input())

N = 2
As = [N-1 for _ in range(N)]
ind = 0

for k in range(K):
    for i in range(N):
        As[i] -= 1
    As[ind] += N + 1
    ind += 1
    ind = ind % N
print(*As)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

K = int(input())

N = 50
As = [N-1 for _ in range(N)]
ind = 0

for k in range(K):
    for i in range(N):
        As[i] -= 1
    As[ind] += N + 1
    ind += 1
    ind = ind % N
print(As)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    K = int(input())
    N = 50
    result = list(range(N))
    for x in range(N):
        result[x] += K // N
    K %= N

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    K = int(input())
    N = 50
    result = list(range(N))
    for x in range(N):
        result[x] += K // N
    K %= N

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    K = int(input())
    if (K == 0):
        print (2)
        print (0, 0)
        exit()
    if (K + 1 <= 10 ** 16 + 1000):
        print (2)
        print (K + 1, 0)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    K = int(input())
    if (K == 0):
        print (2)
        print (0, 0)
        exit()
    if (K == 1):
        print (2)
        print (2, 0)

    if (K <= 50):
        print (K)
        res = []
        for x in range(K):
            res.append(x + 1)
        print (" ".join(map(str, res)))
        exit()
    print (2)
    print (K + 1, 0)

Submission status: Wrong Answer

Solution code:
K = int(input())
A = (K+1)*K + K
print(K+1)
l = [str(A)]
for i in range(K):
    l.append(str(0))
print(' '.join(l))

Submission status: Wrong Answer

Solution code:
k = int(input())
n = 50
m = n * (k + 1) - 1


series = str(m)
for i in range(50):
    series = series + " 0"

print(str(n))
print(series)

Submission status: Wrong Answer

Solution code:
K = int(input())

b = K % 50
a = (K - b) / 50
	
list = [0] * 50
j = 0

while (j <= 49 - b) :
	list[j] = 49 + a - b
	j += 1

while (j <= 49):
	list[j] = 2 * 50 + a - b
	j += 1

list = map(int, list)
list = map(str, list)
print('50')
print(' '.join(list))

Submission status: Wrong Answer

Solution code:
K = int(input())

b = int(K % 50)
a = int((K - b) / 50)
	
list = [0] * 50
j = 0

while (j <= 49 - b) :
	list[j] = 49 + a - b
	j += 1

while (j <= 49):
	list[j] = 2 * 50 + a - b
	j += 1


list = map(str, list)
print('50')
print(' '.join(list))

Submission status: Wrong Answer

Solution code:
K = int(input())

b = int(K % 50)
a = int((K - b) / 50)
	
list = [0] * 50
j = 0

while (j <= 49 - b) :
	list[j] = 49 + a - b
	j += 1

while (j >49 - b and j <= 49):
	list[j] = 2 * 50 + a - b
	j += 1


list = map(str, list)
print('50')
print(' '.join(list))

Submission status: Wrong Answer

Solution code:
K = int(input())

b = int(K % 50)
a = int((K - b) / 50)
	
list = [0] * 50
j = 0

while (j <= 49 - b) :
	list[j] = 49 + a - b
	j += 1

while (j >49 - b and j <= 49):
	list[j] = 2 * 50 - b
	j += 1


list = map(str, list)
print('50')
print(' '.join(list))

Submission status: Wrong Answer

Solution code:
K = int(input())

b = int(K % 50)
a = int((K - b) / 50)
	
list = [0] * 50
j = 0

while (j <= 49 - b) :
	list[j] = 49 + a - b
	j += 1

while (j >49 - b and j <= 49):
	list[j] = 2 * 50 - b
	j += 1


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

Submission status: Wrong Answer

Solution code:
k = int(input())
d, m = divmod(k, 50)
b = 49 + d
print(50)
print(*map(str, [b + 50] * m + [b - m] * (50 - m)))

Submission status: Wrong Answer

Solution code:
k = int(input())
d, m = divmod(k, 50)
b = 49 + d
print(50)
print((str(b + 50) + ' ') * m, end='')
print(*([b - m] * (50 - m)))

Submission status: Wrong Answer

Solution code:
n=int(input())
print(1)
print(n)

Submission status: Wrong Answer

Solution code:
b=int(input());a=b/50+49;b%=50;c=50-b;print(50,*[a-b]*c+[a+c]*b)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    K = int(input())
    N = 50
    plus_height = K / N
    modulo = K % N

    ans = [(i + plus_height) for i in range(N - 1, -1, -1)]

    for i in range(0, modulo):
        ans[i] += 1

    ans = list(map(lambda x: str(int(x)), ans))
    print(N)
    print(" ".join(ans))

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    K = int(input())
    N = 50
    plus_height = K / N
    modulo = K % N

    ans = [(i + plus_height) for i in range(N, 0, -1)]

    for i in range(0, modulo):
        ans[i] += 1

    ans = list(map(lambda x: str(int(x)), ans))
    print(N)
    print(" ".join(ans))

Submission status: Wrong Answer

Solution code:
K=int(input())
R=K%50
L=int(K/50)
a=[49+L]*50#50*L回掛かるモード
if R!=0:
  a=[49+L+50-R]*50
  a[0]+=1
  for i in range(50-R):
    a[i]-=51
print(50)
print(' '.join(map(str, a)))

Submission status: Wrong Answer

Solution code:
K=int(input())
R=K%50
L=int((K-R)/50)
a = [49 - R + L for i in range(50)]
for i in range(R):
    a[i] += 51
print(50)
print(' '.join(map(str, a)))

Submission status: Wrong Answer

Solution code:
K=int(input())
R=K%50
L=int((K-R)/50)
a=[0]*50
for i in range(50):  
  a[i]=i+L#50*L回掛かるモード
for i in range(R):
  a[i]+=51
for i in range(50):
  a[i]-=R
print(50)
print(' '.join(map(str, a)))

Submission status: Wrong Answer

Solution code:
print(4)
print(3,3,3,3)

Submission status: Wrong Answer

Solution code:
K=int(input())
R=K%50
L=int((K-R)/50)
a=[0]*50
for i in range(50):  
  a[i]=i+L#50*L回掛かるモード
if R!=0:
  #50回増やす
  for i in range(50):
    a[i]+=51-R
  #全部を+(50-R)し, 大きい50-R個を-51
  for i in range(50-R):
    a[49-i]-=51
print(50)
print(' '.join(map(str, a)))

Submission status: Wrong Answer

Solution code:
import sys
k=int(raw_input())
n=k

if n<10:
    if n%2==0:
        print 2
        print "%d %d" %( n/2+1,n/2+1)
    else:
        print 2
        print "%d %d" % ((n-1)/2,(n-1)/2+3)
    sys.exit(0)


def proc(ls):
    ls.sort()
    ls[-1]-=len(ls)
    for i in range(len(ls)-1):
        ls[i]+=1
    return ls
if k%5==0:
    print 5
    ans= [k/5+4]*5
    print ans[0],ans[1],ans[2],ans[3],ans[4]
else:
    print 5
    k+=5
    ans=[k/5+4]*5
    for i in range(5-k%5):
        ls=proc(ans)
    print ans[0],ans[1],ans[2],ans[3],ans[4]

Submission status: Wrong Answer

Solution code:
import sys
k=int(raw_input())
n=k

if n<10:
    if n%2==0:
        print 2
        print "%d %d" %( n/2+1,n/2+1)
    else:
        print 2
        print "%d %d" % ((n-1)/2,(n-1)/2+3)
        sys.exit(0)


def proc(ls):
    ls.sort()
    ls[-1]-=len(ls)
    for i in range(len(ls)-1):
        ls[i]+=1
    return ls
if k%5==0:
    print 5
    ans= [k/5+4]*5
    print ans[0],ans[1],ans[2],ans[3],ans[4]
else:
    print 5
    k+=5
    ans=[k/5+4]*5
    for i in range(5-k%5):
        ls=proc(ans)
    print ans[0],ans[1],ans[2],ans[3],ans[4]

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = list(map(str,range(1,n+1)))
if n == 1:
    ans = ['1','0','3']
print(' '.join(ans))

Submission status: Wrong Answer

Solution code:
#! /usr/bin/env python3

K = int(input())

print(2)
print(K + [0, 1][(K-1) % 3 == 0], 1 - [0, 1][(K-1) % 3 == 0])

Submission status: Wrong Answer

Solution code:
#! /usr/bin/env python3

K = int(input())

print(2)
print(K, 1 + [0, 1][(K-1) % 3 == 0])

Submission status: Wrong Answer

Solution code:
K=int(input())
R=K%50
L=int((K-R)/50)
a=[49+L]*50#50*L回掛かるモード
if R!=0:
  a=[49+L+50-R]*50
  a[0]+=1
  for i in range(50-R):
    a[i]-=51
print(50)
print(' '.join(map(str, a)))

Submission status: Wrong Answer

Solution code:
#! /usr/bin/env python3

K = int(input())

if K < 1000:
    N = 2
    s = ' 0' * (N - 1)
    print(N)
    print(str(K * N + (N - 1)) + s)
else:
    print(2)
    print(K, 1)

Submission status: Wrong Answer

Solution code:
import sys

states = [
    [0,7,7,7,7,7,7,7],
    [8,6,6,6,6,6,6,6],
    [7,14,5,5,5,5,5,5],
    [6,13,13,4,4,4,4,4],
    [5,12,12,12,3,3,3,3],
    [4,11,11,11,11,2,2,2],
    [3,10,10,10,10,10,1,1],
    [2,9,9,9,9,9,9,0],
    [1,8,8,8,8,8,8,8],
    ]
K = int(sys.stdin.readline())

P = K/8
Q = K%8

ret = states[Q]
ret = [x+P for x in ret]

print 8
print ' '.join(map(str,ret))

Submission status: Wrong Answer

Solution code:
k=int(input())
n=50
q,r=k//n,k%n
a=[n-1-k+q*(n+1)]*n
a=list(map(lambda x:x+n+1,a[0:r-1]))+a[r:n-1]
print(n)
print(' '.join(map(str,a)))

Submission status: Wrong Answer

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

    if k == 0:
        print(4)
        print(3, 3, 3)
        return
    if k == 1:
        print(3)
        print(1, 0, 3)
        return
    if k <= 50:
        print(k)
        print(' '.join([str(k)]*k))
        return
    print(50)
    res = [50+k//50-k%50-1]*50
    for i in range(k%50):
        res[i] += 51
    print(' '.join([str(i) for i in res]))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def proc(ls):
    #ls.sort()
    ls[-1]-=len(ls)
    for i in range(len(ls)-1):
        ls[i]+=1
    return ls
ls=map(int,raw_input().split())
ls.sort()
print ls[-1],len(ls)-1
while not (ls[-1]<=len(ls)-1):
    print ls
    ls=proc(ls)
    ls.sort()
print ls

Submission status: Wrong Answer

Solution code:
import sys

states = [
    [0,4,4,4,4],
    [5,3,3,3,3],
    [4,8,2,2,2],
    [3,7,7,1,1],
    [2,6,6,6,0],
    [1,5,5,5,5],
    ]
K = int(sys.stdin.readline())

P = K/5
Q = K%5

ret = states[Q]
ret = [x+P for x in ret]

print 5
print ' '.join(map(str,ret))

Submission status: Wrong Answer

Solution code:
K = int(input())
n = 50
a = [0] * n

tmp = K

for i in range(n):
	ok = 0
	ng = 10 ** 16
	while ng - ok > 1:
		mid = (ok + ng) // 2
		if (mid + K + 1) // (n + 1) <= tmp:
			ok = mid
		else:
			ng = mid
	a[i] = ok
	tmp -= (a[i] + K + 1) // (n + 1)

print(n)
print(*a)

Submission status: Wrong Answer

Solution code:
import sys

states = [[0,3,3,3],
    [4,2,2,2],
    [3,6,1,1],
    [2,5,5,0]
    ]
K = int(sys.stdin.readline())

P = K/4
Q = K%4

ret = states[Q]
ret = [x+P for x in ret]

print 4
print ' '.join(map(str,ret))

Submission status: Wrong Answer

Solution code:
K = int(input())
n = 50
a = [0] * n

tmp = K

for i in range(n):
	ok = 0
	ng = 10 ** 16
	while ng - ok > 1:
		mid = (ok + ng) // 2
		if (mid + K + 1) // (n + 1) <= tmp:
			ok = mid
		else:
			ng = mid
	a[i] = ok
	tmp -= (a[i] + K + 1) // (n + 1)

print(*a)

Submission status: Wrong Answer

Solution code:
import numpy as np

K = int(input())

a = np.ones(50)*(49) + (K)//50
a[:K%50] += 51 - (K%50)
a[K%50:] -= (K%50)


                
result = "50\n{}".format(int(a[0]))
for a_ in a[1:]:
    result += (" {}".format(int(a_)))
print(result)

Submission status: Wrong Answer

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

    if k == 0:
        print(4)
        print(3, 3, 3)
        return
    if k == 1:
        print(3)
        print(1, 0, 3)
        return
    if k <= 50:
        print(k)
        print(' '.join([str(k)]*k))
        return
    print(50)
    res = [50+k//50-k%50-1]*50
    for i in range(k%50):
        res[i] += 50
    if k%50 == 1:
        res[i] += 1
    print(' '.join([str(i) for i in res]))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

    if k == 0:
        print(4)
        print(3, 3, 3)
        return
    if k == 1:
        print(3)
        print(1, 0, 3)
        return
    if k <= 50:
        print(k)
        print(' '.join([str(k)]*k))
        return
    print(50)
    res = [50+k//50-k%50-1]*50
    for i in range(k%50):
        res[i] += 50
    print(' '.join([str(i) for i in res]))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
K=int(input())
R=K%50
L=int((K-R)/50)
a=[49+L]*50#50*L回掛かるモード
if R!=0:
  #a[0]+=1で50回増やした。50-R回動かす
  #全部を+(50-R)し, 大きい50-R個を-51
  a=[49+L+50-R]*50
  a[0]+=1
  for i in range(50-R):
    a[i]-=51
print(50)
print(' '.join(map(str, a)))

Submission status: Wrong Answer

Solution code:
n=int(raw_input())
if n%2==0:
    print 2
    print "%d %d" %( n/2+1,n/2+1)
else:
    print 2
    print "%d %d" % ((n-1)/2,(n-1)/2+3)

Submission status: Wrong Answer

Solution code:
k = int(raw_input())
n = 50

ai = k/n + (n-1)
a = [ai] * n
r = k%n
b = n - r + 1
cq = (b * r) / (n-r)
cr = (b * r) % (n-r)
for i in range(n):
  if i < r:
    a[i] += b
  else:
    a[i] += cq
    if cr > 0:
      a[i] += 1
      cr -= 1

a = map(str, a)

print n
print " ".join(a)

Submission status: Wrong Answer

Solution code:
n=int(raw_input())
if n%2==0:
    print 2
    print n/2+1,n/2+1
else:
    print 2
    print (n-1)/2,(n-1)/2+3

Submission status: Wrong Answer

Solution code:
k = int(raw_input())
n = 50

ai = k/n + (n-1)
a = [ai] * n
r = k%n
b = n - r + 1
cq = (b * r) / (n-r)
cr = (b * r) % (n-r)
for i in range(n):
  if i < r:
    a[i] += b
  else:
    a[i] += cq
    if cr > 0:
      a[i] += 1
      cr -= 1

a = map(str, a)

print " ".join(a)

Submission status: Wrong Answer

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

    if k == 0:
        print(4)
        print(3, 3, 3)
        return
    if k == 1:
        print(3)
        print(1, 0, 3)
        return
    if k <= 50:
        print(k)
        print(' '.join([str(k)]*k))
        return
    print(50)
    res = [49+k//50]*50
    for i in range(k%50):
        res[i] += 1
    print(' '.join([str(i) for i in res]))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

    if k == 0:
        print(4)
        print(3, 3, 3)
        return
    if k == 1:
        print(3)
        print(1, 0, 3)
        return
    if k <= 50:
        print(k)
        print(' '.join([str(k)]*k))
        return
    print(50)
    res = [50+k//50]*50
    for i in range(k%50):
        res[i] += 1
    print(' '.join([str(i) for i in res]))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
K = int(input())

n = 50

b = K // n

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

a[n - 1] += (K % n) * n

print(len(a))
print(' '.join(str(s) for s in a))