Challenge Information

Title : Consecutive 1's
Difficulty : Easy
Solutions : 9
Maximum Score : 50
Completed by You: No
Description :

There is an integer of a number given. You have to find the length of the longest sequential 1's in its binary sequence.

Write a function solve that have the following parameter(s):
1.) a = an integer

Example
Input:
a = 22
Output:
2

Explanation
The binary representation of 22 is 10110, in which 11 is the longest consecutive set bits of length 2.

Example
Input:
a = 55
Output:
3

Explanation
The binary representation of 55 is 110111, in which 11 is the longest consecutive set bits of length 3.

Constraints

Judocode