Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: letdown

Problemset: ลูกเต๋า

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-02 21:15:40

#include <iostream>
#include <math.h>
#include <string.h>

using namespace std;
int main() {
    string s;
    cin >> s;
    
    string anstb[] = {"   ", "   ", " * ", "* *", "* *", "* *"};
    string ansm[] = {" * ", "* *", " * ", "   ", " * ", "* *"};

    int x[3];
    
    for (int i = 0; i < s.length(); i++) {
        int n = (int)s[i] - '0';
        if (n > 6 || n < 0) {
            cout << "ERROR";
            return 0;
        }
        x[i] = n-1;
    }

    cout << anstb[x[0]] << "|" << anstb[x[1]] << "|" << anstb[x[2]] << endl;
    cout << ansm[x[0]] << "|" << ansm[x[1]] << "|" << ansm[x[2]] << endl;
    cout << anstb[x[0]] << "|" << anstb[x[1]] << "|" << anstb[x[2]] << endl;
}