デジタルサムサム[LeetCode] 829通し番号を実行し、



正の整数を考えると  N、我々は連続した正の整数の和としてそれを書くことができますどのように多くの方法を、?

例1:

Input: 5
Output: 2
Explanation: 5 = 5 = 2 + 3

例2:

Input: 9
Output: 3
Explanation: 9 = 9 = 4 + 5 = 2 + 3 + 4

例3:

Input: 15
Output: 4
Explanation: 15 = 15 = 8 + 7 = 4 + 5 + 6 = 1 + 2 + 3 + 4 + 5

注意:  1 <= N <= 10 ^ 9



Githubの同期住所:

https://github.com/grandyang/leetcode/issues/829



参考文献:

https://leetcode.com/problems/consecutive-numbers-sum/



オールインワントピックのLeetCodeは(...更新)概要を説明します

おすすめ

転載: www.cnblogs.com/grandyang/p/11595236.html