CPTTRN2 - Character Patterns (Act 2)
Using two characters: . (dot) and * (asterisk) print a frame-like pattern.
Input
You are given t - the number of test cases and for each of the test cases two positive integers: l - the number of lines and c - the number of columns of a frame.
Output
For each of the test cases output the requested pattern (please have a look at the example). Use one line break in between successive patterns.
Example
Input: 3 3 1 4 4 2 5 Output: * * * **** *..* *..* **** ***** *****
hide comments
vebblefetzer:
2017-03-11 20:43:19
hint: listen to instruction on output, there needs in fact to be one free newline between cases, the example output is wrong. Test for extremely small numbers, where no dot would fit in the frame. |
|
akshayborse:
2016-12-12 15:32:32
what's the limit of t,l,c
|
|
akshayborse:
2016-12-11 20:47:06
My program is running neatly and giving perfect answer....but still I am getting an error - runtime error(SIGSEGV).
|
|
dark_kn8:
2016-12-06 14:43:45
WTF i even put 2 line breaks instead of 1 for the last cast but still wrong |
|
rahadiankputra:
2016-09-28 10:17:28
Holy crapoly, the output!!! |
|
keshav_786:
2016-09-17 21:20:58
spoj must have the button for run code before submitting it. just to ensure our code is correct or not
|
|
amanharitsh:
2016-09-14 13:59:21
Whats is the correct way of taking input.....i m taking a two digit number and splitting the same using / and% functions ...m i doing something wrong
|
|
shub_ydv30:
2016-08-31 22:46:40
make sure to check for case
|
|
suyogkw:
2016-08-24 08:28:25
I even removed extra linebreak at bottom, Identical input and outputs. still saying wrong answer! |
|
kindresh:
2016-08-12 16:37:38
how to solve sigsevg error? |
Added by: | kuszi |
Date: | 2012-09-03 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |