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

7116번 - Series 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB43252255.000%

문제

All the natural numbers from n to m (inclusively) are written in a row without separating symbols, thus creating a series of decimal digits.

For example, if n=98 and m=102, this series is 9899100101102.

Then all the digits are sorted in a non-increasing order - first the greatest digits, then the next greatest, etc.

For the example above this sorted series is 9998211110000.

For the values of natural numbers n,m and k given in the input your task is to compute, which digit will be in the k-th position of the sorted series.

입력

The values of three natural numbers n (0 < n < 109), m (0 < m < 109, m ≥ n) and k (0 < k < 109) are input from the keyboard.

출력

The digit at the k-th position of the sorted series must be output on the screen. If length of the series is less than k, a single word “NAV” must be output on the screen.

제한

예제 입력 1

98 102 4

예제 출력 1

8

예제 입력 2

9999 9999 5

예제 출력 2

NAV

힌트

출처

Olympiad > Latvian olympiad in informatics > 11th Latvian olympiad in informatics > Stage III (Country) 1번

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

출처

대학교 대회

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

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