Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
75270 田苒彤 12满足条件的四位数 C++ Compile Error 0 MS 0 KB 285 2024-05-26 15:43:08

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,z,gd=0; cin>>n; for(int i=1;i<=n;i++){ cin>>z; int g=z%10; int s=z/10%10; int b=z/100%10; int q=z/1000%10; if(g-s-b-q>0){ gd++; } } cout<<gd; return 0; }


Run Info:

Main.cc:11:6: error: stray '\357' in program
      int q=z/1000%10;
      ^
Main.cc:11:6: error: stray '\274' in program
Main.cc:11:6: error: stray '\233' in program
Main.cc: In function 'int main()':
Main.cc:12:3: error: expected ',' or ';' before 'if'
   if(g-s-b-q>0){
   ^
Main.cc:8:10: warning: unused variable 'g' [-Wunused-variable]
      int g=z%10;
          ^
Main.cc:9:10: warning: unused variable 's' [-Wunused-variable]
      int s=z/10%10;
          ^
Main.cc:10:10: warning: unused variable 'b' [-Wunused-variable]
      int b=z/100%10;
          ^
Main.cc:11:10: warning: unused variable 'q' [-Wunused-variable]
      int q=z/1000%10;
          ^