| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158577 | 王慕哲 | 最大公约数 | C++ | Compile Error | 0 MS | 0 KB | 254 | 2026-08-22 15:20:03 |
#include <iostream> using namespace std; int main(){ int a,b; cin>>a>>b; for(int i=1;i<=a;i++){ if(a%i==0 && b%i==0){ if(i>s){ s=i; } } } cout<<s; return 0; }
Main.cc: In function 'int main()':
Main.cc:8:18: error: 's' was not declared in this scope
if(i>s){
^
Main.cc:13:11: error: 's' was not declared in this scope
cout<