摘要: 1 #include 2 #include 3 bool prime(int n) 4 { 5 if(n==1) 6 return false; 7 int i,t=(int)sqrt(1.0*n); 8 for(i=2; i<=t; ++i) 9 if(!(n%i)) 10 return fals... 阅读全文
posted @ 2017-02-10 21:49 Posase 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 3 int gys(int x,int y) 4 { 5 if(y) 6 gys(y,x%y); 7 else 8 return x; 9 } 10 11 int main() 12 { 13 int a,b; 14 while(~scanf("%d%d",&a,&b)) 15 ... 阅读全文
posted @ 2017-02-10 21:15 Posase 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 int cus(int x,long long y) 3 { 4 long long temp = (long long)1 temp) 8 y-=temp; 9 cus(x-1,y); 10 } 11 int main() 12 { 13 int a; 14 long long b; 15 while... 阅读全文
posted @ 2017-02-10 21:06 Posase 阅读(313) 评论(0) 推荐(1) 编辑
摘要: 1 //找规律。。。 2 #include 3 long long a[30]; 4 void cus(int t,long long x) 5 { 6 if(t>=30) 7 return ; 8 a[t]=x; 9 cus(t+1,3*x); 10 } 11 12 int main() 13 { 14 cus(1,3); 1... 阅读全文
posted @ 2017-02-10 18:44 Posase 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 1 //找规律即可,下附打表 2 #include 3 int main() 4 { 5 int n; 6 scanf("%d",&n); 7 while(n--) 8 { 9 int a,b; 10 scanf("%d%d",&a,&b); 11 printf("%lld\n",(long lon... 阅读全文
posted @ 2017-02-10 17:52 Posase 阅读(268) 评论(0) 推荐(0) 编辑