Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135554 成书骏 满足条件四位数的个数 C++ Accepted 1 MS 272 KB 517 2025-11-05 19:34:47

Tests(10/10):


Code:

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