Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
38366 奚晨瑞 求两个数的公约数 C++ 通过 0 MS 236 KB 214 2024-01-26 20:52:46

Tests(1/1):


#include<iostream> using namespace std; int main() { int a,b; cin>>a>>b; int S=0; for(int i=1;i<=min(a,b);i++){ if(a%i==0&&b%i==0){ S+=1; cout<<i<<" "; } } cout<<endl<<S; return 0; }


测评信息: