
Return the lowest level whose bonus timer falls under the time a player needs.
1982. Donkey Kong never ends, it just loops, and on level 22 the bonus timer comes up at 400 instead of thousands. Mario dies before he can climb. The board cannot be finished, so the machine eats all four lives and puts up game over. That timer is worked out from the level number and kept in a single byte, and past level 21 the number stops fitting. Find the first level where it stops fitting.
kill_screen_level(500)Expected result
22For your own tracking. Tests grade your code.
kill_screen_level(501)Expected result
1kill_screen_level(0)Expected result
-1Expected files
bonus.cAllowed functions
None. Write every helper yourself.
