← All problemsSign in

Chef vs Bharat

CodeChefRating 1866Open on judge ↗

Chef and his friend Bharat have decided to play the game "The Chefora Spell". In the game, a positive integer $N$ (in decimal system) is considered a "Chefora" if the number of digits $d$ is **odd** and it satisfies the equation $$N = \sum_{i=0}^{d-1} N_i \cdot 10^i,$$ where $N_i$ is the $i$-th digit of $N$ from the left in $0$-based indexing. Let $A_i$ denote the $i$-th **smallest** Chefora nu

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