← Back to List

27961번: 고양이는 많을수록 좋다 ↗

Solutions

Python 3
129 B | 129 chars
def f(n):
  if n < 4:
    return n

  c = 1
  s = 1
  
  while s < n:
    s *= 2
    c += 1
  
  return c

print(f(int(input())))