Count Good Numbers
Medium
Counting & Combinatorics
A digit string of length n is good if digits at even indices (0-based) are even and digits at odd indices are prime (2, 3, 5 or 7). Print the number of good strings of length n modulo 1,000,000,007.
Constraints
1 <= n <= 10^15
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.