Integer22. N seconds have passed since the beginning of the day (N is an integer). Find the number of seconds since the last hour.

Solution in Python 3:

import random

N = random.randrange(0,86400)
#N = 150
print("Number of seconds: ", N)
x = N%3600
print("Seconds since the last hour: ", x)