Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Karatat007

Problemset: ลูกเต๋า

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-01 13:23:59

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

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    string s;
    cin >> s;
    string l1 = "";
    string l2 = "";
    string l3 = "";
    for(int i = 0;i < 3;++i){
        if(s[i] - '0' > 6 or s[i] == '0'){
            cout << "ERROR";
            return 0;
        }
    }
    for(int i = 0;i < 3;++i){
        if(s[i] == '1'){
            l1 += "   ";
            l2 += " * ";
            l3 += "   ";
        }
        if(s[i] == '2'){
            l1 += "   ";
            l2 += "* *";
            l3 += "   ";
        }
         if(s[i] == '3'){
            l1 += " * "; 
            l2 += " * ";
            l3 += " * ";
        }
         if(s[i] == '4'){
            l1 += "* *"; 
            l2 += "   ";
            l3 += "* *";
        }
         if(s[i] == '5'){
            l1 += "* *"; 
            l2 += " * ";
            l3 += "* *";
        }
         if(s[i] == '6'){
            l1 += "* *"; 
            l2 += "* *";
            l3 += "* *";
        }
        if(i != 2){
            l1 += "|";
            l2 += "|";
            l3 += "|";
        }
    }
    cout << l1 << '\n' << l2 << '\n'<< l3;
}