Question: Here's a complex question that requires someone to reason about the input, can you answer it? In what century was this castle erected that was destroyed and replaced several times and whose name is derived from the common Scottish surname Douglas?
Answer:
13th century