|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|1 초||1024 MB||54||19||15||55.556%|
As a worker at the local mall, you have to set out the Christmas ornaments display. The display setup is a triangular pyramid, with the top layer containing one ball, the second from the top containing three, and so on. Each layer’s side length will be equal to their layer number. Write a program to determine the total number of ornaments in a pyramid, given the number of layers.
The first line will contain a single integer n that indicates the number of data sets that follow. Each data set will consist of a single line containing one integer, denoting the number of layers in the pyramid.
Output the total number of ornaments in the pyramid.
2 1 4