oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

log2 Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

log2.html

Problem Description

In many programming algorithms, 'log n' is a common term in its complexity analysis. What does 'log n' mean? In the context of programming algorithms, it means "log n to the base of 2". So what is 'log'? 'log base 2' means how many times a number can be divided by 2. 'log base 3' means how many times a number can be divided by 3.. and so on. (Eg log2 8 = 3, log3 9 = 2).

Your task is to find out how many times a number can be divided (using integer division) by 2 before it is less than 2.

Input

Consists a single integer, which is not more than 1000000000.

Output

A single integer, which is how many times a number can be divided by 2 before it is less than 2.

Sample Input

3

Sample Output

1

Tags

Number Theory

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100101s32MBAverage
2011s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o log2 -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.