#K4391. Count Unique Normalized Mobile Numbers

    ID: 27414 Type: Default 1000ms 256MiB

Count Unique Normalized Mobile Numbers

Count Unique Normalized Mobile Numbers

Given a list of mobile phone numbers, your task is to normalize each number by removing any non-numeric characters and then count the number of unique phone numbers obtained after normalization.

The normalization process involves removing characters such as dashes, spaces, parentheses, etc. Mathematically, if you have a phone number string \(s\), the normalized version is:

[ \text{normalize}(s) = { c \in s \mid c \text{ is a digit} } ]

You will be provided with an integer \(n\) representing the number of phone numbers, followed by \(n\) lines each containing a phone number. Your task is to output the count of unique normalized phone numbers.

inputFormat

The first line of input contains a single integer \(n\) (\(1 \le n \le 10^5\)) indicating the number of phone numbers. The following \(n\) lines each contain a phone number as a string. The phone numbers may include dashes (-), spaces, parentheses, and other non-digit characters.

outputFormat

Output a single integer, the number of unique normalized mobile numbers.

## sample
5
123-456-7890
123 456 7890
1234567890
(123) 456-7890
9876543210
2