辗转相除法,扩展欧几里德算法,线性同余方程(poj 1061)
摘要:
(poj 1061)http://hi.baidu.com/newmyl/item/dc6805253305833195f62b0a http://blog.csdn.net/lansetiankong_yiyi/article/details/5841825辗转相除法:递归:int Gcd(int a, int b) { if(b == 0) return a; return Gcd(b, a % b); }非递归:int Gcd(int a, int b) { while(b != 0) { int r = b; b = a % b; a = r; ... 阅读全文
posted @ 2013-02-17 21:29 Sure_Yi 阅读(940) 评论(0) 推荐(0) 编辑