Pregunta de entrevista de State Street

probability, and brain teaser, coding in r