Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Tjeez

Problemset: ลูกเต๋า (2566)

Language: cpp

Time: 0.003 second

Submitted On: 2026-09-27 12:56:52

#include <iostream>
using namespace std;
int main(){
	string s;
	cin>>s;
	int x[3]={0};
	char arr[7][9] = {
	    {' ', ' ', ' ',
		' ', ' ', ' ',
		'_', '_', '_'},
		
	    {' ', ' ', ' ',
		' ', '*', ' ',
		' ', ' ', ' '},
		
	    {' ', '*', ' ', 
		' ', ' ', ' ', 
		' ', '*', ' '},
		
	    {'*', ' ', ' ', 
		' ', '*', ' ', 
		' ', ' ', '*'},
	    
	    {'*', ' ', '*', 
		' ', ' ', ' ', 
		'*', ' ', '*'},
	    
	    {'*', ' ', '*', 
		' ', '*', ' ', 
		'*', ' ', '*'},
	    
	    {'*', ' ', '*', 
		'*', ' ', '*', 
		'*', ' ', '*'}
	};
	
	for (int i=0 ; i<3 ; i++){
		x[i]=s[i]-48;
	}
	
	for (int i=0 ; i<3 ; i++){
		for (int j=0 ; j<3 ; j++){
			int n=x[j];
			for (int k=0 ; k<3 ; k++){
				if (n>=1 && n<=6){
					cout<<arr[n][k+i*3];
				}
				else{
					cout<<arr[0][k+i*3];
				}
			}
			cout<<" ";
		}
		cout<<"\n";
	}
}