It is given in the question that the least count of the stop watch is 1 second. Therefore the error in t (i.e. deltta t) should be 1 second.
Also we know that time period 't' means the total time taken for 1 ossilation. Here the time taken for 1 ossilation is 40/20=2 seconds. Therefore the time period should be 2 seconds and so the error % in g should be 100%. Could you please explain where am I wrong?