Submission
Status:
Compilation Error
Subtask/Task Score:
Score: 0
User: vern6767
Problemset: ลูกเต๋า
Language: cpp
Time: 0.000 second
Submitted On: 2026-09-21 14:07:02
#include <iostream>
#include <string>
using namespace std;
int main() {
string n, output = "";
string df[6][3] = {
{" "," * "," "},
{" ","* *"," "},
{" * "," * "," * "},
{"* *"," ","* *"},
{"* *"," * ","* *"},
{"* *","* *","* *"}
};
cin >> n;
int n1 = stoi(n.substr(0, 1));
int n2 = stoi(n.substr(1, 1));
int n3 = stoi(n.substr(2, 1));
if ((n1 >= 1 && n1 <= 6) && (n2 >= 1 && n2 <= 6) && (n3 >= 1 && n3 <= 6)) {
for (int i = 0; i <= 2; i++) {
cout << df[n1-1][i] << "|" << df[n2-1][i] << "|" << df[n3-1][i] << "\n";
}
} else {
cout << "ERROR";
}
return 0;
}1