@iwktd981220
2017-09-19T04:34:01.000000Z
字数 256
阅读 443
code
update
#include <stdio.h>
#include <stdlib.h>
int fib(int m) {
if (m==1 || m==2) {
return 1;
}else return fib( m - 1 ) + fib ( m - 2 );
}
int main() {
int n = 1 ;
int i ;
scanf("%i", &n);
int a[n] ;
for (i = 0; i < n; i++) {
scanf("%i", & a[i] );
}
for ( i = 0; i < n; i++) {
printf("%i\n", fib(a[i]));
}
return 0;
}