Advertisement
a53

cifmaximp

a53
Dec 9th, 2020
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int cmmci(int n)
  5. {
  6. int cmmc=0;
  7. while(n)
  8. cmmc=max(cmmc,n%10),n/=10;
  9. if(cmmc%2)
  10. return 1;
  11. else
  12. return 0;
  13. }
  14.  
  15. int main()
  16. {
  17. int n;
  18. cin>>n;
  19. int x,nrncmmci=0;
  20. while(n--)
  21. cin>>x,nrncmmci+=cmmci(x);
  22. cout<<nrncmmci<<'\n';
  23. return 0;
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement