#P11000. [蓝桥杯 2024 省 Python B] 数字串个数

    ID: 12406 远端评测题 1000ms 512MiB 尝试: 0 已通过: 0 显示难度普及− 上传者: 标签>2024容斥原理蓝桥杯省赛

[蓝桥杯 2024 省 Python B] 数字串个数

Problem Description

Xiao Lan wants to construct a digit string of length 1000010000 with the following requirements:

  1. Xiao Lan does not like the digit 00, so the digit string must not contain 00.

  2. Xiao Lan likes the digits 33 and 77, so the digit string must contain both 33 and 77.

How many digit strings satisfy the requirements? This number can be very large; you only need to output the result modulo 109+710^9 + 7.

Output Format

Output one integer in one line, representing the answer.

Hint

Translated by ChatGPT 5