40分小白求助,Python3
查看原帖
40分小白求助,Python3
432580
也为别人而流楼主2021/12/16 14:41

发帖之前看了讨论区说的题面的f的问题,将逻辑修改成了f非0即为实心还是不能AC。

row, col, sym, mode = input().split()
row = int(row)
col = int(col)
for i in range(row):
    print(sym, end="")
    for j in range(1, col - 1):
        if i == 0 or i == row - 1:
            print(sym, end='')
        else:
            print("%s" % (' ' if mode == '0' else sym), end='')
    print(sym)
2021/12/16 14:41
加载中...