|
#include <stdio.h>
#include <math.h>
int main ()
{
int ri, repeat;
int i, m, n;
long f;
long fib (int n);
scanf ("% d",&repeat);
for (ri = 1; ri <= repeat; ri ++) {
scanf ("% d% d",&m,&n);
for (i = 1 ;; i ++) {
f = fib (i);
if (f> = m&&f <= n)
printf ("% ld", f);
else if (f> n)
break;}
Ranch
printf ("\n");
}
}
long fib (int n)
{
int i, s;
if (n == 1)
return 1;
else if (n == 2)
return 1;
else if (n> = 3)
(for (i = 3; i <= n; i ++)
s = fib (i-1) + fib (i-2);}
return s;} |
|