Submission

Status:

P-P-PP-P-P

Subtask/Task Score:

60/100

Score: 60

User: Bestzu

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-03 13:58:22

#include <bits/stdc++.h>
#define endl '\n'
using namespace std;



int main() {
    ios::sync_with_stdio(false); cin.tie(0);

    int n; cin >> n;
    int a, b, c;
    a = n/100; b = (n%100)/10; c = n % 10;
    if(a < 1 || a > 6) a = 0;
    if(b < 1 || b > 6) b = 0;
    if(c < 1 || c > 6) c = 0;

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


    for(int i = 0; i < 3; i++) {
        cout << dice[a][i] << " " << dice[b][i] << " " << dice[c][i] << endl;
    }

    return 0;
}