Submission

Status:

PPPP---PPP

Subtask/Task Score:

70/100

Score: 70

User: spammer_destroyer

Problemset: ลูกเต๋า (2566)

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-12 12:50:36

//c1_bkk66_3
#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<string> face(int n) {
  vector<string> str(3);
  switch(n) {
case 1:
  str[0]="   ";
  str[1]=" * ";
  str[2]="   ";return str;
case 2:
  str[0]=" * ";
  str[1]="   ";
  str[2]=" * ";return str;
case 3:
  str[0]="*  ";
  str[1]=" * ";
  str[2]="  *";return str;
case 4:
  str[0]="* *";
  str[1]="   ";
  str[2]="* *";return str;
case 5:
  str[0]="* *";
  str[1]=" * ";
  str[2]="* *";return str;
case 6:
  str[0]="* *";
  str[1]="* *";
  str[2]="* *";return str;
  }
}

int main() {
  int n,i;
  cin >> n;
  int dice1=n/100;
  int dice2=(n/10)%10;
  int dice3=n%10;
  if(dice1<1||dice1>6||dice2<1||dice2>6||dice3<1||dice3>6) {
    cout << "ERROR";
    return 0;
  }
  vector<string> d1=face(dice1);
  vector<string> d2=face(dice2);
  vector<string> d3=face(dice3);
  for(i=0;i<3;i++) {
    cout << d1[i] << " " << d2[i] << " " << d3[i] << "\n";
  }
  return 0;
}