Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
56370 yuboyuan 求最大公约数问题 C++ 通过 0 MS 248 KB 222 2024-11-10 18:42:28

Tests(2/2):


#include<iostream> using namespace std; int main() { int a,b; cin>>a>>b; while(a*b!=0) { if(a>=b) a%=b; else b%=a; } if(a==0) cout<<b; else cout<<a; return 0; }


测评信息: