#P8713. [蓝桥杯 2020 省 A2] 填空问题

[蓝桥杯 2020 省 A2] 填空问题

Problem Description

Task A: Making House Numbers

[Problem Description]

Xiao Lan wants to make house number plates for the residents of a street.

There are 20202020 households on this street, and the house numbers are numbered from 11 to 20202020.

Xiao Lan’s method is to first make the digit characters 00 to 99, and then paste the needed characters onto each plate. For example, for house number 10171017, the characters 1, 0, 1, 7 need to be pasted in order. That is, it needs 11 character 0, 22 characters 1, and 11 character 7.

Question: To make all house number plates from 11 to 20202020, how many digit characters 2 are needed in total?

[Answer Submission]

This is a fill-in-the-blank question. You only need to compute the result and submit it. The result is an integer. When submitting, only fill in this integer; any extra content will not be scored.

Task B: Reduced Fractions

[Problem Description]

If the greatest common divisor of the numerator and denominator of a fraction is 11, then this fraction is called a reduced fraction.

For example, 34,52,18,71\frac{3}{4},\frac{5}{2},\frac{1}{8},\frac{7}{1} are all reduced fractions.

Question: How many reduced fractions are there such that both the numerator and denominator are integers between 11 and 20202020 (including 11 and 20202020)?

[Answer Submission]

This is a fill-in-the-blank question. You only need to compute the result and submit it. The result is an integer. When submitting, only fill in this integer; any extra content will not be scored.

Task C: Snake-like Filling

[Problem Description]

As shown in the figure below, Xiao Ming fills an infinite matrix in a “snake-like” pattern with positive integers starting from 11.

$\begin{array}{cccccc}1 & 2 & 6 & 7 & 15 & \ldots \\ 3 & 5 & 8 & 14 & \ldots & \\ 4 & 9 & 13 & \ldots & & \\ 10 & 12 & \ldots & & & \\ 11 & \ldots & & & & \\ \ldots & & & & & \end{array}$

It is easy to see that the number in the second row and second column is 55. Please calculate what the number in the 2020-th row and 2020-th column is.

[Answer Submission]

This is a fill-in-the-blank question. You only need to compute the result and submit it. The result is an integer. When submitting, only fill in this integer; any extra content will not be scored.

Task D: Seven-segment Display

[Problem Description]

Xiao Lan wants to use a seven-segment display to represent a special kind of characters.

The figure above shows a diagram of a seven-segment display. There are 77 light-emitting diodes in the display, labeled a,b,c,d,e,f,ga,b,c,d,e,f,g.

Xiao Lan wants to choose a subset of diodes (at least one) to light up to represent a character. When designing a character, all lit diodes must be connected as one single piece.

For example, lighting b\mathrm{b} only, with all other diodes off, can represent a character.

For example, lighting c\mathrm{c} only, with all other diodes off, can represent a character. This scheme can represent a different character from the one in the previous line, even though they look similar.

For example, lighting a,b,c,d,ea,b,c,d,e and turning off f,gf,g can represent a character.

For example, lighting b,fb,f only, with all other diodes off, cannot represent a character, because the lit diodes are not connected as one piece.

Question: How many different characters can Xiao Lan represent using the seven-segment display?

[Answer Submission]

This is a fill-in-the-blank question. You only need to compute the result and submit it. The result is an integer. When submitting, only fill in this integer; any extra content will not be scored.

Task E: Plane Division

[Problem Description]

What is the maximum number of regions the plane can be divided into by 2020 circles and 2020 straight lines?

[Answer Submission]

This is a fill-in-the-blank question. You only need to compute the result and submit it. The result is an integer. When submitting, only fill in this integer; any extra content will not be scored.

Input Format

Input a capital letter, indicating which task it is.

Output Format

Output the answer corresponding to the given task letter.

Hint

An answer template is provided for reference.

#include<iostream>
using namespace std;
int main() {
    string ans [] = {
        "The answer of task A", // Replace the content in double quotes with the answer for task A
        "The answer of task B", // Replace the content in double quotes with the answer for task B
        "The answer of task C", // Replace the content in double quotes with the answer for task C
        "The answer of task D", // Replace the content in double quotes with the answer for task D
        "The answer of task E", // Replace the content in double quotes with the answer for task E
    };
    char T;
    cin >> T;
    cout << ans[T - 'A'] << endl;
    return 0;
}

Translated by ChatGPT 5