全部评论 1

  • /code/judger/run/20250715/5053269145596985442/main.cpp: In function 'int main()':
    /code/judger/run/20250715/5053269145596985442/main.cpp:8:38: error: expected unqualified-id before ';' token
    8 | int a=n/(m10),b=n/m%10,*****; //a,b,c为n的三部分,求哪一位x的个数,b就为那一位数,a为b左边的数,c为b右边的数,如求1~728中十位7的个数,则a=7,b=2,c=8
    | ^
    /code/judger/run/20250715/5053269145596985442/main.cpp:11:31: error: 'c' was not declared in this scope
    11 | if(b==x) ans+=a
    m+c+1; //如果b=x,说明有am+c+1个x(如求1~728中百位7的个数,则为0100+28+1=29)
    | ^
    /code/judger/run/20250715/5053269145596985442/main.cpp:16:31: error: 'c' was not declared in this scope
    16 | else ans+=(a-1)*m+c+1;
    | ^

    1周前 来自 广东

    0
    • 报错了

      1周前 来自 广东

      0
    • 编译错误: /code/judger/test/1945080087386005504/main.cpp: In function 'int main()':
      /code/judger/test/1945080087386005504/main.cpp:8:38: error: expected unqualified-id before ';' token
          8 |         int a=n/(m*10),b=n/m%10,*****; //a,b,c为n的三部分,求哪一位x的个数,b就为那一位数,a为b左边的数,c为b右边的数,如求1~728中十位7的个数,则a=7,b=2,c=8
            |                                      ^
      /code/judger/test/1945080087386005504/main.cpp:11:31: error: 'c' was not declared in this scope
         11 |             if(b==x) ans+=a*m+c+1; //如果b=x,说明有a*m+c+1个x(如求1~728中百位7的个数,则为0*100+28+1=29)
            |                               ^
      /code/judger/test/1945080087386005504/main.cpp:16:31: error: 'c' was not declared in this scope
         16 |             else ans+=(a-1)*m+c+1;
            |                               ^
      

      1周前 来自 广东

      0
首页