Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
97039 杨一诺 最大公约数(函数) C++ Accepted 0 MS 276 KB 215 2024-11-10 11:51:36

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; }