Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64827 张誉腾 最大公约数(函数) C++ Accepted 2 MS 272 KB 295 2024-01-21 21:20:47

Tests(10/10):


Code:

#include <iostream> int gcd(int m, int n) { while (n != 0) { int t = m % n; m = n; n = t; } return m; } int main() { int m, n; std::cin >> m >> n; int result = gcd(m, n); std::cout << result << std::endl; return 0; }