Python求助,全错但是又不知道错哪里

P5730 【深基5.例10】显示屏

sean_code @ 2022-06-20 12:58:29

n = int(input())
number = input().strip()
print(number)
k = 0
a = [['XXX'], ['..X'], ['X.X'],['X..']]
num = [[0,2,2,2,0], [1,1,1,1,1], [0,1,0,3,0], [0,1,0,1,0], [2,2,0,1,1], [0,3,0,1,0], [0,3,0,2,0], [0,1,1,1,1], [0,2,0,2,0], [0,2,0,1,0]]
for i in range(0, 5):
    for j in number:
        k += 1
        x = num[int(j)][i]
        if k == n:
            print(a[x][0])
            k = 0
        else:
            print(a[x][0], end='.')

by sean_code @ 2022-07-05 21:00:57

@sean_coder 哈哈哈哈哈,太有缘了,肖恩代码和肖恩码农


by SEAN2022NAES @ 2022-08-10 18:49:16

呵呵呵


上一页 |