Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
123864 李昊宇 12满足条件的四位数 C++ Accepted 1 MS 276 KB 259 2025-07-10 14:24:53

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int a,g,s,b,q,n,sum=0; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>a; g = a%10; s = a/10%10; b = a/100%10; q = a/1000%10; if(g-q-b-s>0){ sum++; } } cout<<sum; return 0; }