Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean count = false;
- int i = 1, rnd = 1, num = Integer.parseInt(new BufferedReader(new InputStreamReader(System.in)).readLine());
- while(i < num)
- {
- if((!count && (num & i) > 0) || (count && (num & i) == 0))
- {
- count = true;
- System.out.println("Round: " + rnd);
- }
- i <<= 1;
- rnd++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement