Express a number as sum of consecutive numbers

In how many ways can a number be expressed as a sum of consecutive numbers?

INPUT

15

OUTPUT

3

INPUT

10

OUTPUT

1

is there any simple logic for this question :).

please upvote me i was unable to ask question because i have only 1 karma point.

Read this and this

If you do not understand it, ask in comments.

1 Like

Thanks :slight_smile: @divyansh_gaba7 .I understood the concept.

Happy to help!