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
- gs25
- 프로그래머스
- 파이썬
- dacon
- ubuntu
- 프로그래머스 파이썬
- 금융문자분석경진대회
- Kaggle
- programmers
- Real or Not? NLP with Disaster Tweets
- 더현대서울 맛집
- 캐치카페
- ChatGPT
- Docker
- SW Expert Academy
- Git
- Baekjoon
- 우분투
- 데이콘
- hackerrank
- 자연어처리
- 코로나19
- 백준
- 편스토랑 우승상품
- leetcode
- 맥북
- 편스토랑
- AI 경진대회
- github
- PYTHON
Archives
- Today
- Total
목록
반응형
Pow(x n ) (1)
반응형
솜씨좋은장씨
[leetCode] 50. Pow(x, n) (Python)
Implement pow(x, n), which calculates x raised to the power n (x^n). Example 1: Input: 2.00000, 10 Output: 1024.00000 Example 2: Input: 2.10000, 3 Output: 9.26100 Example 3: Input: 2.00000, -2 Output: 0.25000 Explanation: 2-2 = 1/22 = 1/4 = 0.25 Note: -100.0 float: my_pow_num = pow(x, n) if my_pow_num > (pow(2, 31) - 1): my_pow_num = pow(2, 31) -1 elif my_pow_num < (pow(2, 31)) * (-1): my_pow_nu..
Programming/코딩 1일 1문제
2020. 6. 2. 17:42
반응형