Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
107888 | 朱彦宇 | 最大公约数 | C++ | Accepted | 0 MS | 272 KB | 255 | 2025-01-18 16:01:47 |
#include<iostream> #include<cmath> using namespace std; int main(){ int a,b; cin>>a>>b; for(int i=b;i>2;i--){ if(a%i==0&&b%i==0){ cout<<i; return 0; } } cout<<"1"; return 0; }