Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
159742 张晓冉 最大公约数(函数) C++ Wrong Answer 2 MS 272 KB 290 2026-09-06 15:06:52

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; int i = 1; int s = 0; while(i <= b){ i++; if(a % i == 0 && b % i == 0){ s += i; break; } } cout<<i<<endl; return 0; }


Run Info:

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