编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#17746 #2015. shenchuan的CF段位 Compile Error 0 0 ms 0 K C++ / 1.2 K 192024212149 2024-10-19 13:53:53
显示原始代码
#include <stdio.h>

int main() {
    long n;
    long Rating;
    int i = 1;
    scanf("%ld", &n);
    while (n >= 1 && n <= 1e3) {
        for (i = 1; i <= n; i++) {
            scanf("%ld", &score);
            if (Rating >= 0 && Rating <= 1200) {
                printf("Newbie No\n");
            } else if (Rating > 1200 && Rating < 1400) {
                printf("Pupil NO\n");
            } else("1400 ≤ Rating&&Rating < 1600){
      printf("Specialist NO\n");
        }else if("1600 ≤ Rating &&Rating<1700){
      printf("Expert No\n");
    }
    else if (Rating >= 1700 && Rating < 1900) {
        printf("Expert Yes\n");
    }
    else if (1900 ≤ Rating && Rating < 2100) {
        printf("Candidate Master Yes\n");
    }
    else if (2100 ≤ Rating && Rating < 2300) {
        printf("Master Yes\n");
    }
    else if (2300 ≤ Rating && Rating < 2400) {
        printf("International Master Yes");
    }
    else if (2400 ≤ Rating && Rating < 2600) {
        printf("Grandmaster Yes\n");
    }else if("2600 ≤ Rating&&Rating < 3000){
       prinf("International Grandmaster Yes\n");
}else if("3000 ≤ Rating&&Rating < 4000){
       printf("Legendary Grandmaster Yes\n");
}
else {
    printf("Tourist Yes\n");
}
}
}
return 0;
}

编译信息

/sandbox/1/a.cpp:15:11: warning: missing terminating " character
   15 |     }else("1400 ≤ Rating&&Rating < 1600){
      |           ^
/sandbox/1/a.cpp:15:11: error: missing terminating " character
   15 |     }else("1400 ≤ Rating&&Rating < 1600){
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/sandbox/1/a.cpp:17:14: warning: missing terminating " character
   17 |     }else if("1600 ≤ Rating &&Rating<1700){
      |              ^
/sandbox/1/a.cpp:17:14: error: missing terminating " character
   17 |     }else if("1600 ≤ Rating &&Rating<1700){
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/sandbox/1/a.cpp:21:22: error: extended character ≤ is not valid in an identifier
   21 |        }else if(1900 �� Rating&&Rating < 2100){
      |                      ^
/sandbox/1/a.cpp:23:22: error: extended character ≤ is not valid in an identifier
   23 |        }else if(2100 �� Rating&&Rating < 2300){
      |                      ^
/sandbox/1/a.cpp:25:22: error: extended character ≤ is not valid in an identifier
   25 |        }else if(2300 �� Rating&&Rating < 2400){
      |                      ^
/sandbox/1/a.cpp:27:22: error: extended character ≤ is not valid in an identifier
   27 |        }else if(2400 �� Rating&&Rating < 2600){
      |                      ^
/sandbox/1/a.cpp:29:17: warning: missing terminating " character
   29 |        }else if("2600 ≤ Rating&&Rating < 3000){
      |                 ^
/sandbox/1/a.cpp:29:17: error: missing terminating " character
   29 |        }else if("2600 ≤ Rating&&Rating < 3000){
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/sandbox/1/a.cpp:31:17: warning: missing terminating " character
   31 |        }else if("3000 ≤ Rating&&Rating < 4000){
      |                 ^
/sandbox/1/a.cpp:31:17: error: missing terminating " character
   31 |        }else if("3000 ≤ Rating&&Rating < 4000){
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/sandbox/1/a.cpp: In function 'int main()':
/sandbox/1/a.cpp:10:22: error: 'score' was not declared in this scope
   10 |         scanf("%ld",&score);
      |                      ^~~~~
/sandbox/1/a.cpp:16:32: error: expected ')' before ';' token
   16 |       printf("Specialist NO\n");
      |                                ^
      |                                )
