Solved task1(alarm-clock)