HDU/2070/main.c
Saturneric 0525ffad24 Add.
2020-09-01 00:48:58 +08:00

14 lines
244 B
C

#include <stdio.h>
int main(void){
int numbers,i;
unsigned long long fib[51]={0,1};
for(i = 2; i <= 50; i++){
fib[i] = fib[i-1] + fib[i-2];
}
while(scanf("%d",&numbers) && numbers >= 0){
printf("%llu\n",fib[numbers]);
}
return 0;
}