#include <map>#include <stdio.h>#include <iostream>using namespace std;void multiple ( int x[2][2], int y[2][2] ){int temp[2][2]temp[0][0] = (;x[0][0]*y[0][0]+x[0][1]*y[1][0])%10000;temp[0][1] = (x[0][0]*y[0][1]+x[0][1]*y[1][1])%10000;temp[1][0] = (x[1][0]*y[0][0]+x[1][1]*y[1][0])%10000;temp[1][1] = (x[1][0]*y[0][1]+x[1][1]*y[1][1])%10000;x[0][0] = temp[0][0];x[0][1] = temp[0][1];x[1][0] = temp[1][0];x[1][1] = temp[1][1];}int main(){int n;while( ~scanf("%d", &n) ){int x[2][2] ={ 1, 1,1, 0};int y[2][2] ={ 1, 0,0, 1};if(n == 0) printf("0\n");else{for(; n>0; n /=2)}}return 0;}
原文:http://www.cnblogs.com/sober-reflection/p/79e9e315df007161f6c7413c408ed1b1.html