Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
123866 程诺 12满足条件的四位数 C++ Compile Error 0 MS 0 KB 416 2025-07-10 14:25:39

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ /** int n,m; cin>>n>>m; for(int i=n;i<=m;i++){ cout<<char(i+96)<<" "; } double h=100; for(int i=1;i<=10;i++){ h/=2; } printf("%.6lf",h); **/ int a,b,g,s,b,q,cnt=0; cin>>a>>b; for(int i=1;i<=n;i++){ g = m%10; s = m/10%10; b = m/100%10; q = m/1000%10; if(g-q-b-s>0){ cnt++; } } cout<<cnt; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:15:14: error: redeclaration of 'int b'
  int a,b,g,s,b,q,cnt=0;
              ^
Main.cc:15:8: note: 'int b' previously declared here
  int a,b,g,s,b,q,cnt=0;
        ^
Main.cc:17:17: error: 'n' was not declared in this scope
  for(int i=1;i<=n;i++){
                 ^
Main.cc:18:7: error: 'm' was not declared in this scope
   g = m%10;
       ^