Exactly N points

AtCoder
IDcodefestival_2016_final_b
Time2000ms
Memory256MB
Difficulty
The problem set at _CODE FESTIVAL 20XX Finals_ consists of $N$ problems. The score allocated to the $i$\-th $(1≦i≦N)$ problem is $i$ points. Takahashi, a contestant, is trying to score exactly $N$ points. For that, he is deciding which problems to solve. As problems with higher scores are harder, he wants to minimize the highest score of a problem among the ones solved by him. Determine the set of problems that should be solved. ## Constraints * $1≦N≦10^7$ ## Input The input is given from Standard Input in the following format: $N$ ## Partial Score * $200$ points will be awarded for passing the test set satisfying $1≦N≦1000$. * Additional $100$ points will be awarded for passing the test set without additional constraints. [samples]
Samples
Input #1
4
Output #1
1
3

Solving only the $4$\-th problem will also result in the total score of $4$ points, but solving the $1$\-st and $3$\-rd problems will lower the highest score of a solved problem.
Input #2
7
Output #2
1
2
4

The set ${3,4}$ will also be accepted.
Input #3
1
Output #3
1
API Response (JSON)
{
  "problem": {
    "name": "Exactly N points",
    "description": {
      "content": "The problem set at _CODE FESTIVAL 20XX Finals_ consists of $N$ problems. The score allocated to the $i$\\-th $(1≦i≦N)$ problem is $i$ points. Takahashi, a contestant, is trying to score exactly $N$ poi",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "codefestival_2016_final_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "The problem set at _CODE FESTIVAL 20XX Finals_ consists of $N$ problems.\nThe score allocated to the $i$\\-th $(1≦i≦N)$ problem is $i$ points.\nTakahashi, a contestant, is trying to score exactly $N$ poi...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments