Answer:
12
Step-by-step explanation:
The first cave has 7 times more bats than the last cave. So if the 45th cave has b bats, then the first cave has 7b bats.
There are 77 bats in every row of 7 caves. So if there are 7b bats in the first cave, then there are 77−7b bats in caves 2 through 7.
Since there are also 77 bats in caves 2 through 8, that means cave #8 must have 7b bats. Repeating this logic:
#1 = 7b
#2-#7 = 77−7b
#8 = 7b
#9-#14 = 77−7b
#15 = 7b
#16-21 = 77−7b
#22 = 7b
#23-28 = 77−7b
#29 = 7b
So the first 29 caves have 5(7b) + 4(77−7b) = 308 + 7b bats.
Now we do the same thing from the other end. If cave #45 has b bats, then caves #39-#44 have 77−b bats. And since caves #38-44 have 77 bats, then cave #38 has b bats. Therefore:
#45 = b
#39-44 = 77−b
#38 = b
#32-37 = 77−b
#31 = b
So caves 31 through 45 have 3b + 2(77−b) = 154 + b bats.
Adding that to the first 29 caves, plus x number of bats in cave #30:
308 + 7b + x + 154 + b = 462 + 8b + x
We know this equals 490.
490 = 462 + 8b + x
28 = 8b + x
x is a maximum when b is a minimum, which is b = 2.
28 = 8(2) + x
x = 12
There are at most 12 bats in the 30th cave.