Amazon Interview Question

stupid question to code and can't even run the code