Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: sakuragichan

Problemset: ลูกเต๋า

Language: cpp

Time: 0.002 second

Submitted On: 2026-09-05 22:34:19

#include <iostream>
using namespace std;

int main() {
    string s;
    cin >> s;
    if (s[0] < '1' || s[0] > '6' || s[1] < '1' || s[1] > '6' || s[2] < '1' || s[2] > '6'){
        printf("ERROR");
        return 0;
    }
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            if (j == 1) {
                cout << "|";
                if (i == 0) {
                    if (s[j] == '1' || s[j] == '2') {
                        cout << "   ";
                    }
                    else if (s[j] == '3') {
                        cout << " * ";
                    }
                    else {
                        cout << "* *";
                    }
                }
                else if (i == 1) {
                    if (s[j] == '1' || s[j] == '3' || s[j] == '5') {
                        cout << " * ";
                    }
                    else if (s[j] == '2' || s[j] == '6') {
                        cout << "* *";
                    }
                    else {
                        cout << "   ";
                    }
                }
                else {
                    if (s[j] == '1' || s[j] == '2') {
                        cout << "   ";
                    }
                    else if (s[j] == '4' || s[j] == '5' || s[j] == '6') {
                        cout << "* *";
                    }
                    else {
                        cout << " * ";
                    }
                }
                cout << "|";
            }
            else {
                if (i == 0) {
                    if (s[j] == '1' || s[j] == '2') {
                        cout << "   ";
                    }
                    else if (s[j] == '3') {
                        cout << " * ";
                    }
                    else {
                        cout << "* *";
                    }
                }
                else if (i == 1) {
                    if (s[j] == '1' || s[j] == '3' || s[j] == '5') {
                        cout << " * ";
                    }
                    else if (s[j] == '2' || s[j] == '6') {
                        cout << "* *";
                    }
                    else {
                        cout << "   ";
                    }
                }
                else {
                    if (s[j] == '1' || s[j] == '2') {
                        cout << "   ";
                    }
                    else if (s[j] == '4' || s[j] == '5' || s[j] == '6') {
                        cout << "* *";
                    }
                    else {
                        cout << " * ";
                    }
                }
            }
        }
        cout << endl;
    }
    return 0;
}