P10385 [Lanqiao Cup 2024 NOI Qualifier A] Art and Basketball

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 $8$-digit number in the format `YYYYMMDD`. Then he maps these $8$ digits to Chinese numerals and calculates the total number of strokes of these Chinese characters. If the total number of strokes exceeds $50$, he goes to practice basketball; if the total number of strokes is not more than $50$, he goes to practice calligraphy. For example, on January $1$, $2024$, the date can be written as the $8$-digit number $20240101$, which becomes the Chinese numerals “二零二四零一零一”. The total number of strokes is $2 + 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| | -----------: | -----------: | -----------: | -----------: | |零 |$13$|五 |$4$| |一 |$1$|六 |$4$| |二 |$2$|七 |$2$| |三 |$3$|八 |$2$| |四 |$5$|九 |$2$| Now, please help Xiao Lan count how many days he practices basketball during the period from January $1$, $2000$ to April $13$, $2024$ (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.

Explanation/Hint

Translated by ChatGPT 5