Submission

Status:

-PPP-PPPPP

Subtask/Task Score:

80/100

Score: 80

User: KurtCobain

Problemset: ลูกเต๋า

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-02 22:33:37

#include <iostream>
#include <vector>
using namespace std;

int main(){
    string n;
    cin >> n;
    string dice[6][3] = {
        {
          "   ",
          " * ",
          "   "
        },
        {
           "   ",
           "* *",
           "   "
        },
        {
           " * ",
           " * ",
           " * "
        },
        {
          "* *",
          "   ",
          "* *"
        },{
            "* *",
            " * ",
            "* *"
        },
        {
            "* *",
            "* *",
            "* *"
        }
    };
    vector<int> info = {};
    for (char c : n){
       int b = c - '0';
       if (b > 6 || b <= 0){
        cout << "ERROR";
        return 0;
       }
       info.push_back(b);
    }
    for (int u=0;u<3;u++){
      for (int x : info){
         cout << dice[x-1][u];
         if (x != info.back()) cout << "|";
      }
      cout << '\n';
    }
}