-->
当前位置:首页 > 题库

PROGRAMMING:[cycle] [print graphics B --]

Luz5年前 (2021-05-10)题库398
Enter a number D and a positive integer n, and then use the given number d as the basic element to print 2N-1 lines of graphics, n d in the first line, n-1 D in the second line, n-2 in the third line... And so on, line n has only one D; Then, starting from the N + 1 row, each row has one more D than the previous row until the 2N-1 row has only n D. See the example for details.
###Input format:
Enter a number D and a positive integer n. D will only be a number from 0 to 9, 1 < = n < = 100
###Output format:
Output graphics as required.
###Input sample 1:
Here is a set of inputs. For example:
```in
0 5
```
###Output sample 1:
The corresponding output is given here. For example:
```out
00000
0000
000
00
0
00
000
0000
00000
```
###Input sample 2:
Here is a set of inputs. For example:
```in
7 7
```
###Output sample 2:
The corresponding output is given here. For example:
```out
seven million seven hundred and seventy-seven thousand seven hundred and seventy-seven
seven hundred and seventy-seven thousand seven hundred and seventy-seven
seventy-seven thousand seven hundred and seventy-seven
seven thousand seven hundred and seventy-seven
seven hundred and seventy-seven
seventy-seven
seven
seventy-seven
seven hundred and seventy-seven
seven thousand seven hundred and seventy-seven
seventy-seven thousand seven hundred and seventy-seven
seven hundred and seventy-seven thousand seven hundred and seventy-seven
seven million seven hundred and seventy-seven thousand seven hundred and seventy-seven
```







answer:If there is no answer, please comment