LUCKY NUMBERS
CodeChefOpen on judge ↗
Chef Neel is very superstitious. He considers only those number lucky for him in which the difference between two consecutive digits is exactly one. Chef is curious to know how many lucky numbers containing exactly N digits exist .Therefore Chef gives his apprentice a task i.e. Given an integer N, find the number of all N digits lucky numbers. Input The first line of input contains a single inte
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