Consecutive Number Sum

Given an integer A.

Return number of ways we can write A as a sum of consecutive positive integers.



Input Format

The first argument given is the integer A.

Output Format

Return number of ways we can write A as a sum of consecutive positive integers.

Constraints

1 <= N <= 10^9

For Example

Input 1:
    A = 9
Output 1:
    
Explaination 1:
    A = 9
    A = 2 + 3 + 4
    A = 5 + 4

Input 2:
    A = 5
Output 2:
    2
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.
Start solving Consecutive Number Sum on Interview Code Editor
Sign Up
to access hints and editorial solutions for Consecutive Number Sum

Discussion


Loading...
Click here to start solving coding interview questions