Time limit
Memory limit
You are given two integers $N$ and $L$. Write a program that finds the shortest list of consecutive non-negative integers whose sum is exactly $N$ and whose length is at least $L$.
Concretely, for some integer $a \ge 0$ and length $k$, a valid list has the form $a,\ a+1,\ a+2,\ \dots,\ a+k-1$; its sum must equal $N$ and its number of elements $k$ must be at least $L$. Among all such lists, find the one with the smallest length.
The first line contains $N$ and $L$ separated by a space. $N$ is a natural number with $1 \le N \le 1{,}000{,}000{,}000$, and $L$ is a natural number with $2 \le L \le 100$.
If the shortest valid list has length at most $100$, print its integers in increasing order on one line, separated by spaces.
If no valid list exists, or the shortest valid list has length greater than $100$, print $-1$.