Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- using namespace std;
- int ans(int n)
- {
- int q = 0;
- while (n)
- {
- q += (n % 2 == 0);
- n /= 10;
- }
- return q;
- }
- int main()
- {
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- int n;
- cin >> n;
- cout << ans(n);
- }
Advertisement
Add Comment
Please, Sign In to add comment