题目描述
Problem Statement
You are given a string S consisting of lowercase English letters. How many different non-empty substrings does S have?
A substring is a contiguous subsequence. For example, xxx is a substring of yxxxy but not of xxyxx.
Input
The input is given from Standard Input in the following format:
S
Output
Print the answer.
Constraints
- S is a string of length between 1 and 100, inclusive, consisting of lowercase English letters.
Sample Input 1
yay
Sample Output 1
5
S has the following five different non-empty substrings:
- a
- y
- ay
- ya
- yay
Sample Input 2
aababc
Sample Output 2
17
Sample Input 3
abracadabra
Sample Output 3
54
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
yay
样例输出
5