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
- 프로그래머스 파이썬
- 금융문자분석경진대회
- github
- programmers
- ubuntu
- Git
- 캐치카페
- 백준
- 파이썬
- leetcode
- 프로그래머스
- dacon
- 편스토랑 우승상품
- 자연어처리
- Baekjoon
- Real or Not? NLP with Disaster Tweets
- 맥북
- ChatGPT
- 우분투
- 코로나19
- 더현대서울 맛집
- 데이콘
- 편스토랑
- AI 경진대회
- PYTHON
- hackerrank
- Docker
- Kaggle
- SW Expert Academy
- gs25
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
반응형