Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: hmmm
Problemset: ลูกเต๋า (2566)
Language: cpp
Time: 0.003 second
Submitted On: 2025-09-21 21:22:48
#include <iostream>
#include <string>
using namespace std;
int main() {
string c;
cin>>c;
for(int i=0;i<3;i++){
for(int k=0;k<3;k++){
for(int j=0;j<3;j++){
if(c[k]-'0'==1){
if(i==1&&j==1){
cout<<"*";
}else{
cout<<" ";
}
}
else if(c[k]-'0'==2){
if(j==1&&(i==0||i==2)){
cout<<"*";
}else{
cout<<" ";
}
}
else if(c[k]-'0'==3){
if(i==j){
cout<<"*";
}else{
cout<<" ";
}
}
else if(c[k]-'0'==4){
if((i+j==2 || i==j)&&i!=1&&j!=1 ){
cout<<"*";
}else{
cout<<" ";
}
}
else if(c[k]-'0'==5){
if((i+j==2 || i==j)){
cout<<"*";
}else{
cout<<" ";
}
}
else if(c[k]-'0'==6){
if(j==0 || j==2){
cout<<"*";
}else{
cout<<" ";
}
}
else if((c[k]-'0')==7 || (c[k]-'0')==8 ||(c[k]-'0')==9 ||(c[k]-'0')==0){
if(i==2){
cout<<"_";
}else {
cout<<" ";
}
// cout << c[k]-'0' << "\n";
}
}
cout << " ";
}
cout<<endl;
}
}