3 ms·
Unrelated, you can square quickly a (reasonably small) number ending in 5: multiply the number without the 5 to the number one larger and append 25 to it. Examp
by lkozma 15y ago
Unrelated, you can square quickly a (reasonably small) number ending in 5: multiply the number without the 5 to the number one larger and append 25 to it. Example:
85*85 = (8*9).25 = 7225
- onemoreact 15y agoDid you mean it's only fast when it's a small number, or does it fail at some point? EX: works for 10005^2 and 12345^2.
- lkozma 15y agoIt works for any number, I meant "reasonably small", because for those it can be done mentally.
- onemoreact 15y agoCool, thanks I was sitting there trying to think why it would fail for large numbers. But, (x * 10 + 5)^2 = x * x * 10 * 10 + 2 * x * 50 + 25 = x * (x + 1) * 100 + 2 .
- onemoreact 15y agoedit '+ 2 .' should be '+ 25.' so: (x * 10 + 5)^2 = x * x * 10 * 10 + 2 * x * 50 + 25 = x * (x + 1) * 100 + 25.