Please enter your email address or userHandle.
Given a Binary string and a number k. our task is to find the Longest continuous sequence of '0' after repeating Given string K time.
Input: the First line of input contains an integer T i.e number of a test case. each test case contains a number K and a Binary String.
print an integer i.e Longest continuous sequence of 0
1<= T <= 100
1<= S <= 10^5
1 <= K <= 10^5
testcase 1 : After repeating given string 3 time, string := 100001100001100001 , now LCS : 4
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Login to access your submissions.
Please choose 'ReadOnlyMode' if you needn't to 'Edit' the problem e.g. viewing OJ's solution, TestCase Files (TCFs), TimeLimit etc.