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

25841번 - Digit Count 다국어

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

문제

There are many ways to count the frequencies of letters but can they be applied to digits?

Given a range (in the form of two integers) and a digit (0-9), you are to count how many occurrences of the digit there are in the given range.

입력

There is only one input line; it provides the range and the digit. Each integer for the range will be between 1000 and 9999 (inclusive) and the digit will be between 0 and 9 (inclusive). Assume the first integer for the range is not greater than the second integer for the range.

출력

Print the number of occurrences of the digit in the given range.

제한

예제 입력 1

1000 1000 0

예제 출력 1

3

예제 입력 2

1000 1001 0

예제 출력 2

5

예제 입력 3

8996 9004 5

예제 출력 3

0

예제 입력 4

9800 9900 5

예제 출력 4

20

힌트

출처

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

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

출처

대학교 대회

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

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