| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149654 | 肖之睿 | 15求两个数的最大公约数 | C++ | Compile Error | 0 MS | 0 KB | 321 | 2026-03-15 15:27:29 |
#include<bits/stdc++.h> using namespace std; int main(){ int a; int b; cin>>a>>b; if(a>b) { int t=a; a=b; b=t; } if(a%b==0){ cout<<b; return 0; } for(int i=b;i>=1;i--){ if(a%i==0&&b%i==0){ cout<<i; return 0; } }
Main.cc: In function 'int main()': Main.cc:21:2: error: expected '}' at end of input } ^