Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Quaoar

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-13 19:59:34

#include <stdio.h>

int main() {
    char str[3];
    scanf("%s" , str);
    
    for (int i = 0 ; i < 3 ; i++){
        for (int j = 0 ; j < 3 ; j++){
            if (i == 0 || i == 1){
                if (i == 0){
                    
                    if (str[j] == '4' || str[j] == '5' || str[j] == '6'){
                        printf("* *");
                    } else if (str[j] == '2'){
                        printf(" * ");
                    } else if (str[j] == '3'){
                        printf("*  ");
                    } else {
                        printf("   ");
                    }
                    printf(" ");
                } else if (i == 1){
                    
                    if (str[j] == '3' || str[j] == '5' || str[j] == '1'){
                        printf(" * ");
                    } else if (str[j] == '6'){
                        printf("* *");
                    } else {
                        printf("   ");
                    }
                    printf(" ");
                }
            } else {
                if (str[j] == '4' || str[j] == '5' || str[j] == '6'){
                    printf("* *");
                } else if (str[j] == '2'){
                    printf(" * ");
                } else if (str[j] == '3'){
                    printf("  *");
                } else if (str[j] > '6'){
                    printf("___");
                } else {
                    printf("   ");
                }
                printf(" ");
            }
            
        }
        printf("\n");
    }

    return 0;
}