[BOJ 7786] 합 찾기

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 128M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

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

입력 형식

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

출력 형식

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

예제 입력

24660 308357171

예제 출력

11379854844

Comments

There are no comments at the moment.