Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
7478 | 赖梓乐 | 12满足条件的四位数 | C++ | Accepted | 0 MS | 264 KB | 693 | 2025-04-26 21:04:42 |
#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 s,d,q,w,e,r,f; //cin>>s; //for(;s<=d;s++,int a){ // r=a%10 //e=a/10%10 //w=a/100%100 //q=a/1000%10; //} int n,temp,cnt=0; cin>>n; for(int i=1;i<=n;i++){ cin>>temp; int g=temp%10; int s=temp/10%10; int b=temp/100%10; int q=temp/1000%10; if(g-s-b-q>0) cnt++; } cout<<cnt; return 0; }