Problem 42386. Faint Receipt

Suppose you have a receipt with some numbers that have been smudged or didn't print. In particular, the total amount is missing the first and last digits. The purchase did not involve tax (or you're looking at the subtotal before tax), only one item was purchased, and the quantity of the item is known. Use this data to determine what the total amount was, assuming that the unit cost does not contain a fraction of a cent. The partially known total will be provided as a string with an X for the unknown first and last digits.
In some cases, there will be multiple possible answers. We're going to assume the best and return the lowest possible total. The second missing digit can range from 0 to 9, though the first missing digit is the leading number, and, therefore, cannot be zero.

Solution Stats

55.56% Correct | 44.44% Incorrect
Last Solution submitted on Feb 12, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers17

Suggested Problems

More from this Author139

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!