#C8863. Counting Unique Digits

    ID: 52892 Type: Default 1000ms 256MiB

Counting Unique Digits

Counting Unique Digits

You are given a series of strings, each representing an integer. Your task is to count the number of unique digits in each integer. The input terminates when the string "END" is encountered. For every input integer, output the count of unique digits.

For example, if the input is:

12345
67890
11122
END

Then the output should be:

5
5
2

Note: The integers may include leading zeros, and you must consider each character as a digit. Use the formula \(result = |\{digit: digit \in number\}|\) to compute the number of distinct digits.

inputFormat

The input consists of several lines. Each line contains one string representing an integer. The input is terminated by a line containing the string "END" which should not be processed.

Input is provided via standard input (stdin).

outputFormat

For each integer in the input (except "END"), output a single line with the number of unique digits found in that integer. Output should be written to standard output (stdout).

## sample
12345
67890
11122
END
5

5 2

</p>