Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: RandomPerson
Problemset: ลูกเต๋า
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-12 17:09:10
#include <iostream>
using namespace std;
int main() {
int x,x1,x2,x3,y;
cin >> x;
x1=x/100;
x3=x%10;
x2=(x-x1*100-x3)/10;
if (x1<1 || x1>6 || x2<1 || x2>6 || x3<1 || x3>6) {
cout << "ERROR";
}
else {
for (int i=0;i<3;i++) {
for (int j=0;j<3;j++) {
if (i==0) {
if (j==0) {
y=x1;
}
else if (j==1) {
y=x2;
}
else {
y=x3;
}
if (y==1) {
cout << " ";
}
else if (y==2) {
cout << " ";
}
else if (y==3) {
cout << " * ";
}
else if (y==4) {
cout << "* *";
}
else if (y==5) {
cout << "* *";
}
else {
cout << "* *";
}
if (j==0 || j==1) {
cout << '|';
}
}
else if (i==1) {
if (j==0) {
y=x1;
}
else if (j==1) {
y=x2;
}
else {
y=x3;
}
if (y==1) {
cout << " * ";
}
else if (y==2) {
cout << "* *";
}
else if (y==3) {
cout << " * ";
}
else if (y==4) {
cout << " ";
}
else if (y==5) {
cout << " * ";
}
else {
cout << "* *";
}
if (j==0 || j==1) {
cout << '|';
}
}
else {
if (j==0) {
y=x1;
}
else if (j==1) {
y=x2;
}
else {
y=x3;
}
if (y==1) {
cout << " ";
}
else if (y==2) {
cout << " ";
}
else if (y==3) {
cout << " * ";
}
else if (y==4) {
cout << "* *";
}
else if (y==5) {
cout << "* *";
}
else {
cout << "* *";
}
if (j==0 || j==1) {
cout << '|';
}
}
}
cout << endl;
}
}
return 0;
}