← All problemsSign in

Edith and Strange Market

Edith goes to a strange market where the customers need to follow some strange rules. The market has $n$ different items numbered from $1$ $to$ $n$ and with the cost of the $i$-th item as $A_i$ pounds. If Edith buys $k$ items with index as $y_1,y_2,……y_k$ then the cost of item $a_j$ will be $A_{y_j}+x_j*k$ for 1<=j<=k. This means the cost of that item is index multiplied by the factor added with

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