Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Pera

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-05 10:29:03

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

int main() {
    ios::sync_with_stdio(false);
    
    vector<vector<string>> dice = {
        {"   ", " * ", "   "}, 
        {" * ", "   ", " * "}, 
        {"*  ", " * ", "  *"}, 
        {"* *", "   ", "* *"}, 
        {"* *", " * ", "* *"}, 
        {"* *", "* *", "* *"},
        {"   ", "   ", "___"}
    };

    string str; cin >> str;
    for (int i = 0; i < 3; i++) {
        for (char c : str) {
            if (c - '1' < 0 || c - '1' > 6) c = '7';
            cout << dice[c - '1'][i];
            cout << ' ';
        }
        cout << '\n';
    }
}