전가산기
-
[😭 LeetCode Python] 371. Sum of Two IntegersAlgorithm/1일 1코테 2020. 10. 27. 16:53
📌 문제 및 문제설명 371. Sum of Two Integers +, -을 이용하지 않고 합을 구하는 문제 leetcode.com/problems/sum-of-two-integers/ Sum of Two Integers - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 📌 풀이 # 전가산기를 이용한 풀이 def getSum(self, a: int, b: int) -> int: MASK = 0xFFFFFFFF #보수용 mask INT_MAX = 0x7FFFFFF..