Largest Area
CodeChefOpen on judge ↗
Raghav was in a bookstore where he took a sheet of paper of " w " width and " h " height . He was interested in finding the largest area he can obtain such that the ratio of " h/w " (height / width) lies between 0.8 and 1.25 and one of " h " or " w " is a power of 2 .The chosen " h " and " w " will be integers and if multiple answers exist choose the one with larger height . Input One single lin
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