Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
97040 杨一诺 公约数问题 C++ Accepted 1 MS 272 KB 215 2024-11-10 11:51:46

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int sum; int x,y; int age(int a,int b){ if(a%b==0){ return b; } else{ return age(b,a%b); } } int main(){ cin>>x>>y; cout<<age(x,y); return 0; }