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
- ubuntu
- 자연어처리
- github
- 데이콘
- 코로나19
- 캐치카페
- 프로그래머스 파이썬
- PYTHON
- 맥북
- ChatGPT
- 금융문자분석경진대회
- 백준
- Kaggle
- 더현대서울 맛집
- SW Expert Academy
- AI 경진대회
- programmers
- dacon
- 프로그래머스
- hackerrank
- leetcode
- Baekjoon
- gs25
- Real or Not? NLP with Disaster Tweets
- 편스토랑
- 파이썬
- 우분투
- Docker
- Git
- 편스토랑 우승상품
Archives
- Today
- Total
목록
반응형
Power of Three (1)
반응형
솜씨좋은장씨
[leetCode] 326. Power of Three (Python)
Given an integer, write a function to determine if it is a power of three. Example 1: Input: 27 Output: true Example 2: Input: 0 Output: false Example 3: Input: 9 Output: true Example 4: Input: 45 Output: false Follow up: Could you do it without using any loop / recursion? Solution class Solution: def isPowerOfThree(self, n: int) -> bool: return n > 0 and pow(3, 31, n) == 0 SOMJANG/CODINGTEST_PR..
Programming/코딩 1일 1문제
2020. 6. 7. 22:27
반응형