Gotta Print 'Em All

Gray has received N documents this morning and he wants to print as many of them as he can within his budget. He hasn’t actually set the printing budget yet, but he wonders how many of the N documents he can print at most if he has a certain budget.

This is a companion discussion topic for the original entry at