시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 32 13 13 86.667%

문제

두 자연수 l과 u가 주어졌을 때, l보다 크거나 같고, u보다 작거나 같은 모든 자연수의 자리수의 합을 구하는 프로그램을 작성하시오.

입력

첫째 줄에 l과 u이 주어진다. (0 ≤ l ≤ u ≤ 2,000,000,000)

출력

l과 r을 포함하여 그 사이에 있는 모든 수의 자리수의 합을 출력한다.

예제 입력 1

24660 308357171

예제 출력 1

11379854844
W3sicHJvYmxlbV9pZCI6Ijc3ODYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWQ1NjkgXHVjYzNlXHVhZTMwIiwiZGVzY3JpcHRpb24iOiI8cD5cdWI0NTAgXHVjNzkwXHVjNWYwXHVjMjE4IGxcdWFjZmMgdVx1YWMwMCBcdWM4ZmNcdWM1YjRcdWM4NGNcdWM3NDQgXHViNTRjLCBsXHViY2Y0XHViMmU0IFx1ZDA2Y1x1YWM3MFx1YjA5OCBcdWFjMTlcdWFjZTAsIHVcdWJjZjRcdWIyZTQgXHVjNzkxXHVhYzcwXHViMDk4IFx1YWMxOVx1Yzc0MCBcdWJhYThcdWI0ZTAgXHVjNzkwXHVjNWYwXHVjMjE4XHVjNzU4IFx1Yzc5MFx1YjlhY1x1YzIxOFx1Yzc1OCBcdWQ1NjlcdWM3NDQgXHVhZDZjXHVkNTU4XHViMjk0IFx1ZDUwNFx1Yjg1Y1x1YWRmOFx1YjdhOFx1Yzc0NCBcdWM3OTFcdWMxMzFcdWQ1NThcdWMyZGNcdWM2MjQuPFwvcD5cclxuIiwiaW5wdXQiOiI8cD5cdWNjYWJcdWM5ZjggXHVjOTA0XHVjNWQwIGxcdWFjZmMgdVx1Yzc3NCBcdWM4ZmNcdWM1YjRcdWM5YzRcdWIyZTQuICgwICZsZTsgbCAmbGU7IHUgJmxlOyAyLDAwMCwwMDAsMDAwKTxcL3A+XHJcbiIsIm91dHB1dCI6IjxwPmxcdWFjZmMgclx1Yzc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