Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: .n0t_gloomy.

Problemset: ลูกเต๋า

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-12 21:23:19

#include <bits/stdc++.h>
using namespace std;
int main()
{
    vector<vector<string>> v = {{"   ","   "," * ","* *","* *","* *"},
                                {" * ","* *"," * ","   "," * ","* *"},
                                {"   ","   "," * ","* *","* *","* *"}};
    string s;
    cin>>s;
    vector<int> n (s.length());
    for (int i = 0; i < s.length(); i++)
    {
        int x = s[i] - '0';
        if (x == 0 || x > 6)
        {
            cout<<"ERROR\n";
            return 0;
        }
        n[i] = x;
    }
    for (int i = 0; i < 3; i++)
    {
        for (int j = 0; j < s.length(); j++)
        {
            cout<<v[i][n[j] - 1];
            if (j != s.length() - 1) cout<<"|";
        }
        cout<<"\n";
    }
    return 0;
}