Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
124506 陈华仁星 19选班长II C++ Compile Error 0 MS 0 KB 482 2025-07-11 16:23:10

Tests(0/0):


Code:

#include <cstdio> using namespace std; int a[8]; int main() { int p,cnt=0; for(int i=1; ;i++) { scanf("%d",&p); if(p==-1) { break; } if(p>0&&p<4) { a[p++]; } cnt++; } printf("A=%d\n",a[1]); printf("B=%d\n",a[2]); printf("C=%d\n",a[3]); int top=cnt/2; printf("Tot=%d\n",cnt); if(a[1]>top) prinft("A-yes"); else if(a[2]>top) prinft("B-yes"); else if(a[3]>top) prinft("C-yes"); else prinft("all-NO"); return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:26:16: error: 'prinft' was not declared in this scope
  prinft("A-yes");
                ^
Main.cc:28:16: error: 'prinft' was not declared in this scope
  prinft("B-yes");
                ^
Main.cc:30:16: error: 'prinft' was not declared in this scope
  prinft("C-yes");
                ^
Main.cc:32:17: error: 'prinft' was not declared in this scope
  prinft("all-NO");
                 ^
Main.cc:9:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&p);
                 ^