求助cpp 为什么dev里能正常运行,洛谷提交报错,样例全过!
#include <bits/stdc++.h>
using namespace std;
long long n, a, b, c, ans = 2100000000, x;
int main() {
cin >> n;
for (int i = 0; i < 3; i++) {
cin >> a >> b;
x = ceil(n * 1.0 / a) * b;
ans = min(x, ans);
}
cout << ans;
return 0;
}
LUOGU提交后出现的
编译失败
/tmp/compiler_fsij8xww/src:30:9: 错误:expected unqualified-id before ‘return’
30 | return 0;
| ^~~~~~
/tmp/compiler_fsij8xww/src:31:1: 错误:expected declaration before ‘}’ token
31 | }
| ^