This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
输入一个自然数 n,输出所有可能和为 n 连续正数序列。 | |
例如输入15,由于1+2+3+4+5=4+5+6=7+8=15, | |
所以输出 3 个连续序列1,2,3,4,5、4,5,6 和7,8。 | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript | |
// you code | |
``` | |
2. 粘贴代码时请使用shift+tab,缩进前面的空白。 |