Run ID:96698

提交时间:2024-11-09 11:57:27

#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,yushu,t; cin>>a>>b; if(a<b){ t =a; a = b; b = t; } //辗转相处法-求最大公约数 yushu = a%b; while(yushu != 0){ a = b; b = yushu; yushu = a%b; } cout<<b; return 0; }