Xceedance Interview Question

basic subject and tricky puzzles