101903: [AtCoder]ABC190 D - Staircase Sequences

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:6 Solved:0

Description

Score : $400$ points

Problem Statement

How many arithmetic progressions consisting of integers with a common difference of $1$ have a sum of $N$?

Constraints

  • $1 ≤ N ≤ 10^{12}$
  • $N$ is an integer.

Input

Input is given from Standard Input in the following format:

$N$

Output

Print the answer.


Sample Input 1

12

Sample Output 1

4

We have four such progressions:

  • $[12]$
  • $[3, 4, 5]$
  • $[-2, -1, 0, 1, 2, 3, 4, 5]$
  • $[-11, -10, -9, \dots, 10, 11, 12]$

Sample Input 2

1

Sample Output 2

2

We have two such progressions:

  • $[1]$
  • $[0, 1]$

Sample Input 3

963761198400

Sample Output 3

1920

Input

题意翻译

- 给定一个整数 $N$,求出有多少个由整数组成的、公差为 $1$ 的等差数列各项之和为 $N$。 - 对于 $100\%$的数据,$1 \leq N \leq 10^{12}$,且 $N$ 为整数。

加入题单

上一题 下一题 算法标签: