Submission

Status:

TTTTTTTTTTTTTTTTTTTT

Subtask/Task Score:

0/100

Score: 0

User: Karatat007

Problemset: Abacus

Language: cpp

Time: 1.085 second

Submitted On: 2026-08-16 16:37:31

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;

    int m[10]{};

    for(int i = 8; i >= 1; --i){
        m[i] = n % 10;
        n /= 10;
    }

    cout << "* * * * * * * *" << '\n';

    for(int i = 1; i <= 8; ++i){
        if(m[i] >= 5){
            cout << "  ";
        }
        else{
            cout << "* ";
        }
    }
    cout << '\n';
    for(int i = 1; i <= 8; ++i){
        if(m[i] >= 5){
            cout << "* ";
            m[i] -= 5;
        }
        else{
            cout << "  ";
        }
    }
    cout << '\n';
    cout << "-----------------" << '\n';
    /*
    4 3 2 1 0
    * * * *
    * * *   *
    * *   * *
    *   * * *
      * * * *
    * * * * *
    */
    for(int i = 0; i <= 4; ++i){
        for(int j = 1; j <= 8; ++i){
            if(m[j] != i){
                cout << "* ";
            }
            else{
                cout << "  ";
            }
        }
        cout << '\n';
    }
}