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