total, count the ways to write it as a sum of one or more consecutive positive integers.
The number total on its own (a sum with a single term) counts as one way too.total=12 → 2
12 = 12 and 12 = 3 + 4 + 5: two ways.
total=21 → 4
21 = 21 = 10 + 11 = 6 + 7 + 8 = 1 + 2 + 3 + 4 + 5 + 6.
total=16 → 1
total=12
2
Run checks the first 3 tests in your browser. Submit checks all 55 tests on the server, hidden ones included.