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 |
Tags
- 금융문자분석경진대회
- 코로나19
- leetcode
- hackerrank
- Docker
- AI 경진대회
- 프로그래머스 파이썬
- Kaggle
- 편스토랑
- 백준
- 파이썬
- github
- ChatGPT
- Baekjoon
- 캐치카페
- 프로그래머스
- gs25
- 편스토랑 우승상품
- dacon
- 맥북
- 우분투
- Real or Not? NLP with Disaster Tweets
- 데이콘
- 자연어처리
- ubuntu
- SW Expert Academy
- programmers
- 더현대서울 맛집
- PYTHON
- Git
Archives
- Today
- Total
목록
반응형
Sum of Square Numbers (1)
반응형
솜씨좋은장씨
[leetCode] 633. Sum of Square Numbers (Python)
Given a non-negative integer c, your task is to decide whether there're two integers a and b such that a2 + b2 = c. Example 1: Input: 5 Output: True Explanation: 1 * 1 + 2 * 2 = 5 Example 2: Input: 3 Output: False Solution class Solution: def judgeSquareSum(self, c): for i in range(0,int(c**0.5)+1): extra=c-pow(i, 2) if (pow(int(extra**0.5),2)) == extra: return True return False SOMJANG/CODINGTE..
Programming/코딩 1일 1문제
2020. 6. 19. 21:43
반응형