Codeforces Round 1003 (Div. 4) |
---|
Finished |
Skibidus is given a string $$$s$$$ that consists of lowercase Latin letters. If $$$s$$$ contains more than $$$1$$$ letter, he can:
Skibidus must determine the minimum possible length he can achieve through any number of operations.
The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases.
The only line of each test case contains a string $$$s$$$ ($$$1 \leq |s| \leq 100$$$). It is guaranteed $$$s$$$ only contains lowercase Latin letters.
For each test case, output an integer on the new line, the minimum achievable length of $$$s$$$.
4baaskibidusccohio
1 8 1 4
In the first test case, Skibidus can:
Therefore, the answer is $$$1$$$ for the first test case.
In the second test case, he cannot perform an operation on any index. Therefore, the answer is still the length of the initial string, $$$8$$$.
Name |
---|