PROGRAMMING:Substring score
For a string s, we define the score f (s) of s as the number of characters that appear exactly once in S. For example, f ("ABA") = 1, f ("ABC") = 3, f ("AAA") = 0.
Now, given a string s [0... N-1] (length n), please calculate the sum of F (s [I... J]) for all non empty substrings s [I... J] (0 ≤ I ≤ J < n) of S.
Substring F value:
```
For example, for the string ABC, all its non empty substrings and corresponding function values are:
Substring function value
a 1
ab 2
aba 1
abab 0
ababc 1
b 1
ba 2
bab 1
babc 2
a 1
ab 2
abc 3
b 1
bc 2
c 1
So the answer is 21
```
####Input format
The input line contains a string s consisting of lowercase English letters (A-Z)( No more than 100 characters)
####Output format
Output an integer to represent the answer.
####Sample input
```in
ababc
```
####Sample output
```out
twenty-one
```
####Tips
This topic is selected from the Blue Bridge Cup competition, when selected, the original input data scale is reduced to less than 100 characters< br>
answer:If there is no answer, please comment
Now, given a string s [0... N-1] (length n), please calculate the sum of F (s [I... J]) for all non empty substrings s [I... J] (0 ≤ I ≤ J < n) of S.
Substring F value:
```
For example, for the string ABC, all its non empty substrings and corresponding function values are:
Substring function value
a 1
ab 2
aba 1
abab 0
ababc 1
b 1
ba 2
bab 1
babc 2
a 1
ab 2
abc 3
b 1
bc 2
c 1
So the answer is 21
```
####Input format
The input line contains a string s consisting of lowercase English letters (A-Z)( No more than 100 characters)
####Output format
Output an integer to represent the answer.
####Sample input
```in
ababc
```
####Sample output
```out
twenty-one
```
####Tips
This topic is selected from the Blue Bridge Cup competition, when selected, the original input data scale is reduced to less than 100 characters< br>
answer:If there is no answer, please comment