← All problemsSign in

Book Game with Chef

CodeChefRating 2429Open on judge ↗

Statement Chef gives you a book with N pages. The pages are numbered from 1 to N. Chef randomly selects a Secret Digit from 0 to 9. Now he asks you to open one page of the book without looking at the book. You win the game if that page number contains the Secret Digit. For example if the Secret Digit is 8, then 8, 80, 1238213, 98 are all winning pages and 9, 90, 1239123 are loosing pages. What

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