Without Loop ...!!

0

0 votes
Problem

Print a sequence of numbers starting with N where A[0] = N, without using loop, in which  A[i+1] = A[i] - 5,  until A[i] > 0. After that A[i+1] = A[i] + 5  repeat it until A[i] = N.

(without using for loop, while loop, do-while loop)

Input

The first line contains integer n as input.

Output

Print the required sequence.

Constraints

1  <= N <= 10000

Sample Input
16
Sample Output
16 11 6 1 -4 1 6 11 16
Time Limit: 0.2
Memory Limit: 256
Source Limit:
Editor Image

?