mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
12 lines
209 B
C++
12 lines
209 B
C++
|
# include<stdio.h>
|
||
|
int main()
|
||
|
{
|
||
|
_int64 a[51]={0,1};
|
||
|
int n;
|
||
|
for(n=2;n<51;n++)
|
||
|
a[n]=a[n-1]+a[n-2];
|
||
|
while(scanf("%d",&n)&&n!=-1)
|
||
|
printf("%I64d\n",a[n]);
|
||
|
return 0;
|
||
|
}
|