Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
75532 sh25_shenpy 求两个数的公约数 C++ 通过 0 MS 248 KB 273 2025-12-07 16:32:26

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main() { int a,b,w,s=0; cin>>a>>b; w=__gcd(a,b); for(int i=1;i<=w;++i){ if(w%i==0){ s++; cout<<i<<" "; } } cout<<endl; cout<<s; return 0; }


测评信息: