Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
114852 刘珩宇 最大公约数(函数) C++ Accepted 1 MS 272 KB 392 2025-03-23 19:12:07

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 out(int x,int y){ while(y){ int a=x%y; x=y; y=a; } return x; } int main(){ int n,m,s=0; cin>>n>>m; cout<<out(n,m); return 0; }