| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158100 | 王垚植 | 统计硬币 | C++ | Compile Error | 0 MS | 0 KB | 322 | 2026-08-20 16:07:27 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; int C=0; cin>>n>>m; for (int i=0;i<=m;i++){ for (int j=0;j<=m/2;j++){ x=m-i-j; if ((i+j+x==m) && (i+j*2+x*5==n){ C++; } } } cout<<C; return 0; }
Main.cc: In function 'int main()':
Main.cc:9:13: error: 'x' was not declared in this scope
x=m-i-j;
^
Main.cc:10:45: error: expected ')' before '{' token
if ((i+j+x==m) && (i+j*2+x*5==n){
^
Main.cc:13:9: error: expected primary-expression before '}' token
}
^