Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: vachirasawin

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

Language: cpp

Time: 0.003 second

Submitted On: 2026-03-13 15:06:21

// grader-chan
// c1_bkk66_3.cpp | c1_bkk66_3

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

int n;

string dice[7][3] = {
    {"   ", "   ", "___"},
    {"   ", " * ", "   "},
    {" * ", "   ", " * "},
    {"*  ", " * ", "  *"},
    {"* *", "   ", "* *"},
    {"* *", " * ", "* *"},
    {"* *", "* *", "* *"}
};

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    cin >> n;
    string num = to_string(n);

    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            if (num[j] == '1') {
                cout << dice[1][i];
            } else if (num[j] == '2') {
                cout << dice[2][i];
            } else if (num[j] == '3') {
                cout << dice[3][i];
            } else if (num[j] == '4') {
                cout << dice[4][i];
            } else if (num[j] == '5') {
                cout << dice[5][i];
            } else if (num[j] == '6') {
                cout << dice[6][i];
            } else {
                cout << dice[0][i];
            }

            cout << " ";
        }

        cout << endl;
    }

    return 0;
}