Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: goine
Problemset: ลูกเต๋า
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-11 22:46:45
#include<iostream>
#include<map>
#include<array>
using namespace std;
map<char, array<string, 3>> dices = {
{'1', {" ", " * ", " "}},
{'2', {" ", "* *", " "}},
{'3', {" * ", " * ", " * "}},
{'4', {"* *", " ", "* *"}},
{'5', {"* *", " * ", "* *"}},
{'6', {"* *", "* *", "* *"}}
};
int main() {
string x;
cin >> x;
if (x.length() > 3) return 1;
for (int i = 0; i < 3; i++) {
if (dices.find(x[i]) == dices.end()) {
cout << "ERROR";
return 0;
}
}
for (int line = 0; line < 3; line++) {
for (int i = 0; i < 3; i++) {
cout << dices[x[i]][line];
if (i != 2) cout << '|';
}
cout << '\n';
}
return 0;
}