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
- 프로그래머스
- dacon
- 캐치카페
- 편스토랑
- 편스토랑 우승상품
- Kaggle
- Git
- 프로그래머스 파이썬
- gs25
- 데이콘
- AI 경진대회
- Baekjoon
- ChatGPT
- 백준
- 자연어처리
- Docker
- github
- SW Expert Academy
- programmers
- 맥북
- 파이썬
- leetcode
- 더현대서울 맛집
- hackerrank
- ubuntu
- Real or Not? NLP with Disaster Tweets
- 우분투
- 금융문자분석경진대회
- PYTHON
Archives
- Today
- Total
솜씨좋은장씨
[leetCode] 371. Sum of Two Integers (Python) 본문
728x90
반응형

Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.
Example 1:
Input: a = 1, b = 2
Output: 3
Example 2:
Input: a = -2, b = 3
Output: 1
Solution
class Solution:
def getSum(self, a: int, b: int) -> int:
answer = sum([a, b])
return answer



SOMJANG/CODINGTEST_PRACTICE
1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.
github.com
'Programming > 코딩 1일 1문제' 카테고리의 다른 글
[leetCode] 819. Most Common Word (Python) (0) | 2020.07.17 |
---|---|
[leetCode] 372. Super Pow (Python) (0) | 2020.07.15 |
[leetCode] 1. Two Sum (Python) (0) | 2020.07.13 |
[leetCode] 231. Power of Two (Python) (0) | 2020.07.12 |
[leetCode] 989. Add to Array-Form of Integer (Python) (0) | 2020.07.11 |