Skip to content

Instantly share code, notes, and snippets.

View githubflower's full-sized avatar
🤔

zjie githubflower

🤔
View GitHub Profile
输入一个自然数 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,缩进前面的空白。