Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: KurtCobain
Problemset: ลูกเต๋า
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-02 22:38:01
#include <iostream>
#include <vector>
using namespace std;
int main(){
string n;
cin >> n;
string dice[6][3] = {
{
" ",
" * ",
" "
},
{
" ",
"* *",
" "
},
{
" * ",
" * ",
" * "
},
{
"* *",
" ",
"* *"
},{
"* *",
" * ",
"* *"
},
{
"* *",
"* *",
"* *"
}
};
vector<int> info = {};
for (char c : n){
int b = c - '0';
if (b > 6 || b <= 0){
cout << "ERROR";
return 0;
}
info.push_back(b);
}
for (int u=0;u<3;u++){
int q = 0;
for (int x : info){
q++;
cout << dice[x-1][u];
if (q < 3) cout << "|";
}
cout << '\n';
}
}