delete pics to save space
This commit is contained in:
14
history_source/信息学奥赛一本通/1.6.2.1t.cpp
Normal file
14
history_source/信息学奥赛一本通/1.6.2.1t.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include<cstdio>
|
||||
using namespace std;
|
||||
int f(int n)
|
||||
{
|
||||
if(n==1) return 1;
|
||||
return n+f(n-1);
|
||||
}
|
||||
int main()
|
||||
{
|
||||
int n;
|
||||
scanf("%d",&n);
|
||||
printf("%d\n",f(n));
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user