Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
14273 xingru 求两个数的公约数 C++ 通过 0 MS 252 KB 205 2023-04-12 16:24:03

Tests(1/1):


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


测评信息: