Infosys interview question

basic logical and quant