#P106. Diamond

Diamond

題目描述

Print a diamond with given size

輸入格式

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

 

輸出格式

A diamond composes by *

Samples

["5","3"]
["  *\r\n ***\r\n*****\r\n ***\r\n  *\r\n"," *\r\n***\r\n *"]

提示

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

原始資料

  • Zero1 題號:a106
  • Hydro 題號:Z0106
  • Locale:zh_TW
  • Display:open