Good Numbers
CodeChefOpen on judge ↗
An n digit number, N, is called good if: None of its digits is a 0, If you write the digits as d_1, d_2, d_3, ..., d_n then d_i is a multiple of ((i - 1) modulo 3) + 1 and N is a multiple of 2 ^ a and b. How many good n digit numbers are there for a given n, a and b? Input Single line containing 3 space separated integers - n, a and b.. Output Output a single integer, the answer modulo
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