Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: purihorharin
Problemset: ลูกเต๋า
Language: c
Time: 0.002 second
Submitted On: 2026-03-20 16:52:47
#include <stdio.h>
const char *(diceface[3][6]) = {
{" "," "," * ","* *","* *","* *"},
{" * ","* *"," * "," "," * ","* *"},
{" "," "," * ","* *","* *","* *"}
};
int main () {
char buf[4];
scanf("%s", buf);
for (int i = 0; i < 3; i++)
if (buf[i] > '6') {
puts("ERROR");
return 0;
}
for (int r = 0; r < 3; r++) {
fwrite(diceface[r][buf[0]-'1'], 3, 1, stdout);
for (int c = 1; c < 3; c++) {
putchar('|');
fwrite(diceface[r][buf[c]-'1'], 3, 1, stdout);
}
putchar('\n');
}
}