Problem Description
A trained bee can only crawl to the right side of the hive and cannot crawl backwards. Please program the number of possible routes that bees crawl from hive A to hive B.
Among them, the structure of the hive is shown below.
Input
The first line of the input data is an integer n, representing the number of test instances, followed by n rows of data, each containing two integers a and B (0<a<b<50).
Output
For each test instance, output the number of possible routes that bees crawl from hive A to hive B, with the output of each instance one row.
Sample Input
21 23 6
Sample Output
13
#include <stdio.h>intMain () {intJ,i,c,b,m,n; Long Longa[ the]; scanf ("%d",&N); for(j=0; j<n;j++) {scanf ("%d%d",&b,&c); M=c-b; a[1]=1; a[2]=2; a[3]=3; for(i=4; i<=m;i++) A[i]=a[i-1]+a[i-2]; printf ("%lld\n", A[m]); } return 1;}
Wuhan University of Science and Technology acm:1010:0 starting point algorithm 103--a little bee ...