在LC上找到了类似题目,有兴趣的可以分析下哈! https://leetcode-cn.com/problems/bitwise-and-of-numbers-range/