← All problemsSign in

Chef and Functions

CodeChefRating 2141Open on judge ↗

Chef has just been introduced to functions and he has been experimenting a lot with the different kinds of functions. In the process, the chef has come up with an interesting problem for you. Chef defines a function root(i, x) which gives the greatest integer less than or equal to the i th root of a positive integer x . For example, root(2, 4) is 2 and root(2, 2) is 1 . Now the chef defines anot

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