Leeee1111 / testjudge-asia

0 stars 0 forks source link

B0309 字元菱形 #25

Open Leeee1111 opened 1 month ago

Leeee1111 commented 1 month ago
a=str(input())
for i in range(1,4):
    for _ in range(3-i):
        print(" ",end="")
    for _ in range(i):
        print(a,end="")
    for _ in range(i-1):
        print(a,end="")
    print()
for i in range(2, 0, -1):
    for _ in range(3-i):
        print(" ", end="")
    for _ in range(2*i-1):
        print(a, end="")
    print()