5 ms·
For 11 there is an easier trick (or at least it's easier in that you can perform it in your head faster). Starting from the left add every other digit => n1, S
by cstejerean 19y ago
For 11 there is an easier trick (or at least it's easier in that you can perform it in your head faster).
Starting from the left add every other digit => n1, Starting with the second digit add every other digit => n2
if n1 - n2 == 0 or if n1 - n2 is divisible by 11 then the number is divisible by 11. Example
13574
1 + 5 + 4 = 10
3 + 7 = 10
Since 10 - 10 == 0, the number is divisible by 11.
Even cooler example 155357548018579643
1 + 5 + 5 + 5 + 8 + 1 + 5 + 9 + 4 = 43
5 + 3 + 7 + 4 + 0 + 8 + 7 + 6 + 3 = 43
43 - 43 == 0, also divisible by 11
- aston 19y agon1 - n2 == 0 or if n1 - n2 is divisible by 11 aka if n1 = n2 (mod 11) Cool trick.