The length of the substring (#820) - Azerbaijan Computing Olympiad