Your computer kept switching off, and you're only asking about it now? for all we know it could have been over heating and the motherboard could be shot
hopefully that is not the case, but there's a good chance your powersupply is faulty. try another one if you can