题目要求 Given a positive integer N, find and return the longest distance between two consecutive 1's in the binary representation of N. If there aren't two consecutive 1's, return 0. 题目分析及思路 给定一个正整数,返回该数二进制形式中连续两个1的最长间隔.若是没有连续的两个1,则返回0.可将该数转成二进制形式,得到的结果…