Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Aterroth

Problemset: Abacus

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-12 00:36:07

#pragma GCC optimize("O3,unroll-loops")
#include <iostream>
#include <string>

void Solution(){
    std::string n; std::cin >> n;
    while(n.size() != 8)n = '0' + n;

    for(int i = 0; i < 10; ++i){
        if(i == 3){
            std::cout << std::string(17, '-') << '\n';
            continue;
        }
        for(int j = 0; j < 8; ++j){
            if(i == 0 && i == 9)std::cout << '*';
            else if(i == 1 && !((n[j]-'0')/5))std::cout << '*';
            else if(i == 2 && (n[j]-'0')/5)std::cout << '*';
            else if(i == 4 && (n[j] == '0' || n[j] == '5'))std::cout << ' ';
            else if(i == 5 && (n[j] == '1' || n[j] == '6'))std::cout << ' ';
            else if(i == 6 && (n[j] == '2' || n[j] == '7'))std::cout << ' ';
            else if(i == 7 && (n[j] == '3' || n[j] == '8'))std::cout << ' ';
            else if(i == 8 && (n[j] == '4' || n[j] == '9'))std::cout << ' ';
            else if(i == 1 || i == 2)std::cout << ' ';
            else std::cout << '*';
            std::cout << ' ';
        }
        std::cout << '\n';
    }
}

int main(){
    std::ios::sync_with_stdio(0);
    std::cin.tie(0);

    Solution();

    return 0;
}