Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
128658 林扬皓bylz 求最大公约数和最小公倍数 C++ 通过 100 0 MS 256 KB 288 2024-01-26 08:08:33

Tests(3/3):


#include<iostream> using namespace std; int qsq(int a, int b) { int c=1; while (c != 0) { c = a % b; a = b; b = c; } return a; } int main() { int a, b, x; cin >> a >> b; x = a * b / qsq(a, b); cout << qsq(a, b) <<" "; cout << x << endl; return 0; }


测评信息: