[BOJ 6903] Trident

View as PDF

Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 128M

Problem type
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

A trident is a fork with three tines (prongs). A simple picture of a trident can be made from asterisks and spaces:</p>

        
    
**
   
   
   
   

In this example, each tine is a vertical column of 3 asterisks. Each tine is separated by 2 spaces. The handle is a vertical column of 4 asterisks below the middle tine.

Tridents of various shapes can be drawn by varying three parameters: $t$, the height of the tines, $s$, the spacing between tines, and $h$, the length of the handle. For the example above we have $t = 3$, $s = 2$, and $h = 4$.

You are to write an interactive program to print a trident. Your program should accept as input the parameters $t$, $s$, and $h$, and print the appropriate trident. You can assume that $t$, $s$, $h$ are each at least 0 and not larger than 10.

입력 형식

출력 형식

예제 입력

4
3
2

예제 출력

*   *   *
*   *   *
*   *   *
*   *   *
*********
    *
    *

Comments

There are no comments at the moment.