P8714 [Lanqiao Cup 2020 NOI Qualifier B2] Fill-in-the-Blank Problems
Description
## Task A: House Number Plate Making
### Problem Description
Xiao Lan wants to make house number plates for the residents on a street.
There are a total of $2020$ households on this street, and the house numbers are numbered from $1$ to $2020$.
Xiao Lan’s method is to first make the digit characters $0$ to $9$, and then paste the required characters onto each plate. For example, the plate $1017$ needs to paste the characters `1`, `0`, `1`, `7` in order, which means it needs $1$ character `0`, $2$ characters `1`, and $1$ character `7`.
To make all house number plates from $1$ to $2020$, how many 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 $1$, then the fraction is called a reduced fraction.
For example, $\frac{3}{4},\frac{5}{2},\frac{1}{8},\frac{7}{1}$ are all reduced fractions.
How many reduced fractions are there such that both the numerator and the denominator are integers between $1$ and $2020$ (including $1$ and $2020$)?
### 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 using positive integers starting from $1$.
$\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 $5$. Please compute what number is in the $20$-th row and the $20$-th column of the matrix.
### 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: Running Exercise
### Problem Description
Xiao Lan exercises every day.
Normally, Xiao Lan runs $1$ kilometer per day. If a day is Monday or the first day of a month (the 1st), then to motivate himself, Xiao Lan runs $2$ kilometers. If it is both Monday and the first day of a month, Xiao Lan still runs $2$ kilometers.
Xiao Lan has been running for a long time, from Saturday, January $1$, $2000$ (inclusive) to Thursday, October $1$, $2020$ (inclusive). How many kilometers did Xiao Lan run in total during this period?
### 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: Seven-Segment Code
### 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 $7$ segments that can light up, labeled as $a,b,c,d,e,f,g$.
Xiao Lan wants to select some segments (at least one) to light up to represent a character. When designing the representation, all lit segments are required to form one connected component.
For example: if $b$ is lit and all other segments are not lit, it can represent one character.
For example: if $\mathrm{c}$ is lit and all other segments are not lit, it can represent one character. This scheme can represent a different character from the one in the previous line, even though they look quite similar.
For example: if $a,b,c,d,e$ are lit and $f,g$ are not lit, it can represent one character.
For example: if $b,f$ are lit and all other segments are not lit, then it cannot represent a character, because the lit segments are not connected.
How many different characters can Xiao Lan represent using a 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.
Input Format
Input one uppercase letter, indicating which task it is.
Output Format
According to the input task letter, output the corresponding answer.
Explanation/Hint
Answer template for reference.
```cpp
#include
using namespace std;
int main() {
string ans [] = {
"The answer of task A", // Replace the content in quotes with the answer to task A
"The answer of task B", // Replace the content in quotes with the answer to task B
"The answer of task C", // Replace the content in quotes with the answer to task C
"The answer of task D", // Replace the content in quotes with the answer to task D
"The answer of task E" // Replace the content in quotes with the answer to task E
};
char T;
cin >> T;
cout