JPMorganChase Interview Question

Coding questions - contiguous integers