CPSC120B
Fundamentals of Computer Science I

Post-lab 18

Strings

Details

Create a function called summation_less_than(max_sum). This function should return the largest number of sequential integers that sum to less than the specified positive integer max_sum. Put another way, return the \(n\) such that:

$$(\sum_{i=0}^n i) < max\_sum$$