Pregunta de entrevista de PayPal

Logic and math based puzzle