Skip to content

Commit 2305b41

Browse files
committed
[BOJ] #27961. 고양이는 많을 수록 좋다 / 브론즈1 / 1시간 24분 / 실패
1 parent 59806cf commit 2305b41

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import sys
2+
input = sys.stdin.readline
3+
4+
n = int(input()) # 목표 고양이 수
5+
6+
if n == 0:
7+
print(0)
8+
exit(0)
9+
10+
madoka = 1 # 마도카를 위한 최소의 행동 횟수
11+
cat = 1 # 현재 고양이 수
12+
13+
while cat < n:
14+
cat *= 2
15+
madoka += 1
16+
17+
print(madoka)

0 commit comments

Comments
 (0)