#170. 列表数字过滤:移除末位为9

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

列表数字过滤:移除末位为9

Filter Numbers Not Ending with 9

Background

Dawei is organizing a list of numbers. He dislikes numbers ending with 99 and wants your help to remove them from the list.

Problem Description

Given a list of non-negative integers, return a new list containing all numbers from the original list that do not end with 99. A number ends with 99 if its remainder when divided by 1010 is 99.

Input Format

Input is given from standard input in the following format.

The input consists of a single line containing several non-negative integers, separated by spaces.

Output Format

Output is printed to standard output in the following format.

The output should be a single line representing the filtered list of numbers. Numbers in the list should be separated by commas and spaces, enclosed in square brackets []. If the list is empty, output [].

Sample

1 2 19
[1, 2]
9 19 29 3
[3]
1 2 3
[1, 2, 3]

Sample Explanation

For Sample 1, the input list is [1, 2, 19]. The number 1919 ends with 99, so it is removed. The final list is [1, 2]. For Sample 2, the input list is [9, 19, 29, 3]. The numbers 9,19,299, 19, 29 all end with 99, so they are removed. The final list is [3]. For Sample 3, the input list is [1, 2, 3]. None of the numbers end with 99, so all are kept. The final list is [1, 2, 3].

Constraints

The time limit for each test case is 11 second, and the memory limit is 10241024 KiB.