Submission

Status:

PPPPP--PPP

Subtask/Task Score:

80/100

Score: 80

User: kavin8888

Problemset: ลูกเต๋า

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-21 21:09:34

#include<bits/stdc++.h>
#define spps1 ios::sync_with_stdio(false)
#define spps2 cin.tie(nullptr)
#define ll long long
#define ei else if
using namespace std;
int main()
{
	string n; cin>>n;
	string tmp="";
	//CRAET CANVA
	for(int i=0;i<4*n.size()-1;i++)
	{
		tmp+=" ";
	}
	vector<string> out(3,tmp);
	//CREATE |   |
	for(int p=0;p<n.size();p++)
	{
		int startcol=p*4; int endcol=startcol+3;
		for(int i=0;i<3;i++)
		{
			for(int j=0;j<4*n.size()-1;j++)
			{
				out[i][endcol]='|';
				if(n[p]=='1')
				{
					out[1][startcol+1]='*';
				}
				ei(n[p]=='2')
				{
					out[1][startcol]='*';
					out[1][endcol-1]='*';
				}
				ei(n[p]=='3')
				{
					out[i][startcol+1]='*';
				}
				ei(n[p]=='4')
				{
					if((i==0 && j==startcol) || (i==2 && j==startcol) || (i==0 && j==endcol-1) || (i==2 && j==endcol-1))
					{
						out[i][j]='*';
					}
				}
				ei(n[p]=='5')
				{
					if(j==i || j+i==2)
					{
						out[i][startcol+j]='*';
					}
				}
				ei(n[p]=='6')
				{
					out[i][startcol]='*';
					out[i][endcol-1]='*';
				}
			}
		}
	}
	for(int i=0;i<out.size();i++)
	{
		cout<<out[i]<<'\n';
	}
	return 0;
}