Skip to content

Instantly share code, notes, and snippets.

@monhime
Created August 21, 2021 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monhime/f9fd73efbb6ab4883d41219b71cd72ac to your computer and use it in GitHub Desktop.
Save monhime/f9fd73efbb6ab4883d41219b71cd72ac to your computer and use it in GitHub Desktop.
ABC215_B
import sys, math, copy
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
# sys.setrecursionlimit(1000000)
def input(): return sys.stdin.readline().rstrip()
def main():
mod = 10**9 + 7
inf = 10**10
n = int(input())
k = 0
while True:
if 2**k > n:
print(k - 1)
sys.exit()
k += 1
if __name__=='__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment