4. In a certain city, the fare scheme for traveling by metro with a card is as follows: the first trip costs 50 rubles, and each subsequent trip costs either the same as the previous one or one ruble less. Petya spent 345 rubles on several trips, and then on several subsequent trips - another 365 rubles. How many trips did he make?

![](https://cdn.mathpix.com/cropped/2024_05_06_2b53449d0d9627520abfg-1.jpg?height=328&width=350&top_left_y=1408&top_left_x=1213)
Solution. A total of 710 rubles was spent. The total number of trips could not have been 14 or less (for 14 trips, a maximum of 700 rubles could be spent), but it also could not have been 17 or more $(50+49+48+\cdots+35+$ $34=714$, and this is the minimum that could be spent). Therefore, the choice is between two options - 15 or 16 trips.

Notice that 345 rubles could have been spent only over 7 trips (for 8 trips, a minimum of $50+49+48+47+46+45+$ $44+43=372>345$ could be spent, while for 6 trips - a maximum of $6 \cdot 50=300365$.

Answer: 15 times.