Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: ztmy_

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-13 21:05:51

#include <iostream>
using namespace std;

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