Editorial for COCI '13 Contest 4 #1 Nasljedstvo
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
It is possible to solve this task "mathematically", by testing out certain cases. We leave the proof of this procedure as a practice for the reader and continue to explain a simpler solution.
We use a for loop to go through all possible values of the initial number of medallions
Please note:
Comments