An event is just a subset of the sample space. Build the event "outcome is divisible by k" and return it as a set.
k
solve({1, 2, 3, 4, 5, 6}, 2) -> {2, 4, 6}
Sign in to write and run your own code.
solve(...)