/sandbox/1/a.cpp:15:10: note: to match this '('
   15 |     }else("1400 ≤ Rating&&Rating < 1600){
      |          ^
/sandbox/1/a.cpp:17:6: error: 'else' without a previous 'if'
   17 |     }else if("1600 ≤ Rating &&Rating<1700){
      |      ^~~~
/sandbox/1/a.cpp:18:7: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17'
   18 |       printf("Expert No\n");
      |       ^~~~~~
/sandbox/1/a.cpp:19:7: error: expected primary-expression before '}' token
   19 |       }else if(Rating>=1700&&Rating< 1900){
      |       ^
/sandbox/1/a.cpp:18:29: error: expected ')' before '}' token
   18 |       printf("Expert No\n");
      |                             ^
      |                             )
   19 |       }else if(Rating>=1700&&Rating< 1900){
      |       ~                      
/sandbox/1/a.cpp:17:13: note: to match this '('
   17 |     }else if("1600 ≤ Rating &&Rating<1700){
      |             ^
/sandbox/1/a.cpp:19:7: error: expected primary-expression before '}' token
   19 |       }else if(Rating>=1700&&Rating< 1900){
      |       ^
/sandbox/1/a.cpp:19:8: error: 'else' without a previous 'if'
   19 |       }else if(Rating>=1700&&Rating< 1900){
      |        ^~~~
/sandbox/1/a.cpp:21:21: error: expected ')' before '\U00002264'
   21 |        }else if(1900  Rating&&Rating < 2100){
      |                ~    ^~
      |                     )
/sandbox/1/a.cpp:23:21: error: expected ')' before '\U00002264'
   23 |        }else if(2100  Rating&&Rating < 2300){
      |                ~    ^~
      |                     )
/sandbox/1/a.cpp:25:21: error: expected ')' before '\U00002264'
   25 |        }else if(2300  Rating&&Rating < 2400){
      |                ~    ^~
      |                     )
/sandbox/1/a.cpp:27:21: error: expected ')' before '\U00002264'
   27 |        }else if(2400  Rating&&Rating < 2600){
      |                ~    ^~
      |                     )
/sandbox/1/a.cpp:30:8: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17'
   30 |        prinf("International Grandmaster Yes\n");
      |        ^~~~~
/sandbox/1/a.cpp:30:8: error: 'prinf' was not declared in this scope; did you mean 'printf'?
   30 |        prinf("International Grandmaster Yes\n");
      |        ^~~~~
      |        printf
/sandbox/1/a.cpp:31:8: error: expected primary-expression before '}' token
   31 |        }else if("3000 ≤ Rating&&Rating < 4000){
      |        ^
/sandbox/1/a.cpp:30:49: error: expected ')' before '}' token
   30 |        prinf("International Grandmaster Yes\n");
      |                                                 ^
      |                                                 )
   31 |        }else if("3000 ≤ Rating&&Rating < 4000){
      |        ~                                         
/sandbox/1/a.cpp:29:16: note: to match this '('
   29 |        }else if("2600 ≤ Rating&&Rating < 3000){
      |                ^
/sandbox/1/a.cpp:31:8: error: expected primary-expression before '}' token
   31 |        }else if("3000 ≤ Rating&&Rating < 4000){
      |        ^
/sandbox/1/a.cpp: At global scope:
/sandbox/1/a.cpp:31:9: error: expected unqualified-id before 'else'
   31 |        }else if("3000 ≤ Rating&&Rating < 4000){
      |         ^~~~
/sandbox/1/a.cpp:33:8: error: expected declaration before '}' token
   33 |        }else{
      |        ^
/sandbox/1/a.cpp:33:9: error: expected unqualified-id before 'else'
   33 |        }else{
      |         ^~~~
/sandbox/1/a.cpp:36:5: error: expected declaration before '}' token
   36 |     }
      |     ^
/sandbox/1/a.cpp:37:3: error: expected declaration before '}' token
   37 |   }
      |   ^
/sandbox/1/a.cpp:38:8: error: expected unqualified-id before 'return'
   38 |        return 0;
      |        ^~~~~~
/sandbox/1/a.cpp:39:1: error: expected declaration before '}' token
   39 | }
      | ^
/sandbox/1/a.cpp: In function 'int main()':
/sandbox/1/a.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    7 |     scanf("%ld",&n);
      |     ~~~~~^~~~~~~~~~