#C14851. Counting Unique Alphanumeric Characters
Counting Unique Alphanumeric Characters
Counting Unique Alphanumeric Characters
You are given a string S. Your task is to count the number of unique alphanumeric characters in the string, ignoring spaces and punctuation marks, and treating uppercase and lowercase letters as the same. In other words, after converting all letters to lowercase, count how many distinct characters (letters and digits) appear in the string.
Formally, let \( S \) be the input string. Remove all characters from \( S \) that are not alphanumeric (i.e., letters or digits), convert the remaining letters to lowercase, and then compute the number of distinct characters.
For example, for the input "abcABC", the output is 3.
inputFormat
The input consists of a single line containing the string \( S \). The string may include spaces, punctuation, letters, and digits.
outputFormat
Output a single integer representing the number of unique alphanumeric characters in the string after converting all letters to lowercase.
## sampleabcABC
3