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

32315번 - Cool Phone Numbers 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 (추가 시간 없음) 1024 MB1361159883.051%

문제

Phone numbers in USA are of the form ddd-ddd-dddd, i.e., 10 digits. In general, the fewer distinct digits in a phone number, the easier it is to remember the number. As a result, phone numbers with repeating digits are more popular.

Given a phone number, determine how many distinct digits there are in the number.

입력

There is only one input line; it provides the phone number using the above format. The input starts in column 1 and ends in column 12 (10 digits and 2 hyphens).

출력

Print 1-10 (the number of distinct digits) as follows:

  • 1 – if all ten digits are the same, i.e., only one digit in the number, e.g., 888-888-8888
  • 2 – if only two different digits in the number, e.g., 757-577-7577
  • 3 – if only three different digits in the number
  • 4 – if only four different digits in the number
  • 5 – if …
  • 10 – if ten different digits in the number, e.g., 246-189-0537

제한

예제 입력 1

888-888-8888

예제 출력 1

1

예제 입력 2

757-577-7577

예제 출력 2

2

예제 입력 3

246-189-0537

예제 출력 3

10

예제 입력 4

012-987-9690

예제 출력 4

7

예제 입력 5

000-000-0000

예제 출력 5

1

힌트

출처

University > University of Central Florida > 2024 Local Programming Contest (Final Round) 2번

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

출처

대학교 대회

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

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