Problems
Substring (Easy)
Substring (Easy)
Given a string s. Count the number of its different substrings. Do not count the empty substring.
Input
One string s consisting of lowercase Latin letters. The string length is no more than 100 characters.
Output
Print the number of different substrings in s.
Input example #1
aaaa
Output example #1
4
Input example #2
abacaba
Output example #2
21