Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: FIrmTInn
Problemset: ลูกเต๋า
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-13 22:20:08
#include<iostream>
using namespace std;
int main(){
char arr[3][12];
string str1;
cin >> str1;
int start = 1;
for(int i=0;i<3;i++){
for(int j=0;j<12;j++){
arr[i][j] = ' ';
}
}
for(int i=0;i<3;i++){
if(str1[i] >= '1' && str1[i] <= '6'){
switch(str1[i]){
case '1':
arr[1][start] = '*';
break;
case '2':
arr[1][start-1] = '*';
arr[1][start+1] = '*';
break;
case '3':
arr[0][start] = '*';
arr[1][start] = '*';
arr[2][start] = '*';
break;
case '4':
arr[0][start-1] = '*';
arr[0][start+1] = '*';
arr[2][start-1] = '*';
arr[2][start+1] = '*';
break;
case '5':
arr[0][start-1] = '*';
arr[0][start+1] = '*';
arr[2][start-1] = '*';
arr[2][start+1] = '*';
arr[1][start] = '*';
break;
case '6':
arr[0][start-1] = '*';
arr[0][start+1] = '*';
arr[1][start-1] = '*';
arr[1][start+1] = '*';
arr[2][start-1] = '*';
arr[2][start+1] = '*';
break;
}
start += 4;
}
else{
cout << "ERROR";
return 0;
}
}
for(int i=0;i<3;i++){
for(int j=0;j<12;j++){
if(j == 3 || j == 7){
arr[i][j] = '|';
}
}
}
for(int i=0;i<3;i++){
for(int j=0;j<12;j++){
cout << arr[i][j];
}
cout << '\n';
}
return 0;
}