#C13303. Square Elements and Bar Chart

    ID: 42827 Type: Default 1000ms 256MiB

Square Elements and Bar Chart

Square Elements and Bar Chart

The task is to process a list of integers by squaring each element and, in the process, generate a bar chart to visually compare the original values with their squared values. Mathematically, for each element (x) in the list, you must compute its square (x^2). Although the primary output is the list of squared numbers printed on a single line, the problem also requires a graphical representation (bar chart) of the transformation. Note that the bar chart is for visualization purposes only.

inputFormat

The input is provided via stdin and consists of two lines. The first line contains a single integer (n) (where (n \geq 0)) that denotes the number of integers in the list. The second line contains (n) space-separated integers.

outputFormat

Print the squared values in one line, separated by a single space, to stdout. For an empty list (i.e. when (n = 0)), output an empty line.## sample

5
1 2 3 4 5
1 4 9 16 25

</p>