Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.*;
- public class Main {
- public static void main(String args[]) {
- try (PrintWriter out = new PrintWriter(System.out)) {
- Scanner in = new Scanner(System.in);
- int n = in.nextInt();
- int x = 2;
- int res = 1;
- while (x < n) {
- x *= 2;
- res++;
- }
- out.print(res);
- } catch(Exception e) {
- System.out.println("Exception: " + e);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement