Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
129480 | 林麒瑞 | 级数求和 | C++ | 运行出错 | 0 | 0 MS | 240 KB | 277 | 2024-01-27 08:39:45 |
#include<bits/stdc++.h> 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; }