#C13548. Lucas Numbers Sequence Generation

    ID: 43098 Type: Default 1000ms 256MiB

Lucas Numbers Sequence Generation

Lucas Numbers Sequence Generation

Given an integer n, generate the first n terms of the Lucas numbers sequence. The Lucas series is defined as follows:

  • \( L_0 = 2 \)
  • \( L_1 = 1 \)
  • For \( n \ge 2, L_n = L_{n-1} + L_{n-2} \)

If the input n is zero or negative, the program should output nothing (an empty output).

Your program should read the input from standard input and output the sequence to standard output. The numbers in the sequence should be separated by a single space.

inputFormat

The input consists of a single integer n provided on one line, representing the number of terms of the Lucas sequence to generate.

outputFormat

If n is greater than 0, output the first n Lucas numbers separated by a space on one line. If n is non-positive, output nothing.

## sample
0