Background
Today (or Yesterday) is (or was) 11/23 or Fibonacci day! What better way to celebrate than to make a Fibonacci cake?
Examples
3
ii
i_i_ii_i_i
</>
8
ii
ii
ii
ii
ii
ii
ii
ii
i ii i
i ii i
i ii i
i ii i
i ii i
i i ii i i
i i ii i i
i i ii i i
i i i ii i i i
i i i ii i i i
i i i i ii i i i i
i i i i i ii i i i i i
i_i_i_i_i_i_i_ii_i_i_i_i_i_i_i
Challenge
You're not really making a cake, just the candles because I can't ascii-art a cake
To make the cake you must first get the first n
Fibonacci numbers sorted ascending. The candle (i
)'s height is determined by value of the current Fibonacci number. The candles are separated by an underscore (_
).
The cake should be symmetrical. So the candles should then be flipped and concatenated.
Example Construction
Input: 6
First 6 Fibonacci Numbers: 1, 1, 2, 3, 5, 8
Candle heights:
i
i
i
i i
i i
i i i
i i i i
i i i i i i
-----------
1 1 2 3 5 8
Output would be:
ii
ii
ii
i ii i
i ii i
i i ii i i
i i i ii i i i
i_i_i_i_i_ii_i_i_i_i_i
Reference Fibonacci Numbers
For reference, here are the first 15 Fibonacci numbers. In this challenge, you'll be starting at 1
.
1,1,2,3,5,8,13,21,34,55,89,144,233,377,610