#159. 列表元素翻倍处理
列表元素翻倍处理
Double List Elements
Background
Congcong is learning list operations and wants to double each element in a given list of integers.
Problem Description
Given a list of integers, return a new list where each integer is multiplied by .
Input Format
Input is given from standard input in the following format.
A list of space-separated integers. The list may be empty.
Output Format
Output is printed to standard output in the following format.
A new list where each element is times the corresponding element in the original list. Elements are comma-separated and enclosed in square brackets
[].
Sample
[1 2 3]
[2, 4, 6]
[6 8 6 8 -1]
[12, 16, 12, 16, -2]
[]
[]
Sample Explanation
For the first sample input [1 2 3], each element in the list is multiplied by , resulting in [2, 4, 6].
Constraints
Time limit: second, Memory limit: KiB for each test case.