Basecamp
Home
Problems
Contests
Courses
Ranking
Posts
8609
Recursion - 1
Sign in
Statement
Discussion
Editor
Input
Execution
Testing
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
Submissions 9K
Acceptance rate 63%
Editor
Input
Execution
Testing
Loading...
Input
Execution
Testing
Loading...