| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 67525 | 孙诗皓 | 15求两个数的最大公约数 | C++ | Accepted | 1 MS | 272 KB | 247 | 2024-03-16 16:47:37 |
#include<iostream> using namespace std; int main() { int a,b,i=0,max=0; cin>>a>>b; while(i<=a) { i++; if(a%i==0 && b%i==0) { max=i; } } cout<<max; return 0; }