← All problemsSign in

The Silk trade

There is a country far away from anyone's notice. Silk is considered extremely valuable there. There is a trader there who sells silk. He does not sell silk cloth, he rather sells silk threads, as he finds it more profitable. The Government there has its own trade rules. The government has prescribed fixed prices (in Singapore dollars) set for different lengths of silk thread. The price of i units

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start