测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A9586. Bayan Bus

编程题 普及/提高-

题目描述

The final round of Bayan Programming Contest will be held in Tehran, and the participants will be carried around with a yellow bus. The bus has 34 passenger seats: 4 seats in the last row and 3 seats in remaining rows.

![](/uploads/acgo/image/48b1fc3afd63ee84_97264e59cb7c.jpeg)The event coordinator has a list of $k$ participants who should be picked up at the airport. When a participant gets on the bus, he will sit in the last row with an empty seat. If there is more than one empty seat in that row, he will take the leftmost one.

In order to keep track of the people who are on the bus, the event coordinator needs a figure showing which seats are going to be taken by $k$ participants. Your task is to draw the figure representing occupied seats.

输入格式

The only line of input contains integer $k$ , $(0<=k<=34)$ , denoting the number of participants.

输出格式

The final round of Bayan Programming Contest will be held in Tehran, and the participants will be carried around with a yellow bus. The bus has 34 passenger seats: 4 seats in the last row and 3 seats in remaining rows.

![](/uploads/acgo/image/3f20a5fe9b56a2e4_b47bca1a8587.jpeg)The event coordinator has a list of $k$ participants who should be picked up at the airport. When a participant gets on the bus, he will sit in the last row with an empty seat. If there is more than one empty seat in that row, he will take the leftmost one.

In order to keep track of the people who are on the bus, the event coordinator needs a figure showing which seats are going to be taken by $k$ participants. Your task is to draw the figure representing occupied seats.

输入输出样例

输入 #1
9
输出 #1
+------------------------+
|O.O.O.#.#.#.#.#.#.#.#.|D|)
|O.O.O.#.#.#.#.#.#.#.#.|.|
|O.......................|
|O.O.#.#.#.#.#.#.#.#.#.|.|)
+------------------------+
输入 #2
20
输出 #2
+------------------------+
|O.O.O.O.O.O.O.#.#.#.#.|D|)
|O.O.O.O.O.O.#.#.#.#.#.|.|
|O.......................|
|O.O.O.O.O.O.#.#.#.#.#.|.|)
+------------------------+
上一题 去做题 下一题