Problem 42386. Faint Receipt

Created by goc3 in Community

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

60.53% Correct | 39.47% Incorrect
Last solution submitted on Nov 19, 2018

Problem Comments

Solution Comments

Recent Solvers11

Suggested Problems

More from this Author161