Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6028 谢锦卓 15求两个数的最大公约数 C++ Accepted 0 MS 260 KB 295 2024-12-28 10:00:50

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a,b,i,c=0; cin>>a>>b; i=a%b; while(i!=0){ a=b; b=i; i=a%b; } cout<<b<<endl; return 0; }