Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
1823 | 莫业祁 | 15求两个数的最大公约数 | C++ | Wrong Answer | 0 MS | 264 KB | 207 | 2023-11-11 18:19:08 |
# include<iostream> using namespace std; int main(){ int a,b,c;//c是余数 cin>>a>>b; c=a%b; while(c!=0){ a=b; b=c; c=a&b; } cout<<a; return 0; }
------Input------
25 70
------Answer-----
5
------Your output-----
70