Question: A ship full of grain crashes into a coral reef. By the time the ship is fixed, 49,952 tons of grain have spilled into the water. Only 918 tons of grain remain onboard. How many tons of grain did the ship originally contain?

Solution program:
from sympy import symbols, solve
x = symbols("x")
answer = solve(49952+918-x)
print(answer)

Answer: 50870