시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 77 35 26 60.465%

문제

n부터 m까지 숫자를 하나씩 종이에 작성할 때, 숫자 0을 몇 번 쓰는지 구하는 프로그램을 작성하시오.

입력

입력은 여러개의 테스트 케이스로 이루어져 있다. 각 테스트 케이스는 두 정수 n과 m이 공백으로 되어있으며, 한 줄로 이루어져 있다. 입력의 마지막 줄은 n값이 음수이고, 이 경우는 계산할 필요 없이 프로그램을 종료하면 된다.

출력

각 테스트 케이스에 대해서, 0을 몇 번 쓰는지 출력한다.

예제 입력 1

10 11
100 200
0 500
1234567890 2345678901
0 4294967295
-1 -1

예제 출력 1

1
22
92
987654304
3825876150
W3sicHJvYmxlbV9pZCI6IjQyNzYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiIwXHVjNzc0IFx1YmE4NyBcdWFjMWM/IiwiZGVzY3JpcHRpb24iOiI8cD5cclxuXHRuXHViZDgwXHVkMTMwIG1cdWFlNGNcdWM5YzAgXHVjMjJiXHVjNzkwXHViOTdjIFx1ZDU1OFx1YjA5OFx1YzUyOSBcdWM4ODVcdWM3NzRcdWM1ZDAgXHVjNzkxXHVjMTMxXHVkNTYwIFx1YjU0YywgXHVjMjJiXHVjNzkwIDBcdWM3NDQgXHViYTg3IFx1YmM4OCBcdWM0ZjBcdWIyOTRcdWM5YzAgXHVhZDZjXHVkNTU4XHViMjk0IFx1ZDUwNFx1Yjg1Y1x1YWRmOFx1YjdhOFx1Yzc0NCBcdWM3OTFcdWMxMzFcdWQ1NThcdWMyZGNcdWM2MjQuPFwvcD5cclxuIiwiaW5wdXQiOiI8cD5cclxuXHRcdWM3ODVcdWI4MjVcdWM3NDAgXHVjNWVjXHViN2VjXHVhYzFjXHVjNzU4IFx1ZDE0Y1x1YzJhNFx1ZDJiOCBcdWNmMDBcdWM3NzRcdWMyYTRcdWI4NWMgXHVjNzc0XHViOGU4XHVjNWI0XHVjODM4IFx1Yzc4OFx1YjJlNC4gXHVh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