Sponsored
Use these hints if you're stuck. Try solving on your own first.
Calculate the number of good strings with length less or equal to some constant x.
Apply dynamic programming using the group size of consecutive zeros and ones.
Solve with full IDE support and test cases