Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: APNICHANAN

Problemset: ลูกเต๋า

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-07 19:58:29

#include <iostream>
using namespace std;
int main()
{
    string d[6][3] = {{"   ", " * ", "   "}, {"   ", "* *", "   "}, {" * ", " * ", " * "}, {"* *", "   ", "* *"}, {"* *", " * ", "* *"}, {"* *", "* *", "* *"}};
    string n;
    cin >> n;
    for (int i = 0; i < 3; i++)
    {
        if (n[i] >= '7' || n[i] <= '0')
        {
            cout << "ERROR" << endl;
            return 0;
        }
    }

    for (int i = 0; i < 3; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            if (n[j] >= '1' && n[j] <= '6')
            {
                cout << d[n[j] - '1'][i];
                if (j != 2)
                    cout << "|";
            }
        }
        cout << endl;
    }
}