DTCC Interview Question

Math pattern solving and debugging code