OJ-Problems-Source/HDOJ/2070_autoAC.cpp
2016-08-19 16:52:35 +08:00

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;
}