| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84276 | 张之隽 | 最大公约数(函数) | C++ | Compile Error | 0 MS | 0 KB | 224 | 2024-07-15 14:52:49 |
#include<bits/stdc++.h> using namespace std; int sum(int a,int b) { while(a%b!=0) { int yu=a%b; a=b; b=yu; } cout<<b; } int main() { long long m,n; cin>>m>>n; sum (m); return 0; }
Main.cc: In function 'int sum(int, int)':
Main.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
Main.cc: In function 'int main()':
Main.cc:18:7: error: too few arguments to function 'int sum(int, int)'
sum (m);
^
Main.cc:4:5: note: declared here
int sum(int a,int b)
^