Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Nuttykub
Problemset: ลูกเต๋า
Language: cpp
Time: 0.003 second
Submitted On: 2026-10-01 13:55:08
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
string s;
cin >> s;
if (s.length() !=3){
cout <<"ERROR";
return 0;
}
for (int i = 0;i < 3;i++){
if(s[i]-'0' > 6 or s[i]-'0' < 1){
cout << "ERROR";
return 0;
}
}
string face[7][3]{
{},
{" "," * "," "},
{" ","* *"," "},
{" * "," * "," * "},
{"* *"," ","* *"},
{"* *"," * ","* *"},
{"* *","* *","* *"}
};
for (int i = 0;i < 3;i++){
for (int j = 0;j< 3;j++){
int n = s[j]-'0';
cout << face[n][i];
if (j < 2) cout <<"|";
}
cout << endl;
}
}