Limits
1s, 512 MB
Given R R R , C C C and D D D , you will produce a pattern consisting of asterisks (* \texttt{*} * ) and dots (. \texttt{.} . ). The pattern is composed of diamonds repeated on a grid both horizontally and vertically.
You will print R R R lines of strings. Each line will consist of C C C characters (either asterisk or dot).
D D D will determine the number of asterisks in the diamond.
When D = 1 D = 1 D = 1 ,
*
When D = 2 D = 2 D = 2 ,
.*.
***
.*.
When D = 3 D = 3 D = 3 ,
..*..
.***.
*****
.***.
..*..
When D = 4 D = 4 D = 4 ,
...*...
..***..
.*****.
*******
.*****.
..***..
...*...
And, so on.
Input You will be given three integers, R R R , C C C , and D D D (1 ≤ R , C , D ≤ 10 1 \le R, C, D \le 10 1 ≤ R , C , D ≤ 10 ).
Output You will print the patterns as described in the problem statement.
Samples Input Output 5 7 2
.*..*..
*******
.*..*..
.*..*..
*******
Input Output 7 7 3
..*....
.***..*
*******
.***..*
..*....
..*....
.***..*
Factors
CPU Memory Source Bash 5.0 1× 1× 1× Brainf*ck 1× 1× 1× C# Mono 6.0 1× 1× 1× C++11 GCC 7.4 1× 1× 1× C++14 GCC 8.3 1× 1× 1× C++17 GCC 9.2 1× 1× 1× C++20 GCC 12.1 1× 1× 1× C11 GCC 12.1 1× 1× 1× C11 GCC 9.2 1× 1× 1× Common Lisp SBCL 2.0 1× 1× 1× D8 11.8 1× 1× 1× Erlang 22.3 1× 1× 1× Free Pascal 3.0 1× 1× 1× Go 1.18 1× 1× 1× Grep 3.7 1× 1× 1× Haskell 8.6 1× 1× 1× Java 1.8 1× 1× 1× Kotlin 1.1 1× 1× 1× Lua 5.4 1× 1× 1× Node.js 10.16 1× 1× 1× Perl 5.30 1× 1× 1× PHP 7.2 1× 1× 1× PyPy 7.1 (2.7) 1× 1× 1× PyPy 7.1 (3.6) 1× 1× 1× Python 2.7 1× 1× 1× Python 3.11 1× 1× 1× Ruby 2.7 1× 1× 1× Ruby 3.2 1× 1× 1× Rust 1.57 1× 1× 1× Swift 5.3 1× 1× 1× Whitespace 1× 1× 1× Python 3.7 1× 1× 1×