2025/03/16 썸네일형 리스트형 [Leetcode/파이썬]67. Add Binary Add BinaryGiven two binary strings a and b, return their sum as a binary string. Example 1:Input: a = "11", b = "1"Output: "100"Example 2:Input: a = "1010", b = "1011"Output: "10101" Constraints:1 4a and b consist only of '0' or '1' characters.Each string does not contain leading zeros except for the zero itself.class Solution: def addBinary(self, a: str, b: str) -> str: decimal_a = de.. 더보기 [Leetcode/파이썬]244.Basic Calculator Basic CalculatorGiven a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result of the evaluation.Note: You are not allowed to use any built-in function which evaluates strings as mathematical expressions, such as eval(). Example 1:Input: s = "1 + 1"Output: 2Example 2:Input: s = " 2-1 + 2 "Output: 3Example 3:Input: s = "(1+(4+5+2)-3)+(6+8)"Out.. 더보기 이전 1 다음