Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
163847 丁陆永新 最大公约数(函数) C++ Accepted 1 MS 272 KB 222 2026-10-31 10:47:16

Tests(10/10):


Code:

#include<iostream> #include<cmath> using namespace std; int d(int a,int b){ int y=0; while(a%b){ y=a%b; a=b; b=y; } return b; } int main() { int a,b; cin>>a>>b; cout<<d(a,b); return 0; }