Text cubes by Dom

import sys
import io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
input = sys.stdin.readline
def debug(*x, **y): print('---', *x, file=sys.stderr, **y)
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(map(int, input().split()))
def ti(): return tuple(map(int, input().split()))
def ss(): return input().split()
def ls(): return list(input()[:-1])

def solve(a: int):
    wid = 4 * a
    edge = '\xe2\x96\x88' + '\xe2\x94\x80' * wid + '\xe2\x96\x88'
    eds1 = '\xe2\x95\xb1' + ' ' * wid + '\xe2\x95\xb1'
    eds2 = '\xe2\x94\x82' + ' ' * wid + '\xe2\x94\x82'
    
    lines = [' ' * (a + 1) + edge]
    for i in range(a):
        lines.append(' ' * (a - i) + eds1 + ' ' * i + '\xe2\x94\x82')
    lines.append(edge + ' ' * a + '\xe2\x94\x82')
    for i in range(a - 1):
        lines.append(eds2 + ' ' * a + '\xe2\x94\x82')
    lines.append(eds2 + ' ' * a + '\xe2\x96\x88')
    for i in range(a):
        lines.append(eds2 + ' ' * (a - 1 - i) + '\xe2\x95\xb1')
    lines.append(edge)
    for l in lines: print(l)
    print()
    

for i in range(1, 8):
    solve(i)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page