Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
122429 | 糜宗易 | 最大公约数 | C++ | Accepted | 1 MS | 268 KB | 255 | 2025-06-19 19:18:29 |
#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; }