Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
1246 | 李羽 | 15求两个数的最大公约数 | C++ | Wrong Answer | 0 MS | 256 KB | 202 | 2023-08-23 10:41:11 |
#include<iostream> using namespace std; int main(){ int a,b,y,temp; cin>>a>>b; if(a<b){ temp=a; a=b; b=temp; } while(y!=0){ y=a%b; a=b; b=y; } cout<<b; return 0; }
------Input------
25 70
------Answer-----
5
------Your output-----
25