return number distinct nonempty substring text write concatenation string ie write string example 1input text abcabcabcOutput 3explanation the 3 substring abcabc bcabca cabcabExample 2input text leetcodeleetcodeoutput 2explanation the 2 substring ee leetcodeleetcode Constraints1 textlength 2000text lowercase english letter