Problem 18 time calc