Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- hackerrank
- github
- programmers
- Kaggle
- Baekjoon
- 캐치카페
- 프로그래머스
- 맥북
- Real or Not? NLP with Disaster Tweets
- ubuntu
- 백준
- dacon
- 금융문자분석경진대회
- 편스토랑
- 자연어처리
- ChatGPT
- gs25
- 더현대서울 맛집
- 프로그래머스 파이썬
- SW Expert Academy
- Git
- leetcode
- AI 경진대회
- 데이콘
- Docker
- PYTHON
- 코로나19
- 우분투
- 편스토랑 우승상품
- 파이썬
Archives
- Today
- Total
목록
반응형
2020/07/12 (1)
반응형
솜씨좋은장씨
[leetCode] 231. Power of Two (Python)
Given an integer, write a function to determine if it is a power of two. Example 1: Input: 1 Output: true Explanation: 20 = 1 Example 2: Input: 16 Output: true Explanation: 24 = 16 Example 3: Input: 218 Output: false Solution class Solution: def isPowerOfTwo(self, n: int) -> bool: answer = False pow_2s = [] for i in range(50): pow_2s.append(pow(2, i)) if n in pow_2s: answer = True return answer ..
Programming/코딩 1일 1문제
2020. 7. 12. 00:38
반응형