#C13986. Fibonacci Sequence Up To N

    ID: 43584 Type: Default 1000ms 256MiB

Fibonacci Sequence Up To N

Fibonacci Sequence Up To N

Given a non-negative integer \(n\), your task is to print all Fibonacci numbers that are less than or equal to \(n\).

The Fibonacci sequence is defined as follows:

\(F_0 = 0\), \(F_1 = 1\) and for \(n \ge 2\), \(F_n = F_{n-1} + F_{n-2}\).

If the input is negative, output the exact message: "Input must be a positive integer".

inputFormat

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

outputFormat

Output all Fibonacci numbers less than or equal to (n), separated by a single space, via standard output (stdout). If (n) is negative, output "Input must be a positive integer" instead.## sample

0
0