CCC '03 J1 - Trident

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Problem type
Canadian Computing Competition: 2003 Stage 1, Junior #1

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

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

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.

Sample Input

4
3
2

Sample Output

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

Comments


  • 3
    no_u  commented on Aug. 16, 2019, 11:22 a.m.

    help


  • -1
    bt7274  commented on Nov. 2, 2018, 1:19 a.m.

    is this really j1 with a 49.2% success rate?1


    • 1
      Plasmatic  commented on Nov. 2, 2018, 2:59 p.m.

      A Low AC Rate doesn't necessarily have to mean anything


  • 4
    AnthonyQiu  commented on Oct. 4, 2018, 8:24 p.m.

    my code works in eclipse but not in DM:OJ? I'm pretty sure all the spacing is right


    • -2
      bt7274  commented on Nov. 2, 2018, 1:20 a.m.

      you should try using intellij


  • -5
    GD_FrostByte  commented on Sept. 9, 2018, 9:41 a.m.

    This comment is hidden due to too much negative feedback. Click here to view it.


  • 4
    ArtyKing12  commented on July 29, 2018, 6:50 p.m.

    Its not that bad, just organize your code :) Did it in a couple min


  • 31
    ricemvm  commented on Jan. 27, 2016, 2:07 p.m.

    This one is very challenging!


    • 9
      dawangk  commented on July 15, 2018, 7:10 p.m.

      This question should worth more than 3 points


    • -29
      1419903188  commented on Sept. 24, 2017, 2:39 p.m.

      This comment is hidden due to too much negative feedback. Click here to view it.


    • 22
      XIAOAGE  commented on Jan. 27, 2016, 2:51 p.m.

      yea, it is!!!


      • -5
        Dordor1218  commented on Jan. 30, 2018, 8:25 p.m.

        This comment is hidden due to too much negative feedback. Click here to view it.