#C9373. Unique Consecutive Digit Pairs

    ID: 53459 Type: Default 1000ms 256MiB

Unique Consecutive Digit Pairs

Unique Consecutive Digit Pairs

Given a string consisting of digits, your task is to determine the number of unique pairs of adjacent digits in each test message. A pair is defined as two consecutive digits in the string. For instance, if the input string is 1234, the pairs are 12, 23, and 34, so the output should be 3.

Input Format: The first line contains a single integer T denoting the number of test cases. Each of the subsequent T lines contains a string of digits.

Output Format: For each test case, print one integer on a new line indicating the count of distinct consecutive digit pairs in the string.

inputFormat

The input begins with a single integer T on the first line, representing the number of test cases. Following that, there are T lines, each containing a string S composed exclusively of digit characters.

outputFormat

For each test case, output a single integer on a new line which is the number of unique consecutive digit pairs found in the provided string.

## sample
1
1234
3

</p>