Question: C Programming Language Lili has a string with length N consisting of'1' and '0'. She wants to know which is longer, the '1's or '0's.
C Programming Language

Lili has a string with length N consisting of'1' and '0'. She wants to know which is longer, the '1's or '0's. She will only count the consecutive '1" or 0 Format Input First line will consist of an integer T, the number of test cases For each test case, first line will be an integer N In the next line, there will be string S Format Output On the first line of each test case print "Case #X: Then on the same line print 1 and then the length of longest consecutive '1' if 1 is longer or print '0' and the length of the longest consecutive '0 if O is longer. Constraints 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
