2024/09/122 leetcode 3280. Convert Date to Binary https://leetcode.com/problems/convert-date-to-binary/description/12345class Solution: def convertDateToBinary(self, date: str) -> str: yyyy, mm, dd = map(int, date.split("-")) return bin(yyyy)[2:]+"-"+bin(mm)[2:]+"-"+bin(dd)[2:]cspython 내장함수 bin을 통해 구현 2024. 9. 12. leetcode 1684. Count the Number of Consistent Strings https://leetcode.com/problems/count-the-number-of-consistent-strings/description/?envType=daily-question&envId=2024-09-12 12345678910class Solution: def countConsistentStrings(self, allowed: str, words: List[str]) -> int: answer = 0 allowed_set = set(list(allowed)) for word in words: word_set = set(list(word)) if word_set.issubset(allowed_set) : .. 2024. 9. 12. 이전 1 다음