Codeforces Round #253 (Div. 2) A. Anton and Letters
2014-06-24 15:13
435 查看
A. Anton and Letters
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
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.
Input
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.
Output
Print a single number — the number of distinct letters in Anton's set.
Sample test(s)
input
output
input
output
input
output
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
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.
Input
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.
Output
Print a single number — the number of distinct letters in Anton's set.
Sample test(s)
input
{a, b, c}
output
3
input
{b, a, b, a}
output
2
input
{}
output
0
相关文章推荐
- Codeforces Round #253 (Div. 2)A. Anton and Letters
- Codeforces Round #253 (Div. 2) A. Anton and Letters
- Codeforces Round #253 (Div. 2) A. Anton and Letters
- Codeforces Round #253 (Div. 2)A. Anton and Letters
- Codeforces Round #379 (Div. 2) E. Anton and Tree 树的直径
- codeforces round 404 div2 D Anton and School - 2 组合数学
- Codeforces Round #253 Div2 D.Andrey and Problem 概率+贪心
- 【Codeforces Round 324 (Div 2)E】【贪心 构造】Anton and Ira 全排列交换 最小距离成本
- Codeforces Round #329 (Div. 2)B. Anton and Lines
- Codeforces Round #253 (Div. 1) A Borya and Hanabi
- Codeforces Round #324 (Div. 2) E. Anton and Ira(贪心)
- Codeforces Round #379 (Div. 2)-D. Anton and Chess
- Codeforces Round #253 (Div. 2) C Borya and Hanabi (思维+bitmask)
- Codeforces Round #253 (Div. 2)——Borya and Hanabi
- Codeforces Round #379 (Div. 2) F. Anton and School
- Codeforces Round #324 (Div. 2) E. Anton and Ira 贪心
- Codeforces Round #379 (Div. 2) D. Anton and Chess 模拟
- Codeforces Round #253 (Div. 1) A. Borya and Hanabi 暴力
- Codeforces Round #379 (Div. 2) C. Anton and Making Potions 枚举+二分
- Codeforces Round #379 (Div. 2) E. Anton and Tree