Submission
Status:
--------------------
Subtask/Task Score:
0/100
Score: 0
User: pupu
Problemset: Abacus
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-02 15:14:13
#include <iostream>
#include <stack>
#include <queue>
using namespace std;
int main(){ios::sync_with_stdio(0);cin.tie(0);
int box[16]={0},a,i,j,k,l,m=0,p,n=10000000;
cin>>a;
for(j=0;j<8;j++){
box[j*2]=a/n;
a=a-(box[j*2]*n);
n=n/10;
}
for(i=0;i<8;i++){
if(box[(i*2)]/5==1){
box[1+(i*2)]=1;
box[i*2]=box[i*2]-5;
}
}
cout<<"* * * * * * * * "<<"\n";
for(k=0;k<8;k++){
if(box[1+k*2]==0){
cout<<"* ";
}
else{
cout<<" ";
}
}
cout<<"\n";
for(l=0;l<8;l++){
if(box[1+l*2]==0){
cout<<" ";
}
else{
cout<<"* ";
}
}
cout<<"\n";
cout<<"-----------------"<<"\n";
for(j=0;j<5;j++){
for(p=0;p<8;p++){
if(box[(p*2)]==j){
cout<<" ";
}
else{
cout<<"* ";
}
}
cout<<"\n";
}
}