#P10984. [蓝桥杯 2023 国 Python A/Java A] 残缺的数字
[蓝桥杯 2023 国 Python A/Java A] 残缺的数字
Problem Description
A seven-segment display is a common electronic component used to display digits. It consists of seven light segments:

The figure above shows, in order, how the digits are displayed using a seven-segment display. A yellow segment means it is lit, and a gray segment means it is off. Based on the on/off states of the segments, we can use a state code (a -bit binary number) to represent a seven-segment display. Let the state be when a segment is lit, and when a segment is off. If we label the seven segments in the order , then the state codes for digits are:
| Digit | State Code | Digit | State Code |
|---|---|---|---|
Xiao Lan has a favorite number of length . Each digit is shown using one seven-segment display (each digit can only be , and leading zeros are allowed). Due to a segment failure, some segments that should be lit are instead off.
For example, for a number of length , when the state codes of the two seven-segment displays are (higher digit) and (lower digit), the original number could have been , , , or , for a total of possible values.
The state codes for the seven-segment displays are:
, , , , , , , , , , , , , , , , , .
Each of the above is the state code for one seven-segment display (given from the highest digit to the lowest digit). Please determine how many possible values Xiao Lan’s favorite number could be.
Output Format
Output one integer in one line, representing the answer.
Hint
Translated by ChatGPT 5