Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
120895 鲁博睿 15求两个数的最大公约数 C++ Accepted 4 MS 276 KB 228 2025-06-01 16:22:53

Tests(10/10):


Code:

#include <bits/stdc++.h> ? using namespace std; int main() { //辗转相除法求最大公约数 int a,b,c; cin>>a>>b; c = a%b; while(c != 0){ a = b; b = c; c = a%b; } cout<<b<<endl; return 0; }