Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6020 | 谢锦卓 | 15求两个数的最大公约数 | C++ | Wrong Answer | 0 MS | 268 KB | 436 | 2024-12-28 09:49:14 |
#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 main(){ int a,b; int i; cin>>a>>b; if(a>b) i=b; else i=a; while(i>=1){ if(a%1==0&&b%1==0) break; i--; } cout<<i<<endl; return 0; }
------Input------
25 70
------Answer-----
5
------Your output-----
25