Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158102 王垚植 统计硬币 C++ Compile Error 0 MS 0 KB 394 2026-08-20 16:10:02

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; for (int y=0;y<t;y++){ 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; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:12:14: error: 'x' was not declared in this scope
              x=m-i-j;
              ^
Main.cc:13:46: error: expected ')' before '{' token
              if ((i+j+x==m) && (i+j*2+x*5==n){
                                              ^
Main.cc:16:10: error: expected primary-expression before '}' token
          }
          ^