| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84297 | 张之隽 | 最大公约数(函数) | C++ | Accepted | 0 MS | 280 KB | 230 | 2024-07-15 15:08:08 |
#include<bits/stdc++.h> using namespace std; int sum(int n,int m) { for(int i=n;i>0;i--){ if(n%i==0&&m%i==0){ return i; } } } int main(){ int a,b; cin>>a>>b; cout<<sum(a,b); return 0; }