* * * * *
* * *
*
* * *
* * * * *
"The hourglass shape", refers to the output an odd number of symbols per line; The center line all symbols; Adjacent two rows symbol number 2; Diminishing the number symbols from big to small order at first to 1, since the childhood again increasing order. The end is the same symbol.
Given any N symbols, can not form an hourglass, just asked to print out of the hourglass can drop as many symbols,
Input format:
Type in a line is given a positive integer N (1000) or less and a symbol, separated by Spaces in the middle,
The output format:
Print out the first largest hourglass shape consisting of a given symbol, the final output useless left off in a row the number of symbols,
Input the sample:
19 *
The output sample:
* * * * *
* * *
*
* * *
* * * * *
2
CodePudding user response:
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.htmlI hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html