Skip to content

Instantly share code, notes, and snippets.

@hilda8519
Created August 3, 2014 01:23
Show Gist options
  • Save hilda8519/e28aad763b49a0259553 to your computer and use it in GitHub Desktop.
Save hilda8519/e28aad763b49a0259553 to your computer and use it in GitHub Desktop.
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