#P8789. [蓝桥杯 2022 国 B] 填空问题

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

Problem Description

Task A: 2022

Problem Description

Split 20222022 into the sum of 1010 distinct positive integers. How many different ways are there?

Note that different orders are considered the same method. For example, 2022=1000+10222022=1000+1022 and 2022=2022= 1022+10001022+1000 are considered the same method.

Answer Submission

This is a fill-in-the-blank 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: Clock

Problem Description

On a 1212-hour clock, there are a minute hand, an hour hand, and a second hand to show the time. Let the angle (in degrees) between the minute hand and the hour hand be A(0A180)A(0 \leq A \leq 180), and the angle (in degrees) between the minute hand and the second hand be BB (0B180)(0 \leq B \leq 180). At exactly ss hours ff minutes mm seconds, the condition A=2BA=2 B holds, and 0s60 \leq s \leq 6; 0f<600 \leq f<60; 0m<600 \leq m<60. Find the values of s,f,ms,f,m.

Note that the hour hand, minute hand, and second hand all rotate around the center at a constant speed.

The submission format is three integers separated by one space, representing s,f,ms,f,m. For example, 3 11 58 means 33 o'clock 1111 minutes 5858 seconds.

Answer Submission

This is a fill-in-the-blank problem. You only need to compute the result and submit it. The result of this problem is three integers separated by one space. When submitting the answer, only fill in three integers separated by one space. Any extra content will not be scored.

Input Format

The input consists of one uppercase letter, indicating which task it is.

Output Format

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

Hint

Answer template 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.
    };
    char T;
    cin >> T;
    cout << ans[T - 'A'] << endl;
    return 0;
}

Translated by ChatGPT 5