Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n, i, x, maxim, sol;
- int main () {
- cin>>n;
- for (i=1;i<=n;i++) {
- cin>>x;
- maxim = 0;
- while (x!=0) {
- if (x%10 > maxim)
- maxim = x%10;
- x /= 10;
- }
- if (maxim%2 == 1)
- sol++;
- }
- cout<<sol;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment