Permutations and Combinations
CodeChefOpen on judge ↗
Permutations and Combinations Alice and Bob start playing a new game. Alice writes 2 numbers - N and K. She asks Bob to find an integer which is N digits long such that the absolute difference in the adjacent digits is less than or equal to K. Bob realizes that a lot of integers satisfy this condition. Can you help Bob to find the total number of N digit integers which satisfy the condition set b
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