#t325. 求和
求和
Summation
Problem Background
Special for beginners, ^_^
Problem Description
Write a recursive function that computes the sum .
$$sum(n)= \begin{cases} 1, &n=1\\ n+sum(n-1), &n>1 \end{cases}$$Input Format
One integer .
Output Format
Output the sum .
Sample Input
4
Sample Output
10
Constraints
1 second, 1024 KiB for each test case.