Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
77569 sh25_zhuhy 求两个数的最大公约数 C++ 通过 0 MS 240 KB 235 2025-12-26 14:27:54

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main() { int a,b,n,bomb; cin>>a>>b; n=1; for(bomb=1;bomb<=a&&bomb<=b;bomb++){ if(a%bomb==0&&b%bomb==0) n=bomb; } cout<<n; }


测评信息: