JPMorganChase interview question

Coding questions - contiguous integers