| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84283 | 游四鑫 | 最大公约数(函数) | C++ | Accepted | 1 MS | 268 KB | 238 | 2024-07-15 14:54:08 |
#include<iostream> #include<cmath> using namespace std; int main(){ int a,b; cin>>a>>b; for(int i=sqrt((a+b));i>=0;i--){ if(a%i==0&&b%i==0){ cout<<i; return 0; } } return 0; }