Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135551 何旻慧 满足条件四位数的个数 C++ Accepted 1 MS 268 KB 518 2025-11-05 19:25:51

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,b,sum=0,g,s,bi,q; cin>>a; for(int x=1;x<=a;x++){ cin>>b; g=b%10; s=b%100/10; bi=b/100%10; q=b/1000; if(g-q-bi-s>0){ sum=sum+1; } } cout<<sum; return 0; }