Submission
Status:
-----PP---
Subtask/Task Score:
20/100
Score: 20
User: TonnamSora
Problemset: ลูกเต๋า
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-02 19:26:52
#include <iostream>
using namespace std;
/*void dice(int x){
if(x == 1){
for(int i = 0; i < 3; i++){
for(int j = 0; j < 3; j++){
if(i == 1 && j == 1){
cout << "*";
}
else{
cout << " ";
}
}
cout << "\n";
}
}
else if(x == 2){
for(int i = 0; i < 3; i++){
for(int j = 0; j < 3; j++){
if(i == 1 && (j == 0 || j == 2)){
cout << "*";
}
else{
cout << " ";
}
}
cout << "\n";
}
}
else if(x == 3){
for(int i = 0; i < 3; i++){
for(int j = 0; j < 3; j++){
if(j == 2){
cout << "*";
}
else{
cout << " ";
}
}
cout << "\n";
}
}
else if(x == 4){
for(int i = 0; i < 3; i++){
for(int j = 0; j < 3; j++){
if((i == 0 || i == 2) && (j == 0 || j == 2)){
cout << "*";
}
else{
cout << " ";
}
}
cout << "\n";
}
}
else if(x == 5){
for(int i = 0; i < 3; i++){
for(int j = 0; j < 3; j++){
if(i == j || i + j == 2){
cout << "*";
}
else{
cout << " ";
}
}
cout << "\n";
}
}
else if(x == 6){
for(int i = 0; i < 3; i++){
for(int j = 0; j < 3; j++){
if(j == 0 || j == 2){
cout << "*";
}
else{
cout << " ";
}
}
cout << "\n";
}
}
}*/
int main(){
string x;
cin >> x;
int len = x.length();
for(int i = 0; i < len; i++){
x[i] = x[i] - '0';
if(x[i] > 6){
cout << "ERROR";
return 0;
}
}
for(int i = 0; i < 3; i++){
for(int a = 0; a < len; a++){
for(int j = 0; j < 3; j++){
if(x[a] == 1){
if(i == 1 && j == 1){
cout << "*";
}
else{
cout << " ";
}
}
else if(x[a] == 2){
if(i == 1 && (j == 0 || j == 2)){
cout << "*";
}
else{
cout << " ";
}
}
else if(x[a] == 3){
if(j == 1){
cout << "*";
}
else{
cout << " ";
}
}
else if(x[a] == 4){
if((i == 0 || i == 2) && (j == 0 || j == 2)){
cout << "*";
}
else{
cout << " ";
}
}
else if(x[a] == 5){
if(i == j || i + j == 2){
cout << "*";
}
else{
cout << " ";
}
}
else if(x[a] == 6){
if(j == 0 || j == 2){
cout << "*";
}
else{
cout << " ";
}
}
}
cout << "|";
}
cout << "\n";
}
}