Amazon Interview Question

math questions were useless, made no sense