#P8690. [蓝桥杯 2019 国 B] 填空问题

[蓝桥杯 2019 国 B] 填空问题

Problem Description

Task A\mathrm{A}: Square Sequence.

Problem Description.

Xiaoming wants to find two positive integers XX and YY such that:

  • 2019<X<Y2019<X<Y.

  • 201922019^{2}, X2X^{2}, and Y2Y^{2} form an arithmetic progression.

Among all possible solutions, find the minimum value of X+YX+Y.

Answer Submission.

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

Task B\mathrm{B}: Prime Decomposition.

Problem Description.

Decompose 20192019 into a sum of several pairwise distinct prime numbers. How many different methods are there?

Note that different orders are considered the same method. For example, 2+2017=20192+2017=2019 and 2017+2=20192017+2=2019 are considered the same method.

Answer Submission.

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

Task C\mathrm{C}: Splicing.

Problem Description.

Xiaoming wants to cut a piece of wood into two parts and then splice them into a right angle.

As shown in the figure below, he divides the middle part into n×nn \times n small squares. He marks whether each small square belongs to the left side or the right side. Then he cuts the wood along the boundary line between the two sides, rotates the right part upward, and splices them together.

Each small square must belong to exactly one of the left or right side, and the squares on the same side must be connected. When splicing, the spliced part must remain inside the original big square.

For a 7×77 \times 7 grid of small squares, how many legal ways are there to partition the squares?

Answer Submission.

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

Task D: Evaluation.

Problem Description.

After learning about divisors, Xiaoming becomes curious about them. He finds that for any given positive integer tt, one can always find an integer that has exactly tt divisors. Xiaoming is very interested in the smallest number that has tt divisors, and he defines it as StS_{t}.

For example, S1=1S_{1}=1, S2=2S_{2}=2, S3=4S_{3}=4, S4=6S_{4}=6, \cdots.

Now Xiaoming wants to know: when t=100t=100, what is StS_{t}? That is, what is S100S_{100}?

Answer Submission.

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

Task E: Path Counting.

Problem Description.

Starting from the top-left corner of a 5×55 \times 5 grid matrix, walk along the edges of the grid. How many routes satisfy the following conditions?

  • The total length does not exceed 1212.

  • Finally return to the top-left corner.

  • The route does not self-intersect.

  • The route does not go outside the 5×55 \times 5 grid matrix.

As shown in the figure below, ABC\mathrm{ABC} are three legal routes. Note that B\mathrm{B} and C\mathrm{C} are considered different routes because their directions are different.

Answer Submission.

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

Input Format

Input an uppercase letter indicating which task it is.

Output Format

According to the input task letter, output the answer for the corresponding task.

Hint

Answer template, for reference.

#include<iostream>
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 题的答案
        "The answer of task E", // 双引号中替换为 E 题的答案
    };
    char T;
    cin >> T;
    cout << ans[T - 'A'] << endl;
    return 0;
}

Translated by ChatGPT 5