Distinct substrings count
Your task
Given a string s of lowercase letters (0 <= len(s) <= 10^4), return the number of DISTINCT non-empty substrings of s. Duplicates are counted once. The answer fits in a 64-bit integer.
Examples
count_distinct_substrings(s: str) -> intExample 1
Input
count_distinct_substrings("abc")Output
6