fork download
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int n,x,g,s,b,q,t,z=0;
  6. for (int i=1;i<=n;i++)
  7. {
  8. cin>>x;
  9. q=x/1000;
  10. x=x%1000;
  11. b=x/100;
  12. x=x%100;
  13. s=x/10;
  14. g=x%10;
  15. t=g-q-b-s;
  16. if (t>0) z++;
  17. }
  18. cout<<z<<endl;
  19. return 0;
  20. }
Success #stdin #stdout 0s 15232KB
stdin
5
1234 1349 6119 2123 5017
stdout
0