Submit solution
Points:
3 (partial)
Time limit:
2.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Java
Given an integer , print all even numbers between and on one line and all odd numbers between and on another line.
Input Specification
The first and only line will contain a single integer .
Output Specification
The first line of output will contain all integers between and , inclusive, that are even, separated by a space.
The second line of output will contain all integers between and , inclusive, that are odd, separated by spaces.
Sample Input 1
4
Sample Output 1
2 4
1 3
Sample Input 2
10
Sample Output 2
2 4 6 8 10
1 3 5 7 9
Comments