Yandex Interview Question

math statistics, probability theory (50/50).