시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 24 16 14 77.778%

문제

A보다 크거나 같고 B보다 작거나 같은 모든 수를 종이에 썼을 때, 각 숫자를 몇 번씩 쓰게 되는지 구하는 프로그램을 작성하시오.

입력

입력을 여러 개의 테스트 케이스로 이루어져 있다. 각 테스트 케이스는 한 줄로 이루어져 있고, A와 B가 주어진다. (1 ≤ A ≤ B ≤ 108)

입력의 마지막 줄에는 0이 두 개 주어진다.

출력

각 테스트 케이스마다 10개의 정수를 출력한다. 이 정수는 A부터 B까지를 종이에 썼을 때, 각 숫자를 몇 번씩 쓰게 되는지이며, 0부터 9까지 순서대로 출력한다.

예제 입력 1

1 9
12 321
5987 6123
12345678 12345679
0 0

예제 출력 1

0 1 1 1 1 1 1 1 1 1
61 169 163 83 61 61 61 61 61 61
134 58 28 24 23 36 147 24 27 47
0 2 2 2 2 2 2 2 1 1
W3sicHJvYmxlbV9pZCI6IjU2OTYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWMyMmJcdWM3OTAgXHVjMTM4XHVhZTMwIiwiZGVzY3JpcHRpb24iOiI8cD5BXHViY2Y0XHViMmU0IFx1ZDA2Y1x1YWM3MFx1YjA5OCBcdWFjMTlcdWFjZTAgQlx1YmNmNFx1YjJlNCBcdWM3OTFcdWFjNzBcdWIwOTggXHVhYzE5XHVjNzQwIFx1YmFhOFx1YjRlMCBcdWMyMThcdWI5N2MgXHVjODg1XHVjNzc0XHVjNWQwIFx1YzM3Y1x1Yzc0NCBcdWI1NGMsIFx1YWMwMSBcdWMyMmJcdWM3OTBcdWI5N2MgXHViYTg3IFx1YmM4OFx1YzUyOSBcdWM0ZjBcdWFjOGMgXHViNDE4XHViMjk0XHVjOWMwIFx1YWQ2Y1x1ZDU1OFx1YjI5NCBcdWQ1MDRcdWI4NWNcdWFkZjhcdWI3YThcdWM3NDQgXHVjNzkxXHVjMTMxXHVkNTU4XHVjMmRjXHVjNjI0LjxcL3A+X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