L1-015 跟奥巴马一起画方块 python

python 实现

s=input()
a=int(s.split(" ")[0])
b=str(s.split(" ")[1])

row=0
if float(a/2)-int(a/2)>=0.5:
    row=int(a/2)+1
else:
    row=int(a/2)

for i in range(row):
    for j in range(a):
        print(b,end="")
    print()

 

posted @ 2024-07-03 18:38  豆豆是只乖狗狗  阅读(2)  评论(0编辑  收藏  举报