#abc238b. B - Pizza
B - Pizza
Score : points
问题描述
我们有一个圆形披萨。
高桥将根据以下步骤,使用长度为 的序列 来切割这个披萨。
- 首先,从中心沿正上方(12点钟方向)进行一次切割。
- 接下来,执行 次操作。第 次操作如下:
- 将披萨顺时针旋转 度。
- 然后,再次从中心沿正上方(12点钟方向)进行切割。
例如,若 ,则按照该步骤切割披萨的过程如下所示。
请找出该过程结束后最大一块披萨的中心角度数。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
We have a circular pizza.
Takahashi will cut this pizza using a sequence of length , according to the following procedure.
- First, make a cut from the center in the o'clock direction.
- Next, do operations. The -th operation is as follows.
- Rotate the pizza degrees clockwise.
- Then, make a cut from the center in the o'clock direction.
For example, if , the procedure cuts the pizza as follows.
Find the center angle of the largest pizza after the procedure.
Constraints
- All values in input are integers.
- There will be no multiple cuts at the same position.
Input
Input is given from Standard Input in the following format:
Output
Print the answer as an integer.
Sample Input 1
4
90 180 45 195
Sample Output 1
120
This input coincides with the example in the Problem Statement.
The center angle of the largest pizza is degrees.
Sample Input 2
1
1
Sample Output 2
359
Sample Input 3
10
215 137 320 339 341 41 44 18 241 149
Sample Output 3
170
update @ 2024/3/10 10:16:54