Submission

Status:

PPPPTTTPPP

Subtask/Task Score:

70/100

Score: 70

User: bestisyis...programming

Problemset: ลูกเต๋า (2566)

Language: cpp

Time: 1.052 second

Submitted On: 2026-10-07 15:00:49

#include <iostream>
#include <string>
using namespace std;
int main(){
	//cin >> num; no
	string dice[6][3];
	dice[0][0] = "   ";
	dice[0][1] = " * ";
	dice[0][2] = "   ";
	dice[1][0] = " * ";
	dice[1][1] = "   ";
	dice[1][2] = " * ";
	dice[2][0] = "*  ";
	dice[2][1] = " * ";
	dice[2][2] = "  *";
	dice[3][0] = "* *";
	dice[3][1] = "   ";
	dice[3][2] = "* *";
	dice[4][0] = "* *";
	dice[4][1] = " * ";
	dice[4][2] = "* *";
	dice[5][0] = "* *";
	dice[5][1] = "* *";
	dice[5][2] = "* *";
	int num,unit,tenth,hundredth;
	cin >> num;
	unit = num%10;
	num = num/10;
	tenth = num%10;
	num = num/10;
	hundredth = num;
	for(int i=0;i<3;i++){
		if(hundredth !='7') cout << dice[hundredth-1][i] << ' ';
		else if(i==2) cout << "___";
		else cout << "   ";
		if(tenth !='7') cout << dice[tenth-1][i] << ' ';
		else if(i==2) cout << "___";
		else cout << "   ";
		if(unit !='7') cout << dice[unit-1][i] << ' ';
		else if(i==2) cout << "___";
		else cout << "   ";
		cout << endl;
	}
	return 0;
}