#93. 生成指定范围整数序列

    ID: 93 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatArray-2gesp1循环结构

生成指定范围整数序列

Generate Integer Sequence

Background

Congcong is currently learning how to generate number sequences. He would like your help to write a program that can generate a specific integer sequence based on given start and end numbers.

Problem Description

Given start and end numbers, return a new array containing the sequence of integers from start up to but not including end. For example, if start=5 and end=10, the result is {5, 6, 7, 8, 9}. The end number end will be greater than or equal to the start number start. Note that a length-00 array is valid.

Input Format

Input is given from standard input in the following format.

start end

Output Format

Output should be printed to standard output in the following format.

[num1, num2, ..., numK]

Sample

5 10
[5, 6, 7, 8, 9]
11 18
[11, 12, 13, 14, 15, 16, 17]
1 3
[1, 2]

Sample Explanation

For the first sample, start is 55 and end is 1010. We need to generate an integer sequence starting from 55 and ending before 1010 (not including 1010), which is 5,6,7,8,95, 6, 7, 8, 9. Thus, the output is [5, 6, 7, 8, 9].

Constraints

Time limit: 1 second, Memory limit: 1024 KB.