Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Sunson

Problemset: ลูกเต๋า

Language: cpp

Time: 0.004 second

Submitted On: 2026-09-08 23:56:32

#include<bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false); cin.tie(NULL);
    string n;
    cin >> n;

    if (n.length() != 3) {
        cout << "ERROR";
        return 0;
    }
    
    for(char c : n){
        if(c<'1' || c>'6'){
            cout << "ERROR";
            return 0;
        }
    }
    string d[6][3] = {
        {"   "," * ","   "},
        {"   ","* *","   "},
        {" * "," * "," * "},
        {"* *","   ","* *"},
        {"* *"," * ","* *"},
        {"* *","* *","* *"}
    };
    for(int i=0;i<3;i++){
        for(int j=0;j<3;j++){
            int x = n[j]-'1';

            if(j>0){
                cout << '|';
            }
            cout << d[x][i];
        }cout << '\n';
    }
}