Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
151676 赵奕杰 15求两个数的最大公约数 C++ Accepted 1 MS 272 KB 176 2026-04-17 19:27:01

Tests(10/10):


Code:

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