书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!

2012年4月5日

欧几里德算法求最大公约数

摘要: 在求两个数的最大公约数方法中,辗转相除法是比较快的一种方法。也就是著名的欧几里德方法。View Code int Gcd(int a, int b){ return b==0?a:gcd(b, a%b);}View Code #include "iostream"#include "cstdio"#include "cstring"#include "string"#include "algorithm"using namespace std;int Gcd(int a, int b)//殴几里 阅读全文

posted @ 2012-04-05 16:48 More study needed. 阅读(197) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!

点击右上角即可分享
微信分享提示