水題,一個小模擬,規律也好找
f3 = f1 * 2 + f2;
#include#include #include #include #include const int INF = 1e8; const int N = 100; #define ll long long using namespace std; int a[251][N]; int b[N] = {0}; int main() { memset(a,0,sizeof(a)); a[1][0] = 1; a[0][0] = 1; int st = 0,num,ch,ct; for(int i = 2;i<=250;i++) { st = 0; for(int j = 0;j =0;i--) { if(a[n][i]!=0) { wz = i; break; } } for(int i = wz;i>=0;i--) printf("%d",a[n][i]); printf("\n"); } return 0; }