Submission

Status:

-----PP---

Subtask/Task Score:

20/100

Score: 20

User: Bestzu

Problemset: ลูกเต๋า

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-14 09:10:17

#include<bits/stdc++.h>
#define endl '\n'
using namespace std;

int main() {
    ios::sync_with_stdio(false); cin.tie(nullptr);

    vector<vector<string>> dice = {
        { // dice 1
            "   ",
            " * ",
            "   "
        },
        { // dice 2
            "   ",
            "* *",
            "   "
        },
        { // dice 3
            " * ",
            " * ",
            " * "
        },
        { // dice 4
            "* *",
            "   ",
            "* *"
        },
        { // dice 5
            "* *",
            " * ",
            "* *"
        },
        { // dice 6
            "* *",
            "* *",
            "* *"
        }
    };

    string s; 
    cin >> s;
	
	for(char c : s) {
		if(c > '6') {
			cout << "ERROR";
			return 0;
		}
	}
	
    for(int i = 0; i < 3; i++) {
        for(char c : s) {
            int n = c - '0';
            cout << dice[n-1][i] << "|";
        }
        cout << endl;
    }

    return 0;
}