SP705 SUBST1 - New Distinct Substrings

Description

Given a string, we need to find the total number of its distinct substrings.

Input Format

T- number of test cases. T

Output Format

For each test case output one number saying the number of distinct substrings.