Haha...
A teammate recommended this question to me. I didn't want to do question a because I was too big to read the English question. However, you only need to check the input and output to understand the general idea of this question. It's so nice! I don't like the growth of a fucking question page.
In fact, this question is a simple question of input and output.
CodeAs follows:
# Include <iostream> using namespace STD; /* ---- // B [0] | // C [0] [2] | ----/B [1] | // C [1] [2] | ---- // B [2], for example, it is the basic framework of a number. It can be divided into two types, namely, the '-' part (ROW) and '|' part (multiple rows ). The following array B is used to describe whether or not the '-' part is available, and the array C is used to describe whether the '|' part is available. */Int B [3] [10] = {1, 0, 1, 1, 0, 1, 1, 1, 1}, {0, 0, 1, 1, 1, 1, 1, 0, 1, 1}, {1, 0, 1, 1, 0, 1, 1, 0, 1 }}; int C [2] [10] [2] = {1, 1}, {0, 1}, {0, 1}, {0, 1 }, {1, 1}, {1, 0}, {1, 0}, {0, 1}, {1, 1}, {1, 1 }}, {1, 1}, {0, 1}, {1, 0}, {0, 1}, {0, 1}, {0, 1}, {1, 1 },{ 0, 1 },{ 1, 1 },{ 0, 1 }}; int S, N; int digit [20]; void F (int A [], int N) {int I, j, k; for (I = 1; I <= N; I ++) {cout <''; For (j = 0; j <s; j ++) If (A [digit [I] = 1) cout <'-'; elsecout <''; cout <''; if (I! = N) cout <'';} cout <Endl;} void g (int A [] [2], int N) {int I, J, K; for (I = 1; I <= N; I ++) {if (a [digit [I] [0] = 1) cout <'| '; else cout <''; For (j = 0; j <s; j ++) cout <''; if (A [digit [I] [1] = 1) cout <'|'; else cout <''; if (I! = N) cout <'';} cout <Endl;} int main () {int dec [] = {1, 10,100,100 0, 10000,100 000, 1000000,100 00000, 100000000}; while (CIN> S> N & S * s + N * n! = 0) {int I, j, k; int COUNT = 0; for (I = 1; I <= 8 & COUNT = 0; I ++) if (n <dec [I]) Count = I; for (I = 1; I <= count; I ++) {digit [I] = N/DEC [count-I]; n = n % dec [count-I];} f (B [0], count ); for (I = 0; I <s; I ++) g (C [0], count); F (B [1], count); for (I = 0; I <s; I ++) g (C [1], count); F (B [2], count); cout <Endl ;}return 0 ;}