#K95787. Count Distinct Days in Timestamps

    ID: 38941 Type: Default 1000ms 256MiB

Count Distinct Days in Timestamps

Count Distinct Days in Timestamps

Given a list of timestamps in the format \(YYYY\text{-}MM\text{-}DD\ HH:MM:SS\), count the number of distinct days on which events occurred.

If multiple events occur on the same day, they should be counted only once. This problem tests your ability to parse date strings and use a set to filter out duplicate days.

inputFormat

The first line contains an integer n representing the number of timestamps. Each of the following n lines contains a timestamp in the format \(YYYY\text{-}MM\text{-}DD\ HH:MM:SS\).

outputFormat

Output a single integer that indicates the number of distinct days on which events occurred.

## sample
3
2023-04-15 12:34:56
2023-04-15 15:45:12
2023-04-16 08:00:00
2

</p>