Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
101139 廖宸睿 公约数问题 C++ Accepted 1 MS 276 KB 409 2024-12-14 15:04:51

Tests(10/10):


Code:

#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 n,int w){ if(n%w==0) return w; else return a(w,n%w); } int main(){ int q,e; cin>>q>>e; cout<<a(q,e); return 0; }