6 kyu
A for Apple
275 of 628sunboshan
Description:
- Input: Integer
n
- Output: String
Example:
a(4)
prints as
A
A A
A A A
A A
a(8)
prints as
A
A A
A A
A A
A A A A A
A A
A A
A A
a(12)
prints as
A
A A
A A
A A
A A
A A
A A A A A A A
A A
A A
A A
A A
A A
Note:
- Each line's length is
2n - 1
- Each line should be concatenate by line break
"\n"
- If
n
is less than4
, it should return""
- If
n
is odd,a(n) = a(n - 1)
, ega(5) == a(4); a(9) == a(8)
ASCII Art
Fundamentals
Similar Kata:
Stats:
Created | Aug 26, 2015 |
Published | Aug 26, 2015 |
Warriors Trained | 1812 |
Total Skips | 163 |
Total Code Submissions | 2957 |
Total Times Completed | 628 |
Ruby Completions | 65 |
Python Completions | 275 |
JavaScript Completions | 286 |
C Completions | 28 |
Total Stars | 55 |
% of votes with a positive feedback rating | 93% of 157 |
Total "Very Satisfied" Votes | 136 |
Total "Somewhat Satisfied" Votes | 19 |
Total "Not Satisfied" Votes | 2 |