P6267 [SHOI2002] Consecutive Integer Decomposition of N
Description
All positive integers can be represented as the sum of one, two, or more consecutive positive integers.
Given a positive integer not exceeding $9\times 10^{14}$, find how many different ways it can be represented as a sum of consecutive positive integers. For example, for $9$, there are three ways: $9$, $4+5$, $2+3+4$.
Input Format
Input a positive integer $n$, which is the integer to be decomposed.
Output Format
Output the number of methods.
Explanation/Hint
$n \leq 9\times 10^{14}$.
Translated by ChatGPT 5