Submission
Status:
P-P-PPPP--
Subtask/Task Score:
60/100
Score: 60
User: tha_smith
Problemset: ลูกเต๋า
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-02 21:44:53
#include <iostream>
#include <string>
using namespace std;
int main() {
string dice[6][3] = {
{
" ",
" * ",
" ",
},
{
" ",
"* *",
" ",
},
{
" * ",
" * ",
" * ",
},
{
"* *",
" ",
"* *",
},
{
"* *",
" * ",
"* *",
},
{
"* *",
"* *",
"* *",
},
};
int n;
cin >> n;
int a = (n/100)-1;
int b = ((n%100)/10)-1;
int c = (n%10)-1;
if((a<1 || a>6) || (b<1 || b>6) || (c<1 || c>6)) {
cout << "ERROR";
}
else {
cout << dice[a][0] << "|" << dice[b][0] << "|" << dice[c][0] << endl;
cout << dice[a][1] << "|" << dice[b][1] << "|" << dice[c][1] << endl;
cout << dice[a][2] << "|" << dice[b][2] << "|" << dice[c][2] << endl;
}
}