#C5538. Unique Characters Count
Unique Characters Count
Unique Characters Count
You are given a string S
. Your task is to calculate the number of unique characters present in the string. In other words, you need to compute \(\left|\{ c : c \in S \}\right|\), which is the size of the set of characters from S
.
Example:
If S = "hello"
, the unique characters are {h, e, l, o}, so the answer is 4.
inputFormat
Input consists of a single line containing the string (S). The string may include letters, digits, and various symbols. It is guaranteed that the input line is non-empty.
outputFormat
Output a single integer denoting the number of unique characters in the string S
.## sample
hello
4