Logo C++ Online Judge

C++

时间限制:1 s 空间限制:512 MB
TA: 苏凯
统计

Snowflake is a classical fractal curve. It is generated starting from equilateral triangle (等边三角形) and iteratively replacing the mid one-third of an edge with the other two edges of a new equilateral triangle pointing outwards.

这里是一张需要魔法的示意图

After infinite iterations, the snowflake becomes a $1.26$ dimension geometry. These can be seen by scaling an edge of the snowflake by $3\times$:

              3x             __/\__ 
            ======>          \    / 
__/\__                 __/\__/    \__/\__

One edge becomes 4 edges. Hence the “volume” of the snowflake scales by $4$ when its side scales by $3$. This relation yields $\frac{\ln 4}{\ln 3}\approx1.26$. In comparison, the “volume” of 2D geometries, i.e. the area, scales by $9$. Check circles and squares by yourself!

Your task is to print an ASCII art of the snowflake.

Input: The input is a single integer $0\le n\le7$, indicating the number of iterations.

Output: No spaces after lines are allowed.

Example Input 1

0

Example Output 1

__
\/

Example Input

1

Example Output

__/\__
\    /
/_  _\
  \/