Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: CA

Problemset: ลูกเต๋า (2566)

Language: cpp

Time: 0.004 second

Submitted On: 2026-09-25 10:06:04

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

string n;
const char d6[6][3][3] = {
    {
        {' ', ' ', ' '},
        {' ', '*', ' '},
        {' ', ' ', ' '}
    },
    {
        {' ', '*', ' '},
        {' ', ' ', ' '},
        {' ', '*', ' '}
    },
    {
        {'*', ' ', ' '},
        {' ', '*', ' '},
        {' ', ' ', '*'}
    },
    {
        {'*', ' ', '*'},
        {' ', ' ', ' '},
        {'*', ' ', '*'}
    },
    {
        {'*', ' ', '*'},
        {' ', '*', ' '},
        {'*', ' ', '*'}
    },
    {
        {'*', ' ', '*'},
        {'*', ' ', '*'},
        {'*', ' ', '*'}
    }
};

int main() {
    cin >> n;
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            if (n[j] - '0' > 6 || n[j] - '0' < 1) {
                if (i == 2) {
                    cout << "___ ";
                    continue;
                }
                cout << "    ";
                continue;
            }
            for (int k = 0; k < 3; k++) {
                cout << d6[n[j] - 1 - '0'][i][k];
            }
            cout << " ";
        }
        cout << '\n';
    }
    return 0;
}