Submission

Status:

-P-P-xx-PP

Subtask/Task Score:

40/100

Score: 40

User: tha_smith

Problemset: ลูกเต๋า

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-02 21:37:36

#include <iostream>
#include <string>
using namespace std;

int main() {
    string dice[6][3] = {
        {
            "   ",
            " * ",
            "   ",
        },
        
        {
            "   ",
            "* *",
            "   ",
        },
        
        {
            " * ",
            " * ",
            " * ",
        },
        
        {
            "* *",
            "   ",
            "* *",
        },
        
        {
            "* *",
            " * ",
            "* *",
        },
        
        {
            "* *",
            "* *",
            "* *",
        },
    };
    int n;
    cin >> n;
    int a = (n/100)-1;
    int b = ((n%100)/10)-1;
    int c = (n%10)-1;
    
    if(!((a<=6 && a<=1) || (b<=6 && b<=1) ||(c<=6 && c<=1))) {
    	cout << "ERROR";
	}
	else {
        cout << dice[a][0] << "|" << dice[b][0] << "|" << dice[c][0] << endl;
        cout << dice[a][1] << "|" << dice[b][1] << "|" << dice[c][1] << endl;
        cout << dice[a][2] << "|" << dice[b][2] << "|" << dice[c][2] << endl;
}
}