Red pill and blue pill

Report a typo

In the Matrix (a universe the humanity is unknowingly trapped inside, a simulated reality where intelligent machines have been created to distract humans while using their bodies as an energy source), we need only two types of pills: red or blue to select our destiny. Neo must select his to find the path. You have a list of pills of different colour, and you must filter out only the red and blue ones and help Neo to solve his dilemma.

Sample Input 1:

blue red orange black

Sample Output 1:

[blue, red]
Write a program in Kotlin
fun main() {
val list = readln().split(" ")
// write your code here
val res =


println(res)
}
___

Create a free account to access the full topic