单项选择题

As it turned out to be a problem of no importance, we()so much time looking into it.

A. needn't spend
B. didn't have to spend
C. oughtn't to spend
D. needn't have spent