Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140478 郑羽辰 12满足条件的四位数 C++ Accepted 0 MS 276 KB 519 2025-12-14 17:30:22

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 n,k,a,b,c,d,m; m=0; cin>>n; for(int i=1;i<=n;i++){ cin>>k; d=k%10; c=k/10%10; b=k/100%10; a=k/1000; if(d-c-b-a>0){ m=m+1; } } cout<<m; return 0; }