Submission
Status:
----------
Subtask/Task Score:
0/100
Score: 0
User: Peam
Problemset: Croissant Display
Language: cpp
Time: 0.002 second
Submitted On: 2025-11-02 11:42:03
#include <iostream>
using namespace std;
int main(){
int hours, t = 0;
cin >> hours;
if(hours > 11){
hours %= 12;
t = 1;
}
int one, two;
one = hours / 10;
two = hours % 10;
int min;
cin >> min;
int three, four;
three = min / 10;
four = min % 10;
string digits[10][5] =
{
{ "***",
"* *",
"* *",
"* *",
"***"
},
{ " *",
" *",
" *",
" *",
" *"
},
{
"***",
" *",
"***",
"* ",
"***"
},
{
"***",
" *",
"***",
" *",
"***"
},
{
"* *",
"* *",
"***",
" *",
" *"
},
{ "***",
"* ",
"***",
" *",
"***"
},
{ "***",
"* ",
"***",
"* *",
"***"
},
{
"***",
" *",
" *",
" *",
" *"
},
{
"***",
"* *",
"***",
"* *",
"***"
},
{
"***",
"* *",
"***",
" *",
"***"
}
};
string time[2][5] =
{
{
"*** * *",
"* * ***",
"*** * *",
"* * * *",
"* * * *"
},
{
"*** * *",
"* * ***",
"*** * *",
"* * *",
"* * *"
},
};
for(int i = 0; i < 5; i++){
if(i == 1 || i == 3)
cout << digits[one][i] << " " << digits[two][i] << " : " << digits[three][i]<< " " << digits[four][i] << " " << time[t][i] << endl;
else
cout << digits[one][i] << " " << digits[two][i] << " " << digits[three][i]<< " " << digits[four][i] << " " << time[t][i] << endl;
}
}