#P8680. [蓝桥杯 2019 省 B] 特别数的和
[蓝桥杯 2019 省 B] 特别数的和
Description
Xiaoming is very interested in numbers whose digits contain , , , or (excluding leading ). From to , such numbers include , , , through , , and , for a total of numbers, and their sum is .
Given , find the sum of all such numbers from to .
Input Format
Input one line containing an integer .
Output Format
Output one line containing an integer, which is the sum of the numbers that satisfy the condition.
40
574
Hint
For of the test cases, .
For of the test cases, .
For of the test cases, .
For all test cases, .
Lanqiao Cup 2019 Provincial Contest B Group, Problem F.
Translated by ChatGPT 5
京公网安备 11011102002149号