Skip to content

Baekjoon 10093

1. Problem

문제 확인하기

2. Solution

2-1. Python (memory: 36676KB, time: 88ms)

A, B = sorted(map(int, input().split()))
n = max(0, B - A - 1)
print(n)
if n > 0: print(*range(A + 1, B), end=' ')

2-2. Python (memory: 35892KB, time: 88ms)

A, B = sorted(map(int, input().split()))
n = max(0, B - A - 1)
print(n, *(range(A + 1, B)) if n else [])

2-3. Python (memory: 35892KB, time: 84ms)

A, B = sorted(map(int, input().split()))
n = max(0, B - A - 1)
print(n, *range(A + 1, B)) if n > 0 else print(n)