Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78079 刘泽熙 15求两个数的最大公约数 C++ Wrong Answer 0 MS 268 KB 248 2024-06-16 14:23:28

Tests(0/10):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; int i = 1; cin >> a >> b; if (a < b) { c = a; } else { c = b; } while (i <= c) { if (c % i == 0) { d = i; } i++; } cout << i - 1; }


Run Info:

------Input------
49 47
------Answer-----
1
------Your output-----
47