Function to find the periodic string with minimum period
static void findPeriodicString ( string S ) { int l = 2 * S . Length ; int count = 0 ; for ( int i = 0 ; i < S . Length ; i ++ ) { if ( S [ i ] == '1' ) count ++ ; }