Submission

Status:

----------

Subtask/Task Score:

0/100

Score: 0

User: ThreeDee

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-25 18:28:14

#include <bits/stdc++.h>

using namespace std;

int main() {
    string n;
    string patterns[7][3] = {
        {"   ", "   ", "   "},
        {"   ", " * ", "   "},
        {"  *", " * ", "* "},
        {"* ", " * ", "  *"},
        {"* *", "   ", "* *"},
        {"* *", " * ", "* *"},
        {"* *", "* *", "* *"}
    };

    cin >> n;

    if (n.length() == 3) {
        for (int i = 0; i < 3; ++i) {
            for (int j = 0; j < 3; ++j) {
                char d = n[j];
                if (isdigit(d)) {
                    int f = d - '0';
                    if (f >= 1 && f <= 6) {
                        cout << patterns[f][i];
                    } else {
                        cout << "___";
                    }
                } else {
                    cout << "___";
                }
            }
            cout << "\n";
        }
    } else {
        cout << "_________\n";
        cout << "_________\n";
        cout << "_________\n";
    }
    return 0;
}