| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84287 | 刘宇轩 | 最大公约数(函数) | C++ | Accepted | 1 MS | 272 KB | 214 | 2024-07-15 14:56:53 |
#include<bits/stdc++.h> using namespace std; int d(int b,int c){ for(int i=b;i>=0;i--){ if(b%i==0&&c%i==0){ return i; } } } int main(){ int a,b; cin>>a>>b; cout<<d(a,b); return 0; }