CF475A.Bayan Bus

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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.

The event coordinator has a list of kk 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 kk participants. Your task is to draw the figure representing occupied seats.

输入格式

The only line of input contains integer kk , (0<=k<=34)(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.

The event coordinator has a list of kk 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 kk 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.#.#.#.#.#.|.|)
    +------------------------+
    
首页