Submission

Status:

-----PP---

Subtask/Task Score:

20/100

Score: 20

User: mameeewin

Problemset: ลูกเต๋า

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-09 19:22:07

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

int main(){
  vector<vector<string>> d={
    {
      " ",
      "*",
      " "
    },
    {
      "   ",
      "* *",
      "   "
    },
    {
      "*",
      "*",
      "*"
    },
    {
      "*   *",
      "     ",
      "*   *"
    },
    {
      "*   *",
      "  *  ",
      "*   *"
    },
    {
      "*   *",
      "*   *",
      "*   *"
    } 
  };
  string s; cin >> s;
  vector<string> done(3);
  for (char c : s){
    int n=c-'0';
    if (n>6||n<1){
      cout << "ERROR";
      return 0;
    }
    for (int i=0; i<3; i++){
      done[i]+=d[n-1][i];
      done[i]+='|';
    }
  }
  for (int i=0; i<3; i++){
    done[i].pop_back();
    cout << done[i] << "\n";
  }
}