← All problemsSign in

Gold Mining

CodeChefRating 880Open on judge ↗

Chef has decided to go to a gold mine along with $N$ of his friends (thus, total $N+1$ people including Chef go to the gold mine). The gold mine contains a total of $X$ kg of gold. Every person has the capacity of carrying up $\textbf{atmost}$ $Y$ kg of gold. Will Chef and his friends together be able to carry up all the gold from the gold mine assuming that they can go to the mine exactly once.

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