본문 바로가기
python-algorithm

[백준] 11966

by 무적김두칠 2020. 12. 29.

1
2
3
4
5
6
7
8
9
import sys
tmp=[]
for i in range(31):
    tmp.append(2**i)
n=int(sys.stdin.readline())
cnt=0
for _ in range(31):
    if n== tmp[_]:cnt=1print(cnt); break
if cnt==0 :print(cnt)
cs
반응형

'python-algorithm' 카테고리의 다른 글

[백준] 13118  (0) 2020.12.29
[백준] 12756  (0) 2020.12.29
[백준] 11908  (0) 2020.12.29
[백준] 11320  (0) 2020.12.29
[백준] 11312  (0) 2020.12.29

댓글