Exam time is solved by using Euler's totient function