#176. 数字列表乘2筛选末位非2
数字列表乘2筛选末位非2
Number Processing and Filtering
Background
Congcong is currently learning how to process lists of numbers. He encountered an interesting problem that requires performing some operations and filtering on a given list of numbers.
Problem Description
Given a list of non-negative integers, return a new list containing the result of multiplying each number in the original list by , omitting any of the resulting numbers that end in .
Input Format
The input is given from standard input in the following format.
The input consists of a single line, representing a list of non-negative integers. The numbers in the list are separated by spaces.
Output Format
The output is printed to standard output in the following format.
The output consists of a single line, representing the processed list of integers. The numbers in the list are separated by commas and spaces, enclosed in square brackets
[].
Sample
1 2 3
[4, 6]
2 6 11
[4]
0
[0]
Sample Explanation
- Sample 1:
- (ends in , omitted)
- (kept)
- (kept)
- The final result is .
- Sample 2:
- (kept)
- (ends in , omitted)
- (ends in , omitted)
- The final result is .
- Sample 3:
- (kept)
- The final result is .
Constraints
Time limit: second, Memory limit: KiB for each test case.