Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
129348 | 罗安博 | 15求两个数的最大公约数 | C++ | Accepted | 1 MS | 272 KB | 185 | 2025-08-24 14:09:47 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,c; cin>>n>>m; c=n%m; while(c!=0){ n=m; m=c; c=n%m; } cout<<m; return 0; }