Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
81589 刘宇轩 按班分组 C++ Accepted 1 MS 272 KB 215 2024-07-12 14:44:36

Tests(10/10):


Code:

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