Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
80911 sh25_zhangyy 统计满足条件的4位数 C++ Accepted 0 MS 252 KB 339 2026-01-04 15:34:38

Tests(1/1):


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


Judgement Protocol: