Submission

Status:

----------

Subtask/Task Score:

0/100

Score: 0

User: Peerawat

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-13 16:51:56

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    // Dice patterns for values 1 to 6
    string first[7]  = {"   ", " . ", "   ", " . ", ". .", ". .", ". ."};
    string second[7] = {"   ", " . ", " . ", " . ", "   ", " . ", ". ."};
    string third[7]  = {"   ", " . ", "   ", ".  ", ". .", ". .", ". ."};

    // Fallback/special pattern for values > 6 (e.g., underscores)
    string over_first  = "   ";
    string over_second = "   ";
    string over_third  = "___";

    string s;
    if (!(cin >> s)) return 0;

    // Row 1
    for (int i = 0; i < s.length(); i++) {
        int val = s[i] - '0';
        if (val > 6) {
            cout << over_first;
        } else {
            cout << first[val];
        }
        if (i < s.length() - 1) cout << " "; // Space between dice
    }
    cout << "\n";

    // Row 2
    for (int i = 0; i < s.length(); i++) {
        int val = s[i] - '0';
        if (val > 6) {
            cout << over_second;
        } else {
            cout << second[val];
        }
        if (i < s.length() - 1) cout << " "; // Space between dice
    }
    cout << "\n";

    // Row 3
    for (int i = 0; i < s.length(); i++) {
        int val = s[i] - '0';
        if (val > 6) {
            cout << over_third;
        } else {
            cout << third[val];
        }
        if (i < s.length() - 1) cout << " "; // Space between dice
    }
    cout << "\n";

    return 0;
}