Special Number
CodeChefOpen on judge ↗
A number is called a special number if it doesn't contain 3 consecutive zeroes. You have to calculate the number of positive integers of exactly d digits that are special. Print your answer modulo 1000000007. Input First line contains integer T, the number of test cases. Next t lines contain an integer, value of d for that test case. Constraints 0 Output A single line for each test case, with
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