3 ms·
> I'm surprised gcc can't figure out that this is NUMBER * (NUMBER-1) Huh? Do you mean NUMBER instead? If it were s += i then that would be NUMBER * (NUMBER-1)
by bigdict 6y ago
> I'm surprised gcc can't figure out that this is NUMBER * (NUMBER-1)
Huh? Do you mean NUMBER instead? If it were s += i then that would be NUMBER * (NUMBER-1) / 2.
- martincmartin 6y agoYou're right, I forgot the / 2.