Submission
Status:
PPPPPPPPPPPPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: 38408
Problemset: Abacus
Language: cpp
Time: 0.002 second
Submitted On: 2026-10-04 18:44:48
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n ;
vector<int> num (8,0);
int i = 7;
while (n > 0)
{
num[i] += n%10;
n /= 10;
i--;
}
for (int i = 0; i < 10; i++)
{
if(i==3){
for (int j = 0; j < 17; j++)
{
cout << "-";
}cout <<"\n";
continue;
}
for (int j = 0; j < 8; j++)
{
int x = num[j];
bool star= false;
if(i==0){
star = true;
}else if(i==1){
if(x<5){
star = true;
}
}else if(i==2){
if(x>=5){
star = true ;
}
}else{
int y = x % 5;
int r = i-4;
if(r < y){
star = true;
}else if (r==y){
star = false;
}else{
star = true;
}
}
if(star){
cout << "*";
}else{
cout << " ";
}
if(j!=7){
cout<<" ";
}
}
cout << endl;
}
}