Questions


September 2023 2 6 Report
The megastore offers a deal that states any product whose price is a golden price O would be given to them for free. A number G is said to have a guiden price if the difference betwe the highest digit and the sum of its digits equals the highest digit

Examples include 352 ((3+5+2)-5=5), 3003, and 32812 ((3+2+8+1+2)-8=8).

Narendra visits the megastore and purchases (Y, X+1) products with each of them in the price range of (X,Y) (X and Y are included in the product lot) and one product from each price value. He wants to know how much money he would have saved by picking products with the golden price.

Considering that you are a friend of Narendra, help Narendra with a program to figure out how much money he saved overall by buying Y-X+1 products between X and Y price range and every product price is different

Read the input from STDIN and write the output to STDOUT. You should not write arbitrary strings while reading the input and while printing as these contribute to the standard output

Input1

10 00

Output1

495


Input2

11 33

Output 2

66

Answers & Comments


Add an Answer


Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Helpful Social

Copyright © 2024 EHUB.TIPS team's - All rights reserved.