#177. 数字处理与筛选
数字处理与筛选
Number Processing and Filtering
Background
Congcong is playing a number game. He has a list of integers and needs to perform a series of operations on each number in the list, then filter the final results according to specific rules.
Problem Description
Given a list of integers, return a new list. Each number in the new list is the square of the corresponding number from the original list plus . Additionally, any resulting numbers that end in or should be omitted.
Input Format
Input is given from standard input in the following format.
A list of integers, with integers separated by spaces and enclosed in square brackets
[].
Output Format
Output should be printed to standard output in the following format.
A list of processed and filtered integers, with integers separated by a comma and space
,and enclosed in square brackets[].
Sample
[3 1 4]
[19, 11]
[1]
[11]
[2]
[14]
Sample Explanation
Sample 1:
For input [3 1 4]:
- For : . does not end in or , keep.
- For : . does not end in or , keep.
- For : . ends in , omit.
Final result is
[19, 11].
Sample 2:
For input [1]:
- For : . does not end in or , keep.
Final result is
[11].
Sample 3:
For input [2]:
- For : . does not end in or , keep.
Final result is
[14].
Constraints
Time limit for each test case is second, and memory limit is KiB.