There is 1 way the first two digits can sum to 0. {00} There are 2 ways the first two digits can sum to 1. {01,10} There are 3 ways the first two digits can sum to 2. {02,11,20} There are 4 ways the first two digits can sum to 3. {03,12,21,30} There are 5 ways the first two digits can sum to 4. {04,13,22,31,40} There are 6 ways the first two digits can sum to 5. {05,14,23,32,41,50} There are 7 ways the first two digits can sum to 6. {06,15,24,33,42,51,60} There are 8 ways the first two digits can sum to 7. {07,16,25,34,43,52,61,70} There are 9 ways the first two digits can sum to 8. {08,17,26,35,44,53,62,71,80} There are 10 ways the first two digits can sum to 9. {09,18,27,36,45,54,63,72,81,90} There are 9 ways the first two digits can sum to 10. {19,28,37,46,55,64,73,82,91} There are 8 ways the first two digits can sum to 11. {29,38,47,56,65,74,83,92} There are 7 ways the first two digits can sum to 12. {39,48,57,66,75,84,93} There are 6 ways the first two digits can sum to 13. {49,58,67,76,85,94} There are 5 ways the first two digits can sum to 14. {59,68,77,86,95} There are 4 ways the first two digits can sum to 15. {69,78,87,96} There are 3 ways the first two digits can sum to 16. {79,88,97} There are 2 ways the first two digits can sum to 17. {89,98} There is 1 way the first two digits can sum to 18. {99} For each of those possible ways for the sum there are that same number of ways for the last two digits. Therefore, the number of possible trials in the worst possible scenario, is the sum of the squares: 1²+2²+3²+4²+5²+6²+7²+8²+9²+10²+9²+8²+7²+6²+5²+4²+3²+2²+1² The formula for the sum of the first n squares is n(n+1)(2n+1)/6 So the sum of 1²+2²+3²+4²+5²+6²+7²+8²+9² = 9(9+1)(2*9+1)/6 = 9(10)(19)/6 = 285 And the sum 10²+9²+8²+7²+6²+5²+4²+3²+2²+1² is 10² or 100 more or 385 Total 285+385 = 670 Edwin