Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: angpangSK
Problemset: ลูกเต๋า
Language: cpp
Time: 0.002 second
Submitted On: 2025-09-23 21:00:14
#include <iostream>
using namespace std;
int main() {
string three_dg;
int ref[3];
cin >> three_dg;
for (int i = 0; i < 3; i++) {
ref[i] = (int)three_dg[i] - 48;
if (ref[i] < 0 || ref[i] > 6) {
cout << "ERROR";
return 0;
}
}
string mx_show[3][11];
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 11; j++) {
mx_show[i][j] = " ";
}
}
for (int i = 0; i < 3; i++) {
mx_show[i][3] = "|";
mx_show[i][7] = "|";
}
for (int i = 0; i < 3; i++) {
if (ref[i] == 1) {
mx_show[1][i*4 + 1] = "*";
}
else if (ref[i] == 2) {
mx_show[1][i*4] = "*";
mx_show[1][i*4 + 2] = "*";
}
else if (ref[i] == 3) {
mx_show[0][i*4+1] = "*";
mx_show[1][i*4+1] = "*";
mx_show[2][i*4+1] = "*";
}
else if (ref[i] == 4) {
mx_show[0][i*4] = "*";
mx_show[0][i*4+2] = "*";
mx_show[2][i*4] = "*";
mx_show[2][i*4+2] = "*";
}
else if (ref[i] == 5) {
mx_show[0][i*4] = "*";
mx_show[0][i*4+2] = "*";
mx_show[1][i*4+1] = "*";
mx_show[2][i*4] = "*";
mx_show[2][i*4+2] = "*";
}
else if (ref[i] == 6) {
mx_show[0][i*4] = "*";
mx_show[0][i*4+2] = "*";
mx_show[1][i*4] = "*";
mx_show[1][i*4+2] = "*";
mx_show[2][i*4] = "*";
mx_show[2][i*4+2] = "*";
}
}
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 11; j++) {
cout << mx_show[i][j];
}
cout << endl;
}
return 0;
}