Problem: if a fast song has 160 beats per minute , and a slow song has 90 beats per minute , how many minutes total would you play a fast and a slow song to have a stream of music that had a total of 1020 beats ?
Rationale: we can determine quickly that total number should range between 1020 / 160 < = n < = 1020 / 90 , so ans should be between 6 and 12 . now solving the expression 160 a + 90 b = 1020 decreasing 1020 by multiples of 160 and checking divisibility of that number by 9 , we get fast song plays for 3 minutes and slow somg plays for 6 minutes , 3 * 160 + 6 * 90 = 1020 hence total number of minutes stream of music plays is 3 + 6 = 9 minutes ans d
annotated_formula: add(floor(multiply(divide(1020, add(160, 90)), const_2)), const_1)