Theofanis string s_1 s_2 dots s_n character c he want character stre equal c minimum number operationsin operation choose number x 1 le x le n position divisible x replace s_i c find minimum number operation require character equal c xs use operation