Advertisement
Guest User

Nerekurz

a guest
Apr 1st, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.15 KB | None | 0 0
  1. public static int goo(int x, int y) {
  2.         int z = x & y;
  3.         int count = 0;
  4.         while (z != 0){
  5.             count += z & 1;
  6.             z >>= 1;
  7.         }
  8.         return count;
  9.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement