Zend certified PHP/Magento developer

100% errors from memtest86 after series of power surges; more likely to be motherboard or RAM?

The power grid where I live is unreliable, and we frequently have interruptions (and presumably surges). I usually have a UPS protecting my desktop computer, but my prior UPS developed a fault and I stupidly ran my computer for 2-3 weeks on only a belkin power strip (which claims surge protection, but tbd).

In any case, the computer started developing strange issues that initially manifested as USB devices not being found. I tested the USB hubs and devices on another computer and found no problems.

I decided to reinstall the OS, just in case something had shaken loose in the drivers. UEFI was unable to find the boot partition, and I couldn’t boot.

On a whim I ran memtest86, and sure enough I found 100% errors. I tested each of my four DIMMs individually, and in different memory slots, and in each case am getting a 100% error rate.

So, is it more likely:
a) That the motherboard is fried in some way
b) That the DIMMs are bad

Buying hardware isn’t exactly fast here. Also, my CPU is an i7, and there’s a diminishing number of motherboards around that’ll fit it (I believe) so motherboard swap may imply a new CPU, which’ll be spendy.