P8759 [Lanqiao Cup 2021 National B] Fill-in-the-Blank Problems

Description

## Task A: Bandwidth ### Problem Description The network bandwidth at Xiao Lan's home is $200 \mathrm{Mbps}$. In theory, what is the maximum number of $\mathrm{MB}$ of content that can be downloaded from the Internet per second using Xiao Lan's network? ### Answer Submission This is a fill-in-the-blank question. You only need to calculate the result and submit it. The result of this question is an integer. When submitting the answer, only fill in this integer. Any extra content will result in no score. ## Task B: Pure Primes ### Problem Description If a positive integer has only two divisors, $1$ and itself, it is called a prime number. The first few prime numbers are: $2,3,5,7,11,13,17,19,23,29,31,37,\cdots$. If all decimal digits of a prime number are also prime numbers, we call it a pure prime. For example, $2,3,5,7,23,37$ are pure primes, while $11,13,17,19,29,31$ are not pure primes. Of course, $1,4,35$ are also not pure primes. Now, between $1$ and $20210605$, how many pure primes are there? ### Answer Submission This is a fill-in-the-blank question. You only need to calculate the result and submit it. The result of this question is an integer. When submitting the answer, only fill in this integer. Any extra content will result in no score. ## Task C: Perfect Dates ### Problem Description If, for a date, the sum of all digits in the year, month, and day is a perfect square, then it is called a perfect date. For example, for June $5$, $2021$, the sum of digits is $2+0+2+1+6+5=16$, and $16$ is a perfect square, the square of $4$. So June $5$, $2021$ is a perfect date. For example, for June $23$, $2021$, the sum of digits is $2+0+2+1+6+2+3=16$, which is also a perfect square. So June $23$, $2021$ is also a perfect date. Now, from January $1$, $2001$ to December $31$, $2021$, how many perfect dates are there in total? ### Answer Submission This is a fill-in-the-blank question. You only need to calculate the result and submit it. The result of this question is an integer. When submitting the answer, only fill in this integer. Any extra content will result in no score. ## Task D: Minimum Weight ### Problem Description For a rooted binary tree $T$, Xiao Lan defines the weight $W(T)$ of nodes in this tree as follows. The weight of an empty subtree is $0$. If a node $v$ has a left subtree $L$ and a right subtree $R$, and they have $C(L)$ and $C(R)$ nodes respectively, then $W(v)=1+2 W(L)+3 W(R)+(C(L))^{2} C(R)$. The weight of the tree is defined as the weight of the root node. Xiao Lan wants to know: for a binary tree with $2021$ nodes, what is the minimum possible weight of the tree? ### Answer Submission This is a fill-in-the-blank question. You only need to calculate the result and submit it. The result of this question is an integer. When submitting the answer, only fill in this integer. Any extra content will result in no score.

Input Format

Input one uppercase letter, indicating which task it is.

Output Format

According to the input task label, output the corresponding answer.

Explanation/Hint

An answer template is provided for reference. ```cpp #include using namespace std; int main() { string ans [] = { "The answer of task A", // 双引号中替换为 A 题的答案 "The answer of task B", // 双引号中替换为 B 题的答案 "The answer of task C", // 双引号中替换为 C 题的答案 "The answer of task D", // 双引号中替换为 D 题的答案 }; char T; cin >> T; cout