Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5673 谢锦卓 12满足条件的四位数 C++ Accepted 0 MS 252 KB 501 2024-12-10 20:18:30

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