| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 140459 | 唐诗阳 | 最大公约数(函数) | C++ | Accepted | 0 MS | 268 KB | 522 | 2025-12-14 15:21:43 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int gys(int a,int b){ int s=0; if(a%b==0){ s=1; } return s; } int main(){ int m,n; cin>>m>>n; for(int i=m/2;i>=1;i--){ if(gys(m,i)==1 && gys(n,i)==1){ cout<<i; break; } } return 0; }