Submission

Status:

----------

Subtask/Task Score:

0/100

Score: 0

User: por

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-09-26 21:41:41

#include <stdio.h>
#include <string.h>

int main(){
    char x[3];
    scanf("%s", &x);
     char arr[6][3][3] = {
        {
            {' ', ' ', ' '},
            {' ', '*', ' '},
            {' ', ' ', ' '}
        },
        {
            {' ', ' ', ' '},
            {'*', ' ', '*'},
            {' ', ' ', ' '}
        },
        {
            {' ','*',' '},
            {' ','*',' '},
            {' ','*',' '}

        },
        {
            {'*',' ','*'},
            {' ',' ',' '},
            {'*',' ','*'}

        },
        {
            {'*',' ','*'},
            {' ','*',' '},
            {'*',' ','*'}
        },
        {
            {'*',' ','*'},
            {'*',' ','*'},
            {'*',' ','*'}
        }

     };
     for(int i=0;i<3;i++){
     if(x[i]!='1'&&x[i]!='2'&&x[i]!='3'&&x[i]!='4'&&x[i]!='5'&&x[i]!='6'){
        printf("ERROR");
        return 0;
     }
     }
     for(int k=0;k<3;k++){
         //printf("|");

        for(int i=0;i<3;i++){
            if(x[i]=='1'){
                //printf("x");
                for(int j=0;j<3;j++){
                    printf("%c", arr[0][k][j]);
                }
            }
            if(x[i]=='2'){
                for(int j=0;j<3;j++){
                    printf("%c", arr[1][k][j]);
                }
            }
            if(x[i]=='3'){
                for(int j=0;j<3;j++){
                    printf("%c", arr[2][k][j]);
                }
            }
            if(x[i]=='4'){
                for(int j=0;j<3;j++){
                    printf("%c", arr[3][k][j]);
                }
            }
            if(x[i]=='5'){
                for(int j=0;j<3;j++){
                    printf("%c", arr[4][k][j]);
                }
            }
            if(x[i]=='6'){
                for(int j=0;j<3;j++){
                    printf("%c", arr[5][k][j]);
                }
            }

            if(i!=2){
            printf("|");
            }

        }
        printf("\n"); //printf("1");
         //printf("%c", x[i]);

     }




return 0;
}