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

6212번 - Dream Counting 다국어

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

문제

Bessie was daydreaming one day as she drifted between wakefulness and that delicious drowsiness that we all feel when we are tired. For a moment, she counted sheep as couldn't quite sleep. Bessie's mind is razor sharp and visualizes the numbers as she counts. She started noticing the digits and wondered: how many instances of each digit appear in a counting sequence?

Write a program to answer this question. Given two integers M and N (1 <= M <= N <= 2,000,000,000 and N-M <= 500,000), how many of occurrences of each digit appear?

Consider the sequence 129..137: 129, 130, 131, 132, 133, 134, 135, 136, 137. Count the digits to find:

 1x0 1x5
 10x1 1x6
 2x2 1x7
 9x3 0x8
 1x4 1x9

입력

  • Line 1: Two space-separated integers: M and N

출력

  • Line 1: Ten space-separated integers that are the counts of the number of each digit (0..9) that appears while counting through the sequence.

제한

예제 입력 1

129 137

예제 출력 1

1 10 2 9 1 1 1 1 0 1

힌트

출처

Olympiad > USA Computing Olympiad > 2006-2007 Season > USACO December 2006 Contest > Bronze 3번

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

출처

대학교 대회

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

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