Untitled


SUBMITTED BY: Guest

DATE: Oct. 26, 2014, 9:32 p.m.

FORMAT: Text only

SIZE: 413 Bytes

HITS: 1081

  1. #include <iostream>
  2. using namespace std;
  3. int tab[1000000];
  4. int main()
  5. {
  6. int n=0;
  7. while(cin>>tab[n])
  8. {
  9. n++;
  10. }
  11. int iloscx=0;
  12. for(int i = 0; i < n-2; i++)
  13. {
  14. int x = tab[i];
  15. int ilosc = 0;
  16. while(x>=10)
  17. {
  18. if(x%10==0)
  19. ilosc++;
  20. x /= 10;
  21. }
  22. if(ilosc==tab[n-1]) iloscx++;
  23. }
  24. cout<<iloscx;
  25. return 0;
  26. }

comments powered by Disqus