- 博客(3)
- 收藏
- 关注
原创 高效率取幂算法
/********运行时间为o(logN)********/ #include int main() { long int Pow(long int x,int N); int IsEven(int N); long int a; int m; scanf("%ld\n%d",&a,&m); printf("%ld",Pow(a,m)); return 0; getchar();
2014-07-11 09:58:06 549
原创 欧几里德算法(求两个数的最大公约数)
求两个数的最大公约数 #include int main() { unsigned int Gcd(unsigned int M,unsigned int N); int a,b; printf("please enter two numbers:\n"); scanf("a=%u b=%u",&a,&b); printf("the greatest common divisor is
2014-07-10 15:48:26 931
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人