Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Hax
Problemset: ลูกเต๋า
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-12 16:12:02
#include <iostream>
#include <ostream>
#include <string>
using namespace std;
int main() {
string dice[3][6] = {
{" ", " ", " * ", "* *", "* *", "* *"},
{" * ", "* *", " * ", " ", " * ", "* *"},
{" ", " ", " * ", "* *", "* *", "* *"}
};
string str;
cin >> str;
for (int i = 0; i < str.length(); i++) {
if (str[i] < '1' || str[i] > '6') {
cout << "ERROR";
return 0;
}
}
for (int r = 0; r < 3; r++) {
for (int i = 0; i < str.length(); i++) {
cout << dice[r][str[i] - '1'];
if (i == 0 || i == 1) {
cout << "|";
}
}
cout << endl;
}
return 0;
}