This page is still under construction.

Parts of this page are still being built. What you see may change.

Most Frequent Smallest Number

Time limit1sMemory limit256 MB

Summary
Print how many integers lie strictly between the two given integers, then list them in ascending order.
Level

Easy1 of 10

Topics
Implementation
Solved
No attempts yet

Problem

두 양의 정수가 주어졌을 때, 두 수 사이에 있는 정수를 모두 출력하는 프로그램을 작성하시오.

Input

두 정수 A와 B가 주어진다.

Output

첫째 줄에 두 수 사이에 있는 수의 개수를 출력한다.

둘째 줄에는 두 수 사이에 있는 수를 오름차순으로 출력한다.

Examples4

  1. Example 1

    Input
    8 14
    
    Expected output
    5
    9 10 11 12 13
    
  2. Example 2

    Input
    5
    1
    1
    1
    2
    2
    
    Expected output
    1
    
  3. Example 3

    Input
    3
    5
    5
    5
    
    Expected output
    5
    
  4. Example 4

    Input
    6
    1
    2
    2
    3
    3
    3
    
    Expected output
    3