Submission
Status:
-----PP---
Subtask/Task Score:
20/100
Score: 20
User: Mocha_nb
Problemset: ลูกเต๋า
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-12 12:08:11
#include <iostream>
#include <string>
using namespace std;
int main() {
string arr;
cin >> arr;
for(int i=0;i<3;i++){
if(arr[i] > 6){
cout << "ERROR";
return 0;
}
}
for(int i=0;i<3;i++){
for(int k=0;k<3;k++){
for(int j=0;j<3;j++){
if(arr[k] == '6'){
if(j == 0 || j == 2 ){
cout << "*";
}else{
cout << " ";
}
}
if(arr[k] == '5'){
if(i == j || i+j == 2){
cout << "*";
}else{
cout << " ";
}
}
if(arr[k] == '4'){
if((i == j || i+j == 2) && (j != 1 && i != 1)){
cout << "*";
}else{
cout << " ";
}
}
if(arr[k] == '3'){
if(j==1){
cout << "*";
}else{
cout << " ";
}
}
if(arr[k] == '2'){
if(i==1 && (j == 0 || j == 2)){
cout << "*";
}else{
cout << " ";
}
}
if(arr[k] == '1'){
if(i == 1 && j == 1){
cout << "*";
}else{
cout << " ";
}
}
}
if(k != 2){
cout << '|';
}
}
cout << '\n';
}
}