Give you a string, you should print how many none empty substrings it has.
Give you a string, you should print how many none empty substrings it has.
The first line is number of tests. T (1 <= T <= 10)
The second line is a string S. The length of S doesn’t exceed 1000, that is |S| <= 1000
S will only contain lower case English letters.
For each test, you should print an integer in a single line, which is the number of none empty substrings of S.
1
hello
15
Easy problem.