Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- class TestClass {
- public static void main(String args[] ) throws Exception {
- Scanner sc = new Scanner(System.in);
- int m = sc.nextInt();
- int n = sc.nextInt();
- for(int i = 0; i <= m; i++) {
- if((i ^ (m - i)) == n) {
- System.out.println(1);
- return;
- }
- }
- System.out.println(0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement