#P10385. [蓝桥杯 2024 省 A] 艺术与篮球

[蓝桥杯 2024 省 A] 艺术与篮球

Problem Description

Xiao Lan was born into a family that values both art and sports.
His mother is a calligrapher. She hopes Xiao Lan can inherit her artistic talent and develop good handwriting by practicing calligraphy. His father is a basketball coach. He hopes Xiao Lan can build his body through basketball and develop a passion for sports and a spirit of teamwork.

To meet his mother’s expectations and also live up to his father’s wishes, Xiao Lan decides to arrange his practice based on the total number of strokes in the date. First, he converts the date of the day into an 88-digit number in the format YYYYMMDD. Then he maps these 88 digits to Chinese numerals and calculates the total number of strokes of these Chinese characters. If the total number of strokes exceeds 5050, he goes to practice basketball; if the total number of strokes is not more than 5050, he goes to practice calligraphy.

For example, on January 11, 20242024, the date can be written as the 88-digit number 2024010120240101, which becomes the Chinese numerals “二零二四零一零一”. The total number of strokes is 2+13+2+5+13+1+13+1=502 + 13 + 2 + 5 + 13 + 1 + 13 + 1 = 50, so on that day, Xiao Lan will practice calligraphy.

Below is the stroke count table for the Chinese numerals:

Chinese character Stroke count Chinese character Stroke count
1313 44
11
22 22
33
55

Now, please help Xiao Lan count how many days he practices basketball during the period from January 11, 20002000 to April 1313, 20242024 (inclusive).

Input Format

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

Output Format

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

Hint

Translated by ChatGPT 5