prompt: It takes a butterfly egg 120 days to become a butterfly. If each butterfly spends 3 times as much time as a larva as in a cocoon, how long does each butterfly spend in a cocoon?
messages.content: It takes a butterfly egg 120 days to become a butterfly. If each butterfly spends 3 times as much time as a larva as in a cocoon, how long does each butterfly spend in a cocoon?
messages.role: user
messages.content: Let c be the amount of time the butterfly spends in a cocoon and l be the amount of time it spends as a larva. We know that l = 3c and l + c = 120.
  Substituting the first equation into the second equation, we get 3c + c = 120.
  Combining like terms, we get 4c = 120.
  Dividing both sides by 4, we get c = 30.
  #### 30
messages.role: assistant