Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96663 | 王煜鑫 | 15求两个数的最大公约数 | C++ | Compile Error | 0 MS | 0 KB | 419 | 2024-11-09 11:38:59 |
#include<iostream> using namespace std; int main(){ int a,b,min; cin>>a>>b; if(a<b){ min=a; } else{ min=b; } for(int i=min;i>=1;i--){ if(a%==0 && b%i==0){ cout<<i; return 0; } } } }
Main.cc: In function 'int main()': Main.cc:13:23: error: expected primary-expression before '=' token if(a%==0 && b%i==0){ ^ Main.cc: At global scope: Main.cc:21:5: error: expected declaration before '}' token } ^