解题思路:
注意事项:
参考代码:
#include <cstdio> #include <cstdlib> #include <iostream> #include <cmath> #include <cctype> #include <cstring> #include <string> #include <stack> #include <algorithm> #include <functional> using namespace std; int gcd(int a, int b) { return b ? gcd(b, a%b) : a; } int gbd(int a, int b) { return a*b/gcd(a,b); } int main() { int a, b, c; scanf("%d%d%d", &a, &b, &c); printf("%d\n",a*b/gcd(a,b)*c/gcd(c,a*b/gcd(a,b))); return 0; }
0.0分
2 人评分
C语言程序设计教程(第三版)课后习题6.7 (C语言代码)浏览:749 |
C语言程序设计教程(第三版)课后习题7.5 (C语言代码)浏览:639 |
2005年春浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:490 |
简单的a+b (C语言代码)浏览:537 |
蓝桥杯历届试题-九宫重排 (C++代码)浏览:2783 |
买不到的数目 (C++代码)浏览:862 |
人见人爱A+B (C语言代码)浏览:626 |
拆分位数 (C语言代码)浏览:1326 |
C语言程序设计教程(第三版)课后习题1.6 (C++代码)浏览:889 |
printf基础练习2 (有点不明白)浏览:837 |