How long do you use it on your pc? Maybe not long enough to hit the issue?
I love logitech mice but the cord wear is their Achilles heel. Usually over time wear will cause a break in the cable where the cable meets the mouse. Then it will work intermittently until it eventually fails. I've went through this with two logitech mice and I expect my g400 to eventually have this issue. If it turns out this is what the problem is, logitech has a good warranty. You can contact them for a repair/replacement. If you're out of warranty and are handy with a soldering iron you may be able to repair this yourself by clipping away a small portion of the cable near the mouse and re soldering it to the pcb. I do not recommend lolpop's suggestion of opening the mouse to check the solder points, it's likely that they will look fine and opening your mouse voids your warranty if it's still active. Only open the mouse if you intend to do what I suggested above when the warranty isn't an option.