Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122134 王金檐 15求两个数的最大公约数 C++ Accepted 1 MS 272 KB 200 2025-06-14 12:20:19

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main (){ int n,m; cin>>n>>m; int i=n; while(n>1||m>1){ if(n%i==0 && m%i==0){ cout<<i; return 0; } i--; } return 0; }