← All problemsSign in

MAXIMUM AND MINIMUM

$Chef $ wants to impress $Chefina$ but it is not an easy task. One day $Chefina$ is struck on a problem and this is a golden opportunity for $Chef$ to help her and get her attention. So he approaches her. The problem is that you are given products of two integers $X$ and $Y$ as $P$, you have to find the $maximum$ and $minimum$ value of $(X + Y) / 2$. But $Chef$ is not good in problem-solvin

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