Submit | All submissions | Best solutions | Back to list |
PWAD - Plus Within a diamond |
Write a program that prints a diamond with a plus within it, given the integer height of the diamond. The outer-most shape is a normal diamond shape, the middle row of the shape will be a row filled with stars (making the horizontal dash of the plus sign), and in all the remaining rows the middle element of that row will have a star (making the vertical dash of the plus sign). Observe the following examples:
For n=11, the output will look like:
* *** * * * * * * * * * *********** * * * * * * * * * *** *
For n=7, the output will look like:
* *** * * * ******* * * * *** *
For n=3, the output will look like:
* *** *
For n=1, the output will look like:
*
Only consider odd sizes.
Added by: | Mussab ElDash |
Date: | 2012-03-26 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | GUC CSEN202 2012 Assignment |
hide comments
2013-04-13 20:58:34 (Tjandra Satria Gunawan)(曾毅昆)
solved using brainf**k ;-) btw, this problem has an issue: This problem isn't using exact judge, e.g. for n=11 print: "* *** * * * * * * * * * *********** * * * * * * * * * *** *" is accepted! I think it's better if someone fix this issue.. --ans(francky)-->Issue collected, I can't act on this. But I'll edit the body with some 'pre' and less 'bold'... Thanks. Last edit: 2013-04-13 21:13:39 |
|
2013-02-19 11:09:49 Miro Opiela
there is just one test case |
|
2012-04-04 10:39:40 MR. BEAN
move it to tutorial :) |
|
2012-04-03 13:35:35 rohitjv
tutorial |
|
2012-03-31 19:38:39 Better late than never !!!
move it to tutorial.... |
|
2012-03-31 15:40:27 Neeraj Bhat
getting correct on my system. still WA... why? |
|
2012-03-30 08:06:22 I_AM
This Does Not Deserve to be in the Classical Problems List. Please Move This to Tutorial...NOW!! |
|
2012-03-30 08:06:22 :D
REALLY must be moved to tutorial. There's nothing problematic here. Maybe using proper output routine, but that also makes a tutorial task. |
|
2012-03-30 08:06:22 Adhityaa
At least open for all the major languages (C, C++, Pascal etc.) |
|
2012-03-30 08:06:22 Ahmed AKram
xD |