I've just built a brand new pc, whenever I try to turn it on, it shuts off within about a second. I've never actually had any dead hardware before, so I'm not 100% sure that the CPU is dead, but I've done a few tests, this is what happens:
Bench test - the same thing happens when I bench test, it starts and then shuts off immediately. I know the motherboard isn't shorting out on anything.
Removing the RAM - when I remove the RAM, it will start and stay on. The speaker also gives the long beeps that it should, indicating there is no memory.
Replacing the RAM - I bought another brand of RAM, when I put it in, it goes back to the original problem of not staying on.
Unplugging the CPU from the PSU - if I unplug the 8 pin 12v connector from the motherboard (heatsink fan is still plugged in), the computer will start and stay on, but obviously not do anything (no post beeps, no output, nothing).
Removing other unnecessary hardware - I've unplugged and removed everything except for the CPU and RAM from the motherboard and PSU, the computer will still not stay on.
Resetting BIOS / CMOS - I've taken out the BIOS battery, I've also try resetting the CMOS, but it still won't stay on after either of these.
I don't have any spare, compatible hardware, so I can't replace anything to see what fixes it, I'm just kind of making some guesses as to what isn't working. Since it doesn't work with just the necessary hardware, I don't believe the psu is dead. Because I can hear the post beeps when there is no RAM, I don't think it's the motherboard. Unless I happened to get two dead sticks of RAM (possible, but unlikely), I don't think it's the RAM that's dead.
I'm sure that some of you guys have a lot more / better experience with hardware than I do. Has anyone encountered something like this before, or thinks they know what the problem is? Is there anything else that I should test?

Being a scientist is never having to say you're sorry.