Šifra
InterviewTime limit1sMemory limit512 MB
Given a short word of lowercase letters and digits, count how many distinct integers appear when letters are treated as separators.
- Level
Easy3 of 10
- Topics
- String, Hash map, Implementation, Simulation
- Solved
- No attempts yet
Problem
Knight Borna is trying to decipher secret letters of his enemies. He recently came into possession of a special piece of paper that is used for the cipher. The paper contains a single word, made up of lowercase letters and digits.
The secret code is the number of distinct integers that appear in the word, when all letters are replaced with whitespace. The integers are written without leading zeroes.
Since Borna is not very good with numbers, he turned to you for help.
Input
The first line contains a word of length between 1 and 100. The word contains only lowercase letters and digits. All integers in it have at most three digits.
Output
Output the secret code.