Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //269
- #include <iostream>
- #include <cstdio>
- using namespace std;
- int main(void) {
- ios_base::sync_with_stdio(false);
- cin.tie(NULL);
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- int n, a, b, cnt = 0;
- cin >> n;
- for (int i = 0; i < n; ++ i) {
- cin >> a >> b;
- if (a % 2 == 0 && b % 2 == 0 || a % 2 != 0 && b % 2 != 0)
- ++ cnt;
- }
- cout << cnt;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement