Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158140 陈襗葳 统计硬币 C++ Compile Error 0 MS 0 KB 281 2026-08-20 16:46:12

Tests(0/0):


Code:

#include <iostream> using namespace std; int main() { int n,cnt=0; cin>>n>>m; for(int x=0;x<=n;x++){ for(int y=0;y<=n/2;y++){ int z=n-x-y; if(z>=0 && x+2y+5z==m){ cnt++; } } } cout<<cnt; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:13: error: 'm' was not declared in this scope
     cin>>n>>m;
             ^
Main.cc:9:26: error: unable to find numeric literal operator 'operator""y'
             if(z>=0 && x+2y+5z==m){
                          ^
Main.cc:9:26: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
Main.cc:9:29: error: unable to find numeric literal operator 'operator""z'
             if(z>=0 && x+2y+5z==m){
                             ^
Main.cc:9:29: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes