Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: goine
Problemset: ลูกเต๋า (2566)
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-12 11:08:19
#include<iostream>
#include<unordered_map>
#include<array>
using namespace std;
unordered_map<char, array<string, 3>> faces = {
{'1', {" ", " * ", " "}},
{'2', {" * ", " ", " * "}},
{'3', {"* ", " * ", " *"}},
{'4', {"* *", " ", "* *"}},
{'5', {"* *", " * ", "* *"}},
{'6', {"* *", "* *", "* *"}},
};
int main() {
string x;
cin >> x;
for (int line = 0; line < 3; line++) {
for (int i = 0; i < 3; i++) {
if (faces.find(x[i]) == faces.end()) {
if (line == 2) {
cout << "___";
} else {
cout << " ";
}
} else {
cout << faces[x[i]][line];
}
cout << ' ';
}
cout << '\n';
}
return 0;
}