Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Comments

Because one of the number may be 0 in that test case so take care of that while finding the number of 2's and 5's as factors for that number

problem:G... first I am finding in string s, all the possible positions where the string t can end and storing in boolean array, eg for (win???dwin,win) f=[0,0,1,0,0,1,0,0,0,1] . And then I am finding the LPS for string s. And then using this DP state :(lt=len of string t,ls =len of string s)
for(i=lt;i<ls;i++) { if(flag[i]) dp[i]=dp[ i-lt+lps[lt-1] ] + 1 ; else dp[i]=dp[i-1]; } I am getting right answer for most of the test cases...except test cases 56,60,64. Can anyone pl explain why am I getting WA for these test cases.