Submission

Status:

----------

Subtask/Task Score:

0/100

Score: 0

User: mister_o_hater_no1

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-06 23:34:04

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

    string pattern[6][3]= {
        {"    ", " *  ", "    "}, //1
        {" *  ", "    ", " *  "}, //2
        {"*   ", " *  ", "  * "}, //3
        {"* * ", "    ", "* * "}, //4
        {"* * ", " *  ", "* * "}, //5
        {"* * ", "* * ", "* * "}  //6
    };

    int main() {
        int n;cin>> n;
        int order[3]= {n/ 100, (n% 100)/ 10, n% 10};
        cout<< order[0]<< order[1]<< order[2]<< "\n";
        for(int i= 0; i< 3; ++i) {
            for(int j= 0; j< 3; ++j) {
                if(order[j]> 6 || order[j]< 1) {
                    if(i== 2) cout<< "___ ";
                    else cout<< "    ";
                    continue;
                }
                cout<< pattern[order[j]- 1][i];
            }
            cout<< "\n";
        }

        return 0;
    }