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