Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
96691 刘轻松 15求两个数的最大公约数 C++ Time Limit Exceeded 1000 MS 268 KB 227 2024-11-09 11:53:08

Tests(0/10):


Code:

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