#K94842. Filter Alphanumeric Characters

    ID: 38731 Type: Default 1000ms 256MiB

Filter Alphanumeric Characters

Filter Alphanumeric Characters

Given a string containing a mixture of alphanumeric characters and special symbols, your task is to extract only the alphanumeric characters in their original order. For example, if the input is a1b!2@c#3$d^4&e*5, the output should be a1b2c3d4e5.

You are required to read the input from standard input (stdin) and write the result to standard output (stdout). The solution should effectively filter out any non-alphanumeric characters. The typical approach involves iterating through the string and checking each character using the condition \(\text{isalnum}(c)\).

inputFormat

A single line string provided via standard input (stdin).

outputFormat

A single line string that contains only the alphanumeric characters from the input, in the original order.## sample

a1b!2@c#3$d^4&e*5
a1b2c3d4e5