Submission #1466830


Source Code Expand

Copy
def main():
    k = int(input())
    if(k == 0):
        print("2\n1 1")
        return 0
    if(k == 1):
        print("2\n3 1")
        return 0
    for n in range(50, 1, -1):
        if k % n == 0:
            a = k//n + n - 1
            if(a >= 0 and a <= 10**16 + 1000):
                print(n)
                print(' '.join([str(a)for i in range(n)]))
                return 0

main()

Submission Info

Submission Time
Task D - Decrease (Contestant ver.)
User antonych
Language Python3 (3.4.3)
Score 0
Code Size 411 Byte
Status
Exec Time 19 ms
Memory 3060 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 example0, example1, example2, example3, example4
All 0 / 600 corner0, corner1, corner2, corner3, corner4, corner5, corner6, corner7, corner8, corner9, example0, example1, example2, example3, example4, rand0, rand1, rand2, rand3, rand4, rand5, rand6, rand7, rand8, rand9
Case Name Status Exec Time Memory
corner0 17 ms 2940 KB
corner1 17 ms 2940 KB
corner2 17 ms 3060 KB
corner3 17 ms 2940 KB
corner4 19 ms 2940 KB
corner5 17 ms 3060 KB
corner6 17 ms 3060 KB
corner7 17 ms 3060 KB
corner8 17 ms 2940 KB
corner9 17 ms 2940 KB
example0 17 ms 2940 KB
example1 17 ms 3060 KB
example2 17 ms 3060 KB
example3 17 ms 2940 KB
example4 17 ms 2940 KB
rand0 17 ms 3060 KB
rand1 17 ms 3060 KB
rand2 17 ms 2940 KB
rand3 17 ms 2940 KB
rand4 17 ms 2940 KB
rand5 17 ms 3060 KB
rand6 17 ms 2940 KB
rand7 17 ms 2940 KB
rand8 17 ms 2940 KB
rand9 17 ms 2940 KB