1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <cstdio> 5 #include <queue> 6 #define ll long long 7 8 using namespace std; 9 const int N = 1e5+1000; 10 int fib[50]; 11 void init() 12 { 13 14 fib[0]= fib[1] = 1; 15 for(int i = 2; i <= 45; i++) 16 fib[i] = fib[i-1]+fib[i-2]; 17 } 18 19 void solve() 20 { 21 int n; 22 init(); 23 scanf("%d",&n); 24 int l = 45; 25 while(fib[l] > n) l--; 26 27 for(int i = l; i >= 1; i--) 28 { 29 if(fib[i] <= n) 30 { 31 n -= fib[i]; 32 printf("1"); 33 } 34 else 35 printf("0"); 36 } 37 printf(" "); 38 } 39 40 int main(void) 41 { 42 int t,cnt = 0; 43 scanf("%d",&t); 44 45 while(t--) 46 { 47 printf("Case %d: ",++cnt); 48 solve(); 49 } 50 return 0; 51 }