302356: CF454A. Little Pony and Crystal Mine
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Little Pony and Crystal Mine
题意翻译
暮光闪闪有一次从水晶矿里得到了一块水晶。一块大小为n(n是奇数且n>1)的水晶看上去是个嵌有一个菱形的n×n矩阵。 现在给你一个奇数n。你需要绘制出大小为n的水晶的图示。矩阵中的钻石(译者注:或者说水晶,但原文如此)部分用字母"D"表示。其余部分则用字母"*"表示。你可以通过下面的样例来更好地理解你所需绘制的图形。 输入描述 输入仅包含一个整数n(3≤n≤101; n是奇数)。 输出描述 输出大小为n的水晶的图示。题目描述
Twilight Sparkle once got a crystal from the Crystal Mine. A crystal of size $ n $ ( $ n $ is odd; $ n>1 $ ) is an $ n×n $ matrix with a diamond inscribed into it. You are given an odd integer $ n $ . You need to draw a crystal of size $ n $ . The diamond cells of the matrix should be represented by character "D". All other cells of the matrix should be represented by character "\*". Look at the examples to understand what you need to draw.输入输出格式
输入格式
The only line contains an integer $ n $ ( $ 3<=n<=101 $ ; $ n $ is odd).
输出格式
Output a crystal of size $ n $ .
输入输出样例
输入样例 #1
3
输出样例 #1
*D*
DDD
*D*
输入样例 #2
5
输出样例 #2
**D**
*DDD*
DDDDD
*DDD*
**D**
输入样例 #3
7
输出样例 #3
***D***
**DDD**
*DDDDD*
DDDDDDD
*DDDDD*
**DDD**
***D***