← 返回 microsoft 的题目列表Unique Length-Three Substrings
类型:online_judge
Given a string, find the number of unique substrings of length three that are contiguous.
Input Format:
A single line containing a string s representing the input string.
Output Format:
Output an integer, representing the number of unique substrings of length three.
Constraints:
1 ≤ s.length ≤ 1000
Example: Input: abcabc Output: 4
Explanation: Contiguous substrings of length three are: abc, bca, cab. There are four unique ones: abc, bca, cab.
Example
Input
abcabc