Qm

Postage from 5 and 7 cent stamps

You have as many 5 cent and 7 cent stamps as you like.

  1. What is the largest amount of postage you cannot make exactly?
  2. How many amounts cannot be made at all?
  3. Give the general formula for two stamp values that share no common factor.
Show a hint

List the amounts from 1 upwards and see which can be made. Once you find five consecutive makeable amounts, everything above them can be made by adding 5s.

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

A hundred animals for a hundred poundsWriting 100 as a sum of consecutive numbersThe person whose age is the square root of the yearThe number equal to the sum of the cubes of its digitsThe cannonballs that make a square and a pyramid
All questions →