Py3为什么全RE?

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

愤鸟先飞 @ 2020-09-07 09:02:47

本地运行和在线IDE都没出错,就交给评测机以后出的问题,都不懂该怎么调

#!/usr/bin/python3
L=[[],[],[],[],[]]
N0=[['XXX '],['X.X '],['X.X '],['X.X '],['XXX ']]
N1=[['..X '],['..X '],['..X '],['..X '],['..X ']]
N2=[['XXX '],['..X '],['XXX '],['X.. '],['XXX ']]
N3=[['XXX '],['..X '],['XXX '],['..X '],['XXX ']]
N4=[['X.X '],['X.X '],['XXX '],['..X '],['..X ']]
N5=[['XXX '],['X.. '],['XXX '],['..X '],['XXX ']]
N6=[['XXX '],['X.. '],['XXX '],['X.X '],['XXX ']]
N7=[['XXX '],['..X '],['..X '],['..X '],['..X ']]
N8=[['XXX '],['X.X '],['XXX '],['X.X '],['XXX ']]
N9=[['XXX '],['X.X '],['XXX '],['..X '],['XXX ']]

def fun(n):
    if n==0:
        m=4
        while m>=0:
            L[m].append(N0[m])
            m-=1
    elif n==1:
        m=4
        while m>=0:
            L[m].append(N1[m])
            m-=1
    elif n==2:
        m=4
        while m>=0:
            L[m].append(N2[m])
            m-=1
    elif n==3:
        m=4
        while m>=0:
            L[m].append(N3[m])
            m-=1
    elif n==4:
        m=4
        while m>=0:
            L[m].append(N4[m])
            m-=1
    elif n==5:
        m=4
        while m>=0:
            L[m].append(N5[m])
            m-=1
    elif n==6:
        m=4
        while m>=0:
            L[m].append(N6[m])
            m-=1
    elif n==7:
        m=4
        while m>=0:
            L[m].append(N7[m])
            m-=1
    elif n==8:
        m=4
        while m>=0:
            L[m].append(N8[m])
            m-=1
    elif n==9:
        m=4
        while m>=0:
            L[m].append(N9[m])
            m-=1

n=int(input())
N=input()
for m in N:
    fun(int(m))
x=0
while x<5:
    for y in L[x]:
        for z in y:
            print(z,end='')
    print('')
    x+=1

by tuxiaobei @ 2020-09-07 09:09:16

@愤鸟先飞 你把数据下载下来运行可以通过?


by tuxiaobei @ 2020-09-07 09:12:46

@愤鸟先飞 不知道RE,但你这个肯定会WA的,注意每个数字之间都有一列间隔,间隔是用 . 表示,具体见样例


by 愤鸟先飞 @ 2020-09-07 09:50:57

@tuxiaobei 可以


by 长大吴彦祖 @ 2020-09-07 14:48:44

@愤鸟先飞 请问解决了嘛,我我也全是RE


by alex101 @ 2020-09-20 21:49:48

@长大吴彦祖 我也是re,请问解决了吗


|