[ABC315B] The Middle Day
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
[ABC315B] The Middle Day
题面翻译
在 AtCoder 的国度里,一年包含 个月,分别是: 月, 月,, 月。第 个月包含 天。
保证一年中的天数是奇数,即 是奇数。
找出几月几日是一年的中间一天。
换种方式讲,令 月 日为一年的第一天,找出 月 日使得 月 日是一年的第 天。
题目描述
In the calendar of AtCoderLand, a year consists of M months: month 1, month 2, …, month M. The i-th month consists of Di days: day 1, day 2, …, day Di. Furthermore, the number of days in a year is odd, that is, D1+D2+⋯+DM is odd. Find what day of what month is the middle day of the year. In other words, let day 1 of month 1 be the first day, and find a and b such that the ((D1+D2+⋯+DM+1)/2)-th day is day b of month a.
输入格式
输入格式如下:
输出格式
输出格式如下,a月b日为答案:
样例 #1
样例输入 #1
12
31 28 31 30 31 30 31 31 30 31 30 31
样例输出 #1
7 2
样例 #2
样例输入 #2
1
1
样例输出 #2
1 1
样例 #3
样例输入 #3
6
3 1 4 1 5 9
样例输出 #3
5 3
提示
数据范围
输入都是正整数
- 是奇数
CSP-J训练赛(三)
- Status
- Done
- Rule
- IOI
- Problem
- 14
- Start at
- 2024-8-10 7:30
- End at
- 2024-8-10 12:00
- Duration
- 4.5 hour(s)
- Host
- Partic.
- 11