Logo
(追記) (追記ここまで)

25840번 - Sharing Birthdays 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB41135731886.649%

문제

In a room of 23 people, there is a 50-50 chance of at least two people having the same birthday; in a room of 75, there is a 99.9% chance of at least two people having the same birthday.

Given a set of birthdays (each in the form of mm/dd), determine how many different birthdays there are, i.e., duplicates should count as one.

입력

The first input line contains an integer, n (1 ≤ n ≤ 50), indicating the number of birthdays. Each of the next n input lines contains a birthday in the form of mm/dd. Assume mm will be between 01 and 12 (inclusive) and dd will be between 01 and 31 (inclusive). Also assume that these values will be valid, e.g., there will not be 02/31 in the input. (Consider 02/28 and 02/29 as different days even though people born on 02/29 usually celebrate their birthdays on 02/28.)

출력

Print how many different birthdays there are.

제한

예제 입력 1

3
07/09
10/14
07/09

예제 출력 1

2

예제 입력 2

7
10/20
11/22
10/20
10/22
11/20
10/20
11/22

예제 출력 2

4

힌트

출처

University > University of Central Florida > 2020 Local Programming Contest (Round 1B) 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /