【HDOJ】1019 Least Common Multiple
摘要:
gcd总是忘记,留存。 1 #include 2 3 int gcd(int a, int b) { 4 int r; 5 6 if (a<b) { 7 r = b; 8 b = a; 9 a = r;10 }11 12 while (b) {13 r = a % b;14 a = b;15 b = r;16 }17 18 return a;19 }20 21 int main() {22 int n, case_n;23 int... 阅读全文
posted @ 2014-03-31 22:51 Bombe 阅读(98) 评论(0) 推荐(0) 编辑