ahh yes sorry, I miss read the question but your technique is correct. I ended up getting the solution, the energy was 5 * 10^46 and it lasts for 120 seconds.
I didnt get around to editing the post, sorry about that.
Given the energy if sun were to instantly vaporize (using E = mc^2) = 2.7 x 10^47 J
( E = (mass of sun) * c^2)
how far would one have to be from a gamma ray burst is order for the average power from it to be equivalent to the average power from the sun's radiation at the earth (solar...