| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 141500 | 翁思宸 | 最大公约数(函数) | C++ | Accepted | 0 MS | 272 KB | 341 | 2025-12-26 18:54:03 |
//1502 最大公约数(函数) #include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int use(int a,int b){ int s=0,c=a%b; while(c){ a=b; b=c; c=a%b; } return b; } int main(){ int m,n; cin>>m>>n; cout<<use(m,n)<<endl; return 0; }