report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Consecutive - MarisaOJ: Marisa Online Judge

Consecutive

Time limit: 1000 ms
Memory limit: 256 MB
Given an integer $n$. In how many ways can $n$ be written as the sum of at least two consecutive positive integers. For example: $12 = 3 + 4 + 5$. ### Input - The first line contains a single integer $n$. ### Output - A single integer is the number of ways. ### Constraints - $1 \le x \le 10^{12}$. ### Example Input: ``` 12 ``` Output: ``` 1 ```
Other problems (Level 0)
Sum of divisors
Equal pairs
GCD and LCM
3
String queries
Consecutive
Prison
Topic
Math
Rating 1000
Solution (3) Solution