Submission
Status:
-----PP---
Subtask/Task Score:
20/100
Score: 20
User: Sunsblad
Problemset: ลูกเต๋า
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-04 12:21:35
#include<iostream>
#include<string>
using namespace std;
int main(){
string input;
cin>>input;
for(int i= 0; i < 3; i++){
if(int(input[i]) - int('0') >= 7){
cout<<"ERROR";
return 0;
}
}
for(int i = 0; i < 3; i++){
for(int k = 0; k < 3; k++){
cout<<'|';
for(int j = 0; j < 3; j++){
switch(int(input[k]) - int('0')){
case 1:
if( i == 1 and j == 1){
cout<<'*';
}else{
cout<<' ';
}
break;
case 2:
if( i == 1 and j == 0 or i == 1 and j == 2){
cout<<'*';
}else{
cout<<' ';
}
break;
case 3:
if(j == 1){
cout<<'*';
}else{
cout<<' ';
}
break;
case 4:
if((i + j == 2 or i == j) and i != 1 ){
cout<<'*';
}else{
cout<<' ';
}
break;
case 5:
if(i + j == 2 or i == j){
cout<<'*';
}else{
cout<<' ';
}
break;
case 6:
if( j == 0 or j == 2){
cout<<'*';
}else{
cout<<' ';
}
break;
}
}
}
cout<<'\n';
}
}