Submission
Status:
PPPPPxxPPP
Subtask/Task Score:
80/100
Score: 80
User: CA
Problemset: ลูกเต๋า
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-21 11:22:05
#include <iostream>
#include <string>
using namespace std;
int main() {
string d;
cin >> d;
string outer, inner;
for (int i : d) {
if (i-'0' > 6) {
cout << "ERROR\n";
return 1;
}
}
for (int i = 0; i < 3; i++) {
int cur = d[i] - '0';
if (cur < 3) {
outer.append(" ");
}
else if (cur == 3) {
outer.append(" * ");
}
else if (cur > 3) {
outer.append("* *");
}
if (i < 2) {
outer.append("|");
}
}
for (int i = 0; i < 3; i++) {
int cur = d[i] - '0';
if (cur % 2 != 0) {
inner.append(" * ");
}
else if (cur == 2 || cur == 6) {
inner.append("* *");
}
else if (cur == 4) {
inner.append(" ");
}
if (i < 2) {
inner.append("|");
}
}
cout << outer << "\n";
cout << inner << "\n";
cout << outer << "\n";
return 0;
}