Available question text
Count the number of length-n digit strings where digits at even indices must be even (5 choices) and digits at odd indices must be prime (4 choices); the total is 5^{ceil(n/2)} * 4^{floor(n/2)} modulo 10^9+7. Because n can be up to 10^15, compute powers with fast modular exponentiation.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1922. Count Good Numbers
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source