Energy = power × time
1800 = 300 × time
time = 1800 ÷ 300 = 6 s
Hope it helped!
The answer is a constraint
The period of a simple pendulum is given by:

where L is the length of the pendulum and g is the gravitational acceleration.
The pendulum in our problem makes one complete vibration in 0.333 s, so its period is T=0.333 s. Using this information, we can re-arrange the previous formula to find the length of the pendulum, L: