Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Newton4566

Problemset: ลูกเต๋า

Language: cpp

Time: 0.003 second

Submitted On: 2026-09-21 13:25:06

#include <iostream>
using namespace std;

int main() {
    int input;
    cin >> input;

    if (input / 100 > 6 || input / 10 % 10 > 6 || input % 10 > 6) {
        cout << "ERROR" << endl;
        return 0;
    }

    string one[6] = {"   ", "   ", " * ", "* *", "* *", "* *"};
    string two[6] = {" * ", "* *", " * ", "   ", " * ", "* *"};
    string three[6] = {"   ", "   ", " * ", "* *", "* *", "* *"};

    cout << one[(input / 100) - 1] << '|' << one[((input / 10) % 10) - 1] << '|' << one[(input % 10) - 1] << endl;
    cout << two[(input / 100) - 1] << '|' << two[((input / 10) % 10) - 1] << '|' << two[(input % 10) - 1] << endl;
    cout << three[(input / 100) - 1] << '|' << three[((input / 10) % 10) - 1] << '|' << one[(input % 10) - 1] << endl;

    return 0;
}