Finding Minimum
CodeChefOpen on judge ↗
You are given 'n' integers k1, k2, ...., kn and an integer 'x', which satisfy the equation x1k1 * x2k2 * ..... * xnkn = x. You are also given values a1, a2, ...., an and y1, y2, ...., yn. Your task is to find the least positive value 'v', that can be taken by the expression: a1*x1y1 + a2*x2y2 + ... + an*xnyn. Note that x1, x2, x3, ..... xn are some variables (not necessarily integers), which can o
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