| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84265 | 石晋骁 | 最大公约数(函数) | C++ | Compile Error | 0 MS | 0 KB | 229 | 2024-07-15 14:46:02 |
#include<bits/stdc++.h> using namespace std; int sum(int a,int b){ while(a%b != 0){ int yu =a % b; a = n; b = yu; } cout << n; } int main(){ long long m,n; cin >>m >>n; sum (m,n); return 0; }
Main.cc: In function 'int sum(int, int)':
Main.cc:6:10: error: 'n' was not declared in this scope
a = n;
^
Main.cc:9:10: error: 'n' was not declared in this scope
cout << n;
^
Main.cc:10:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^