Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
69477 邓嘉懿 15求两个数的最大公约数 C++ Accepted 1 MS 280 KB 192 2024-04-05 11:29:51

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ int a,b,gy; cin>>a>>b; int i=1; while(i<=a&&i<=b){ if(a%i==0&&b%i==0){ gy=i; } i++; } cout<<gy; return 0; }