Finish each of the following sentences in such a way that it means exactly the same as the sentence printed before it
He had no idea how difficult the task would be until he was half way through it.
A.Only when he was half way through the task did he realize how difficult it was.
B.Only when he were half way through the task did he realize how difficult it was.
C.Only when he was half way through the task did he realize how difficult it had been.
D.Only when he was half way through the task had he realized how difficult it was.