0分求调闭关
查看原帖
0分求调闭关
1806495
lijinze093013楼主2025/8/3 17:12
#include<bits/stdc++.h>

using namespace std;

int main() {
  
    string m[5][5] = {
        { 
            ".....",
            ".***.",
            ".***.",
            ".***.",
            "....."
        },
        { 
            "****.",
            "****.",
            "****.",
            "****.",
            "****."
        },
        { 
            ".....",
            "****.",
            ".....",
            ".****",
            "....."
        },
        {  
            ".....",
            "****.",
            ".....",
            "****.",
            "....."
        }
    };

    string n;
    cin >> n;  

    string a=0,b=0,c=0,d=0,e=0;

    for (int i = 0; i < n.size(); i++) {
        int num = n[i] - '0'; 
        a += m[num][0];
        b += m[num][1];
        c += m[num][2];
        d += m[num][3];
        e += m[num][4];
    }


    cout << a << endl;
    cout << b << endl;
    cout << c << endl;
    cout << d << endl;
    cout << e << endl;

    return 0;
}
2025/8/3 17:12
加载中...