Al-Kahf - 18:12

ثُمَّ بَعَثْنَاهُمْ لِنَعْلَمَ أَيُّ الْحِزْبَيْنِ أَحْصَى لِمَا لَبِثُوا أَمَدًا
[18:12]
Then We raised them up that We might know which of the two parties was best able to compute the time for which they remained.
Then We roused them, in order to test which of the two parties was best at calculating the term of years they had tarried!
And afterward We raised them up that We might know which of the two parties would best calculate the time that they had tarried.