Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: onlyme910

Problemset: ลูกเต๋า

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-08 20:01:23

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

int main(){
    string s;cin >> s;
    string dicet[6] = {"   ","   "," * ","* *","* *","* *"};
    string dicem[6] = {" * ","* *"," * ","   "," * ","* *"};
    string diceb[6] = {"   ","   "," * ","* *","* *","* *"};
    int sl = s.length();
    for(int i = 0;i<sl;i++){
        if(s[i] -'0' > 6){
            cout << "ERROR";
            return 0;
        }
    }
    for(int i =0;i<sl;i++){
        cout << dicet[s[i]-'0'-1];
        if(i != sl-1)cout << "|";
    }
    cout << endl;
    for(int i =0;i<sl;i++){
        cout << dicem[s[i]-'0'-1];
        if(i != sl-1)cout << "|";
    }
    cout << endl;
    for(int i =0;i<sl;i++){
        cout << diceb[s[i]-'0'-1];
        if(i != sl-1)cout << "|";
    }
    cout << endl;
}