Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
101709 | 王子毅 | 15求两个数的最大公约数 | C++ | Accepted | 1 MS | 272 KB | 234 | 2024-12-15 21:32:45 |
#include <iostream> using namespace std; int main() { int a, b; cin >> a; cin >> b; while (b!= 0) { int temp = a; a = b; b = temp % b; } cout << a << endl; return 0; }