Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
117040 唐诗阳 满足条件四位数的个数 C++ Compile Error 0 MS 0 KB 360 2025-04-13 14:29:11

Tests(0/0):


Code:

#include<iostream> #include<cstdio> //scanf()\printf() #include<cstring> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,x,s,g,s,b,q; for(int i=1;i<=n;i++){ cin>>x; g=x%10; s=x/10%10; b=x/100%10; q=/1000; if(g-s-b-q>0) s++; } cout<<s; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:13: error: redeclaration of 'int s'
 int n,x,s,g,s,b,q;
             ^
Main.cc:7:9: note: 'int s' previously declared here
 int n,x,s,g,s,b,q;
         ^
Main.cc:13:7: error: expected primary-expression before '/' token
     q=/1000;
       ^