求助!第四个点WA

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

Hongwx @ 2021-04-18 00:48:15

只有第四个点WA,哪位大佬帮忙看下 万分感谢!

#include<bits/stdc++.h>
using namespace std;

string 
A[10][5]={"XXX","X.X","X.X","X.X","X.X",
           "..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"};

int _len;
string s;

int main()
{
    cin>>_len>>s;
    for(int i=0;i<5;i++)
    {
        for(int j=0;j<_len;j++)
        {
            if(j!=_len-1) cout<<A[int(s[j]-'0')][i]<<'.';
            else cout<<A[int(s[j]-'0')][i];
        } 
        cout<<endl;
    }
    return 0;
}

by riker__moon @ 2021-07-07 20:41:52

我也


|