Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
151675 赵奕杰 15求两个数的最大公约数 C++ Wrong Answer 1 MS 260 KB 169 2026-04-17 19:26:32

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a=15,b=18,y=1,max=0; while(y<=a){ if(a%y==0&&b%y==0) max=y; y++; } cout<<max; return 0; }


Run Info:

------Input------
49 47
------Answer-----
1
------Your output-----
3