CF443A.Anton and Letters
入门
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Recently, Anton has found a set. The set consists of small English letters. Anton carefully wrote out all the letters from the set in one line, separated by a comma. He also added an opening curved bracket at the beginning of the line and a closing curved bracket at the end of the line.
Unfortunately, from time to time Anton would forget writing some letter and write it again. He asks you to count the total number of distinct letters in his set.
最近,安东发现了一个集合。该集合由小写英文字母组成。安东仔细地将集合中的所有字母按一行写出,并用逗号分隔。他还在行首添加了一个左花括号,在行尾添加了一个右花括号。
不幸的是,安东有时会忘记写某个字母,而重复写出另一个字母。他请你计算他的集合中不同字母的总数。
输入格式
The first and the single line contains the set of letters. The length of the line doesn't exceed 1000. It is guaranteed that the line starts from an opening curved bracket and ends with a closing curved bracket. Between them, small English letters are listed, separated by a comma. Each comma is followed by a space.
第一行且唯一一行包含一组字母。该行长度不超过 1000。保证该行以左圆括号 ( 开头,以右圆括号 ) 结尾。括号之间列出了若干小写英文字母,字母之间用逗号分隔。每个逗号后跟一个空格。
输出格式
Print a single number — the number of distinct letters in Anton's set.
输出一个数字——安东的集合中不同字母的数量。
输入输出样例
输入#1
{a, b, c}输出#1
3
输入#2
{b, a, b, a}输出#2
2
输入#3
{}输出#3
0
输入解题思路,AI测评打分。不知道怎么写?