So Many Permutations!
CodeChefOpen on judge ↗
Kalash was given a task, to find the total permutations $P$ of a $n$ digit number formed by using digits $1$ to $9$ such that sum of any $3$ consecutive digits is not odd. Since Kalash is bad at combinatorics, he asked Vidit to help him. Figure out all the answers given by him. Since the number of permutations $P$ can be large, output $P$ modulo 1000000007 ($10^9 + 7$). ### Input - First line wil
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