← All problemsSign in

Chef loves Pizza Chef loves halfs

CodeChefRating 1190Open on judge ↗

Chef has a unique way of cutting round pizzas. He starts by cutting the pizza in half, then into quarters, then eighths, and so on, always cutting through the center. Below is an example of cuts made by Chef in sequential order: ![](https://cdn.codechef.com/download/Contest%20images/START142/Start142_image8.jpg) Chef wants to cut pizza into $X$ slices where $X$ is always even. Your task is to

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