Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
69616 杨一诺 12自由落体 C++ Compile Error 0 MS 0 KB 201 2024-04-06 09:37:36

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,e,f=0; cin>>a; for(int i-1;i<=n;i++){ scanf("%1d%1d%1d%1d",&a,&b,&c,&d); if(d-a-b-c>0){ f++ } } cout<<f; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:11: error: expected ';' before '-' token
  for(int i-1;i<=n;i++){
           ^
Main.cc:6:17: error: 'n' was not declared in this scope
  for(int i-1;i<=n;i++){
                 ^
Main.cc:6:18: error: expected ')' before ';' token
  for(int i-1;i<=n;i++){
                  ^
Main.cc:6:19: error: 'i' was not declared in this scope
  for(int i-1;i<=n;i++){
                   ^
Main.cc:4:8: warning: unused variable 'b' [-Wunused-variable]
  int a,b,c,d,e,f=0;
        ^
Main.cc:4:10: warning: unused variable 'c' [-Wunused-variable]
  int a,b,c,d,e,f=0;
          ^
Main.cc:4:12: warning: unused variable 'd' [-Wunused-variable]
  int a,b,c,d,e,f=0;
            ^
Main.cc:4:14: warning: unused variable 'e' [-Wunused-variable]
  int a,b,c,d,e,f=0;
              ^