Cake

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Challenge

Given an input n,

- print an ASCII art cake n layers tall,
- viewed from the side,
- with two candles on top,
- using box drawing characters.
- First layer is thinner than the others.
- Refer to the examples below.
- Example output

>> cake(1)
╭─╨─╨─╮
└─────┘

>> cake(2)
╭─╨─╨─╮
╭─┴─────┴─╮
│ │
└─────────┘

>> cake(3)
╭─╨─╨─╮
╭─┴─────┴─╮
│ │
╭─┴─────────┴─╮
│ │
└─────────────┘

>> cake(4)
╭─╨─╨─╮
╭─┴─────┴─╮
│ │
╭─┴─────────┴─╮
│ │
╭─┴─────────────┴─╮
│ │
└─────────────────┘
...and so on.

Options

rejudge feature is enabled

now post-mortem time, all source codes will be revealed

Sample input:_

1

Sample output:

╭─╨─╨─╮
└─────┘

Sample input:_

2

Sample output:

  ╭─╨─╨─╮
╭─┴─────┴─╮
│         │
└─────────┘

Sample input:_

3

Sample output:

    ╭─╨─╨─╮
  ╭─┴─────┴─╮
  │         │
╭─┴─────────┴─╮
│             │
└─────────────┘

Ranking

Ruby2 _

RankUserSizeTimeDateStatistics
1Jacob14620.20312016/09/22 09:01:14132B / ?B / ?B

Perl _

RankUserSizeTimeDateStatistics
1rsFalse3060.03952016/10/09 04:50:23135B / 37B / 91B

Python _

RankUserSizeTimeDateStatistics
1Sait20001720.09162016/09/26 22:24:3842B / 52B / 66B

Python3 _

RankUserSizeTimeDateStatistics
1Sait20001940.17282016/09/26 22:24:4142B / 65B / 75B

C _

RankUserSizeTimeDateStatistics
1julien_c2870.03222016/10/01 02:45:5442B / 117B / 124B

gs2 _

RankUserSizeTimeDateStatistics
1whio3480.23712016/10/01 01:58:01294B / 3B / 1B
2whio960.25582016/10/11 23:56:0569B / 13B / 13B

Language Ranking_

RankLangUserSizeScore
1gs2whio9610000
2PythonSait20001725581
3Python3Sait20001944948
4Cjulien_c2873344
5PerlrsFalse3063137
6Ruby2Jacob1462656

return top