Submit | All submissions | Best solutions | Back to list |
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: * * * **** *..* *..* **** ***** *****
Added by: | kuszi |
Date: | 2012-09-03 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
hide comments
|
||||||||||
2017-11-24 07:25:42
***** *...* *...* *...* ***** coded it right way. i dont know whats the problem, it is showing wrong answer. |
||||||||||
2017-08-31 08:29:04
give the solution for the logic? |
||||||||||
2017-08-09 08:47:50
i have finished this problem with two conditional for every line 1.if it's the first character || the last character || the first line || the last line it wil print out '*' 2.else just print out '.' after print out the whole line ,print newline. and for each question needed to print a new line, the last problem doesn't need anyone |
||||||||||
2017-07-17 08:50:34
you just have to make a photo frame pattern. Like for case : 5 5 (l=5 and c=5) the pattern would be: ***** *...* *...* *...* ***** |
||||||||||
2017-07-13 21:49:30
has anyone completed this question? |
||||||||||
2017-06-06 12:14:20
What are the constraints on l and c? |
||||||||||
2017-06-04 17:06:40
test for case: 11 |
||||||||||
2017-06-03 14:49:04
what would be the o/p of 5 5 will it be ***** *..* *..* *..* ***** |
||||||||||
2017-05-27 06:35:07
what is the logic behind this prblm? |
||||||||||
2017-04-30 08:53:57
which algorithm it takes to solve ? |