Basecamp
Home
Problems
Contests
Ranking
Posts
Sign in
Statement
Editor
Input
Execution
Testing
Discussion
Attempts
Recursion - 1
Very easy
English
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Implement the recursive function:
f
(
n
)
=
{
0
,
n
=
0
f
(
n
−
1
)
+
n
,
n
>
0
Input
One integer
n
(
0
≤
n
≤
1000
)
.
Output
Print the value of
f
(
n
)
.
Examples
Input #1
Answer #1