#K35622. Counting Ways to Split a Numeric String

    ID: 25573 Type: Default 1000ms 256MiB

Counting Ways to Split a Numeric String

Counting Ways to Split a Numeric String

Given a numeric string \(M\) consisting only of digits, the task is to determine the number of ways to split \(M\) into a sequence of integers such that their concatenation is exactly \(M\). In this particular problem, regardless of the input, there is exactly one valid way to split the string.

For instance, consider the string "112233"; the intended splitting method is unique under the constraints of the problem. The answer is always 1.

Note: The problem may appear to invite calculations, but the constraints ensure that the answer is universally 1.

inputFormat

The input is read from standard input (stdin) and is structured as follows:

  • The first line contains an integer \(T\), the number of test cases.
  • The following \(T\) lines each contain a single string \(M\) consisting only of digits (possibly empty).

outputFormat

For each test case, output a single integer on its own line to standard output (stdout), representing the number of ways to split \(M\) as specified in the problem statement. In every case, the output will always be 1.

## sample
6
123
112233
999999987654321

7
001
1

1 1 1 1 1

</p>