是我的写法有问题吗 测试点全是RE

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

Railsoap @ 2020-05-19 10:23:58

numList = [['XXX', 'X.X', 'X.X', 'X.X', 'XXX'],
           ['..X', '..X', '..X', '..X', '..X'],
           ['XXX', '..X', 'XXX', 'X..', 'XXX'],
           ['XXX', '..X', 'XXX', '..X', 'XXX'],
           ['X.X', 'X.X', 'XXX', '..X', '..X'],
           ['XXX', 'X..', 'XXX', '..X', 'XXX'],
           ['XXX', 'X..', 'XXX', 'X.X', 'XXX'],
           ['XXX', '..X', '..X', '..X', '..X'],
           ['XXX', 'X.X', 'XXX', 'X.X', 'XXX'],
           ['XXX', 'X.X', 'XXX', '..X', 'XXX']]
length = int(input())
nums = input()
output = ['', '', '', '', '']
count = 0
for num in nums:
    count = count + 1
    for index, value in enumerate(numList[int(num)]):
        if count == length:
            output[index] = output[index] + value
        else:
            output[index] = output[index] + value + '.'
print('\n'.join(str(x) for x in output))

by Chancylaser @ 2020-05-19 10:48:51

对了,这是啥语言啊


by zztqwq @ 2020-05-19 11:05:30

py3?


by KellyFrog @ 2020-05-19 11:45:53

LG主要是c艹,还有c或p,py很少,而且py写起来和c家族差很多。。。


by Railsoap @ 2020-05-20 09:40:24

@zzt_ 恩


by Railsoap @ 2020-05-20 09:40:53

@longer_name 哎。。好吧


|