a106: Diamond
Tags :
Accepted rate : 133人/148人 ( 90% ) [非即時]
評分方式:
Tolerant

最近更新 : 2021-11-29 10:10

Content

Print a diamond with given size

Input

An odd integer 'size' represent the size, e.g. 1, 3, 5, 7, 9 ...

 

Output

A diamond composes by *

Sample Input #1
5
Sample Output #1
  *
 ***
*****
 ***
  *
Sample Input #2
3
Sample Output #2
 *
***
 *
測資資訊:
記憶體限制: 64 MB
公開 測資點#0 (33%): 1.0s , <1K
公開 測資點#1 (33%): 1.0s , <1K
公開 測資點#2 (34%): 1.0s , <1K
Hint :

Think about the relation of amount of spaces and amount of '*' with iterator

Tags:
出處:
[管理者:
kichan@g.pui... (陳嘉賢CHAN KA IN)
]


ID User Problem Subject Hit Post Date
沒有發現任何「解題報告」