Pregunta de entrevista de KGI Securities

Birthday paradox, math and programming question