Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: kinzap
Problemset: ลูกเต๋า (2566)
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-12 14:52:56
#include <iostream>
using namespace std;
int n,a[3];
int main(){
cin >> n;
a[2]=n%10;
n/=10;
a[1]=n%10;
n/=10;
a[0]=n%10;
for(int i = 0;i<3;i++){
if(a[i]==1){
cout << " ";
}
else if(a[i] == 2){
cout << " * ";
}
else if(a[i] == 3){
cout << "* ";
}
else if(a[i] == 4){
cout << "* *";
}
else if(a[i] == 5){
cout << "* *";
}
else if(a[i] == 6){
cout << "* *";
}
else{
cout << " ";
}
cout << " ";
}
cout << endl;
for(int i = 0;i<3;i++){
if(a[i]==1){
cout << " * ";
}
else if(a[i] == 2){
cout << " ";
}
else if(a[i] == 3){
cout << " * ";
}
else if(a[i] == 4){
cout << " ";
}
else if(a[i] == 5){
cout << " * ";
}
else if(a[i] == 6){
cout << "* *";
}
else{
cout << " ";
}
cout << " ";
}
cout << endl;
for(int i = 0;i<3;i++){
if(a[i]==1){
cout << " ";
}
else if(a[i] == 2){
cout << " * ";
}
else if(a[i] == 3){
cout << " *";
}
else if(a[i] == 4){
cout << "* *";
}
else if(a[i] == 5){
cout << "* *";
}
else if(a[i] == 6){
cout << "* *";
}
else{
cout << "___";
}
cout << " ";
}
}