摘要: View Code 1 /* 2 推出:f[n]=2*f[n-1]+1; 3 f[1]=1; 4 可得:f[n]=2^n-1; 5 */ 6 #include<iostream> 7 #include<cstdio> 8 using namespace std; 9 10 const int x=1000000;11 void gao(int n)12 {13 long long s=1,t=2;//注意范围 14 for(;n;n>>=1,t=(t%x)*(t%x),t%=x)15 if(n&1)16 {17 s%=x;18 ... 阅读全文
posted @ 2012-02-21 12:56 知行执行 阅读(140) 评论(0) 推荐(0) 编辑