LeetCode #201

Bitwise AND of Numbers Range

1개의 풀이 · Python

문제 원문 보기 ↗

SOLUTION INFO

Python · main.py

main.py
class Solution:
    def rangeBitwiseAnd(self, left: int, right: int) -> int:
        ret = 0
        while left < right:
            left >>= 1
            right >>= 1
            ret += 1
        return left << ret

SOLUTION DESCRIPTION

풀이 설명

등록된 풀이 설명이 없습니다.