Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: letdown
Problemset: ลูกเต๋า (2566)
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-06 17:00:52
#include <iostream>
#include <math.h>
#include <string.h>
using namespace std;
int main() {
string s;
cin >> s;
string anst[] = {" ", " * ", "* ", "* *", "* *", "* *", " "};
string ansm[] = {" * ", " ", " * ", " ", " * ", "* *", " "};
string ansb[] = {" ", " * ", " *", "* *", "* *", "* *", "___"};
int x[3];
for (int i = 0; i < s.length(); i++) {
int n = (int)s[i] - '0';
if (n > 6 || n < 0) x[i] = 6;
else x[i] = n-1;
}
cout << anst[x[0]] << " " << anst[x[1]] << " " << anst[x[2]] << endl;
cout << ansm[x[0]] << " " << ansm[x[1]] << " " << ansm[x[2]] << endl;
cout << ansb[x[0]] << " " << ansb[x[1]] << " " << ansb[x[2]] << endl;
}