3D Printed Statues
InterviewTime limit2sMemory limit512 MB
With one printer that prints a statue or a new printer each day, find the fewest days to produce at least n statues.
- Level
Medium5 of 10
- Topics
- Greedy, Math, Implementation, Brute force
- Solved
- No attempts yet
Problem
You own one 3D printer and need to produce statues with it. Printing the statues one at a time takes a long time, so printing a new printer first can be faster. A newly printed printer can print statues or print yet another printer.
Every print job takes one full day. Each day you decide, for every printer you own, whether it prints a statue or prints a new printer. A printer produced on a given day is usable from the next day on, and a printer is never consumed by a job.
Find the minimum number of days needed to print at least statues.
Input
The first line contains one integer , the number of statues you need ().
Output
Print one integer on a single line, the minimum number of days needed to print at least statues.