Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
96489 任斌 公约数问题 C++ Accepted 1 MS 272 KB 213 2024-11-09 10:40:32

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int gys(int n,int x){ if(x==0) return n; return gys(x,n%x); } int main() { long long n,x; cin>>n>>x; cout<<gys(n,x)<<endl; return 0; }