結果 : count substrings hackerrank solution