src2020/1660_n+/doc/Readme.md

19 lines
287 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 『入门』(递归专题)求累加和
[问题描述]
教学案例,必须使用递归函数完成求解!
  编程求解下列式子的值s=1+2+3+...+n。
[输入格式]
  一行只有一个整数n。(1 <= n <= 1000)
[输出格式]
  1个整数即s的值。
[输入样例]
100
[输出样例]
5050