Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
117124 | 刘珩宇 | 公约数问题 | C++ | Accepted | 11 MS | 272 KB | 409 | 2025-04-13 18:57:35 |
#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 a(int x,int z){ if(x%z==0){ return z; } else{ return a(z,x%z); } } int main(){ int x,z; cin>>x>>z; cout<<a(x,z); return 0; }