Submission
Status:
----------
Subtask/Task Score:
0/100
Score: 0
User: sakurajima
Problemset: ลูกเต๋า (2566)
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-16 21:35:12
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
string digit;
cin >> digit;
unordered_map<char,vector<vector<char>>> dice = {
{'1', {{' ',' ',' '}, {' ','*',' '}, {' ',' ',' '}}},
{'2', {{' ','*',' '}, {' ',' ',' '}, {' ','*',' '}}},
{'3', {{'*',' ',' '}, {' ','*',' '}, {' ',' ','*'}}},
{'4', {{'*',' ','*'}, {' ',' ',' '}, {'*',' ','*'}}},
{'5', {{'*',' ','*'}, {' ','*',' '}, {'*',' ','*'}}},
{'6', {{'*',' ','*'}, {'*',' ','*'}, {'*',' ','*'}}}
};
string line1, line2, line3;
for (char c : digit) {
if (dice.find(c) == dice.end()) {
line1 += " ";
line2 += " ";
line3 += "---";
continue;
}
for (int i = 0; i < 3; i++) {
line1 += dice[c][0][i];
}
for (int i = 0; i < 3; i++) {
line2 += dice[c][1][i];
}
for (int i = 0; i < 3; i++) {
line3 += dice[c][2][i];
}
}
cout << line1 << '\n';
cout << line2 << '\n';
cout << line3 << '\n';
}