#P7398. [COCI 2020/2021 #5] Šifra

[COCI 2020/2021 #5] Šifra

Description

Given a string of length at most 100100 that contains only lowercase letters and characters from 090 \sim 9 (the letters in the string can be treated as separators), find how many distinct numbers appear in the string.

Input Format

One line containing a string with only lowercase letters and characters from 090 \sim 9. It is guaranteed that each number has at most 33 digits.

Output Format

Output the number of distinct numbers in the string.

abc123abc2a3a1
4
borna123vitez
1
as23dkrf23smk1asd23sam9
3

Hint

Constraints

For 50%50\% of the testdata, all numbers that appear are pairwise distinct.

For 100%100\% of the testdata, the string length is between 11 and 100100.

Notes

The score for this problem follows the original COCI settings, with a full score of 5050.

This problem is translated from COCI2020-2021 CONTEST #5 T1 Šifra.

Translated by ChatGPT 5