Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Quaoar

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-24 14:01:59

#include <iostream>
using namespace std;

int main(){
    string n;
    cin >> n;
    for (int i = 0 ; i < 3 ; i++){
        for (int j = 0 ; j < 3 ; j++){
            if (j == 2){
                if (i == 0){
                    if (n[j] == '1'){
                        cout << "   " ;
                    } else if (n[j] == '2'){
                        cout << " * " ;
                    } else if (n[j] == '3'){
                        cout << "*  " ;
                    } else if (n[j] == '4' || n[j] == '5' || n[j] == '6'){
                        cout << "* *" ;
                    } else {
                        cout << "   ";
                    }
                } else if (i == 1){
                    if (n[j] == '1' || n[j] == '3' || n[j] == '5'){
                        cout << " * " ;
                    } else if ( n[j] == '6'){
                        cout << "* *" ;
                    } else if (n[j] == '2' || n[j] == '4' ) {
                        cout << "   ";
                    } else {
                        cout << "   ";                   
                    }
                } else if (i == 2){
                    if (n[j] == '1'){
                        cout << "   " ;
                    } else if (n[j] == '2'){
                        cout << " * " ;
                    } else if (n[j] == '3'){
                        cout << "  *" ;
                    } else if ( n[j] == '4' || n[j] == '5' || n[j] == '6' ){
                        cout << "* *" ;
                    } else {
                        cout << "___";
                    }
                }           
                
            } else {
                if (i == 0){
                    if (n[j] == '1'){
                        cout << "    " ;
                    } else if (n[j] == '2'){
                        cout << " *  " ;
                    } else if (n[j] == '3'){
                        cout << "*   " ;
                    } else if (n[j] == '4' || n[j] == '5' || n[j] == '6'){
                        cout << "* * " ;
                    } else {
                        cout << "   ";
                    }
                } else if (i == 1){
                    if (n[j] == '1' || n[j] == '3' || n[j] == '5'){
                        cout << " *  " ;
                    } else if ( n[j] == '6'){
                        cout << "* * " ;
                    } else if (n[j] == '2' || n[j] == '4' ) {
                        cout << "    ";
                    } else {
                        cout << "    ";                   
                    }
                } else if (i == 2){
                    if (n[j] == '1'){
                        cout << "    " ;
                    } else if (n[j] == '2'){
                        cout << " *  " ;
                    } else if (n[j] == '3'){
                        cout << "  * " ;
                    } else if ( n[j] == '4' || n[j] == '5' || n[j] == '6' ){
                        cout << "* * " ;
                    } else {
                        cout << "___ ";
                    }
                }
            }

        }
        cout << endl;
    }



    return 0;
}