DWITE '12 R1 #1 - Candy Piles

View as PDF

Submit solution

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

Problem type
DWITE, October 2012, Problem 1

After collecting a lot of candy this Halloween, the most obvious next step is to organize it into piles and draw graphs of the loot. Of course.

The input will contain 5 lines, each a single positive integer describing the height of candy piles.

The output will contain an ASCII drawing of the piles of candy. A triangle of asterisks will approximate such piles. Refer to the sample below.

Sample Input (first 3 shown)

2
1
3

Sample Output (first 3 shown)

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

Problem Resource: DWITE

Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported

Comments


  • 4
    codeHH698  commented on July 1, 2021, 6:53 p.m.

    "(first 3 shown)" ahem