0–9; leading zeros are allowed. Positions are numbered from zero. A code is **valid** if every even position holds an even digit (0, 2, 4, 6, 8) and every odd position holds a prime digit (2, 3, 5, 7).
For example, "4382" is valid, but "5222" is not: position 0 holds the odd digit 5.
Return the number of valid codes of length length, modulo 10⁹ + 7.length=2 → 20
Position 0 takes one of 5 even digits, position 1 one of 4 primes: 5·4 = 20.
length=3 → 100
One more even position is added: 20·5 = 100.
length=1 → 5
length=2
20
Run checks the first 3 tests in your browser. Submit checks all 6 tests on the server, hidden ones included.