As a giver of said compliments, I think it depends on which situation you're in. I completely understand why you would be annoyed/upset by people saying this who are scoring better than you, but some of my friends genuinely work 10 times harder than me, and the results show it. I truly do wish that I had a work ethic like they did, I have a really hard time motivating myself to study and when I do, it's usually last minute cramming before an assignment or an exam (like today, for me). Some of my friends have been at uni studying since 8 or 9 this morning non-stop while I've been at home trying to read notes while playing games and listening to music. The type of self-motivation that my friends have is something I've been trying to develop, and I guess I am complimenting them on their self-discipline and focus, rather than feeling superior to them or anything (not that I have any reason to feel superior given my current grades

)
In any case, I wouldn't think everyone who praises you for working hard is actually gloating that they're beating you with minimal effort, or whatever. Some of them might just be trying to encourage you, or make you feel better in some way. I mean, what would you rather them say? 'Oh yeah, I beat you cos my study plan is more effective than yours and I'm naturally smarter than you as well'?
I dunno, if it really irritates you I suppose you could try not talking about your own marks, and eventually people will stop giving you those remarks. You could tell people that you're happy with your mark, and that you'd rather not talk about it too much. You'd be surprised how quickly people forget about pestering you with SAC talk when you reply to every question about your mark with 'I did OK, I'm pretty happy with my mark' with a big sincere grin on your face.
