Advertisement
a53

CifP_CifI

a53
Nov 18th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n,m;
  7. cin>>n>>m;
  8. if((n%2&&m%2)||((n%2==0)&&(m%2==0)))
  9. cout<<(n%2==0)+(m%2==0)+(n/10%2==0)+(m/10%2==0);
  10. if((n%2&&!(m%2))||(!(n%2)&&m%2))
  11. cout<<(n%2==1)+(m%2==1)+(n/10%2==1)+(m/10%2==1);
  12. return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement