#abc328b. B - 11/11
B - 11/11
Score : points
问题描述
AtCoder 王国使用一种年份包含 个月的日历。第 个月 有 天,从第 个月的第 天到第 个月的第 天。
在 AtCoder 的一年中有多少天的日期是“重复数字”?
这里,第 个月的第 天 被认为具有重复数字日期,当且仅当 和 在十进制表示中所有数字都相同。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
AtCoder Kingdom uses a calendar whose year has months. Month has days, from day of month to day of month .
How many days in a year of AtCoder have "repdigits" dates?
Here, day of month is said to have a repdigit date if and only if all digits in the decimal notations of and are the same.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
12
31 29 31 30 31 30 31 31 30 31 30 31
Sample Output 1
13
In AtCoder Kingdom, the days that have repdigit dates are January , January , February , February , March , April , May , June , July , August , September , November , and November , for a total of days.
Sample Input 2
10
10 1 2 3 4 5 6 7 8 100
Sample Output 2
1
In AtCoder Kingdom, only January has a repdigit date.
Sample Input 3
30
73 8 55 26 97 48 37 47 35 55 5 17 62 2 60 23 99 73 34 75 7 46 82 84 29 41 32 31 52 32
Sample Output 3
15
update @ 2024/3/10 01:52:24