#159. 列表元素翻倍处理

    ID: 159 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatFunctional-1gesp1循环结构数学基础

列表元素翻倍处理

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 22.

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 22 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 22, resulting in [2, 4, 6].

Constraints

Time limit: 11 second, Memory limit: 10241024 KiB for each test case.