Implement a Range-Based LCM Calculator