AMD interview question

prime problem;