Submission

Status:

----------

Subtask/Task Score:

0/100

Score: 0

User: Karatat007

Problemset: ลูกเต๋า

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-01 10:32:49

#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){
            cout << "ERROR";
            break;
        }
    }
    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 += "* *|";
        }
    }   
    cout << l1 << '\n' << l2 << '\n'<< l3;
}