| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149649 | 肖之睿 | 15求两个数的最大公约数 | C++ | Wrong Answer | 1 MS | 268 KB | 292 | 2026-03-15 15:06:16 |
#include<bits/stdc++.h> #define ll long long using namespace std; int main(){ int a; int b; cin>>a>>b; if(a-b>b-a) { for(int i=a-b;a%i==0||b%i==0;i++){ cout<<i; } }else if(a-b<b-a) { for(int i=b-a;a%i==0||b%i==0;i++){ cout<<i; } } return 0; }
------Input------
49 47
------Answer-----
1
------Your output-----