#C6958. Triangle Numbers Sequence Concatenation

    ID: 50775 Type: Default 1000ms 256MiB

Triangle Numbers Sequence Concatenation

Triangle Numbers Sequence Concatenation

Given a non-negative integer \(n\), output the concatenation of the first \(n\) triangular numbers. The \(k\)-th triangular number is defined by the formula \(T_k = \frac{k(k+1)}{2}\). If \(n < 1\), output an empty string.

For example:

  • For \(n = 0\), the output is an empty string.
  • For \(n = 1\), the output is "1" because \(T_1 = 1\).
  • For \(n = 4\), the triangular numbers are \(1, 3, 6, 10\) and the output is "13610".

Read the input from standard input and write the output to standard output.

inputFormat

The input consists of a single integer \(n\) provided via standard input.

outputFormat

Output the concatenation of the first \(n\) triangular numbers as a string. If \(n < 1\), output an empty string.

## sample
0