Does "difficulty" mean the same thing in these two sentences?

They agreed about the difficulty of the climb.

Finished the test only with great difficulty.
different meanings