Bending Spoons Interview Question

Tasks of logic, probability and coding