Karate Kid 2
CodeChefOpen on judge ↗
Dre is a karate student. He is preparing for a karate tournament which will take place in $N$ days. Currently, his strength is $S1$. To win the competition, he needs a minimum strength of $S2$. Each day of practice helps Dre gain strength by S3. While each day of rest decreases his strength by S4. He cannot practice continuously for more than 5 days, i.e. after 5 days of continuous practice, he
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