← All problemsSign in

The Rich Rice Trader

Kamal is a rice trader and has purchased N packets of rice (1c(i) (1i)age= 1. As the no of days increases cost becomes c(i)*age. Find the maximum optimal revenue that Kamal could earn by selling these packets. Input Line one contains a single integer, N For the Rest of lines LINE i+1 contains the value of packet of rice c(i) Output The maximum revenue Kamal can achieve by selling the pa

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