Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: PutterThecityboy
Problemset: ลูกเต๋า
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-13 21:47:14
#include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin >> s;
for (int i = 0; i< 3; i++){
if (s[i] < '1' || s[i] > '6') {
cout << "ERROR";
return 0;
}
}
string arr[3][6] = {{" ", " ", " * ", "* *", "* *", "* *"},
{" * ", "* *", " * ", " ", " * ", "* *"},
{" ", " ", " * ", "* *", "* *", "* *"} };
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
cout << arr[i][s[j] - '1'];
if (j < 2) cout << "|";
}
cout << endl;
}
cin.ignore();
cin.get();
return 0;
}