If you have, in fact, mistakenly formatted the system disk, there may be recovery utilities you can burn to a bootable CD/DVD that include an unformatter. I've never used an unformatter, so I can't vouch for quality or effectiveness.
If you were running Windows 10 all you need to do is download the Windows 10 installation ISO file and burn it to a DVD, or a bootable USB key.
AFAIK, all windows 10 computers register a hash of certain unique identifiers with Microsoft, and when your computer goes to "Activate" Microsoft will match the hash with the one it stored when Lenovo installed the OS, (or you upgraded from 7/8 to 10) and you're off and running.
Any data and applications however will be lost if you reinstall windows.