Tap here to switch tabs
Problem
Submissions

Problem: Consecutive Numbers Sum

med
30 min
Try to solve the Consecutive Numbers Sum problem.

Statement

Given a positive integer n, return the number of ways to express n as the sum of consecutive positive integers.

Implement def consecutiveNumbersSum(self, n): to compute this value.

Constraints:

  • 1≤1 \le n ≤109\le 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Consecutive Numbers Sum

med
30 min
Try to solve the Consecutive Numbers Sum problem.

Statement

Given a positive integer n, return the number of ways to express n as the sum of consecutive positive integers.

Implement def consecutiveNumbersSum(self, n): to compute this value.

Constraints:

  • 1≤1 \le n ≤109\le 10^9