Chef And Weapons
CodeChefOpen on judge ↗
The chef started playing the BGMI game, Now Chef wants to find out the minimum number of bullets he needs to fire on the enemy to defeat the enemy, given the enemy’s health is ‘H’. NOTE: THERE IS ONLY A SINGLE ENEMY AND THE CHEF CAN DEFEAT THE ENEMY ONLY IF DAMAGE GIVEN BY THE CHEF IS STRICTLY GREATER THAN THE ENEMY’S HEALTH. Chef also has $N$ weapons and he knows the number of bullets present in
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start