Love Magic
CodeChefOpen on judge ↗
This valentine day,a rose-shopkeeper prayed to god to give him some magical power such that he could earn a lot of money.God listened to him & agreed to give him LOVE-MAGIC.But God mentioned some conditions which the shop-keeper would have to follow to learn that MAGIC. CONDITIONS: 1.God will give him the ‘n’ roses to sell & the shop-keeper is’nt allow to sell any extra roses.
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