Created
August 3, 2014 01:23
-
-
Save hilda8519/e28aad763b49a0259553 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Q54 { | |
public static void main(String[] args){ | |
System.out.println(match2Number(2,4)); | |
} | |
static boolean match2Number(int N,int Number M) { | |
M=N-1; | |
if(M==null){ | |
return false; | |
} | |
if(N==null){ | |
return false; | |
} | |
if((N&M)==0){ | |
return true; | |
} | |
return false; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment