codeforces: problem Some Sums soultion in c++.
U. Some Sums
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Given three numbers N, A, B. Print the summation of the numbers between 1 and N whose sum of digits is between A and B inclusive.
Input
Only one line containing three numbers N, A, B (1 ≤ N ≤ 104, 1 ≤ A ≤ B ≤ 36).
Output
Print a single line contains the answer according to the required above.
Examples
No comments:
Post a Comment