Problem: how many 7 - digits number are palindromic numbers ? a palindromic number reads the same forward and backward , example 1234321 .
Rationale: "take the task of building palindromes and break it intostages . stage 1 : select the 7 th digit we can choose 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , or 9 so , we can complete stage 1 in 9 ways stage 2 : select the 6 th digit we can choose 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , or 9 so , we can complete stage 2 in 10 ways stage 3 : select the 5 th digit we can choose 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , or 9 so , we can complete stage 3 in 10 ways stage 4 : select the 5 th digit we can choose 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , or 9 so , we can complete stage 4 in 10 ways important : at this point , the remaining digits are alreadylocked in . stage 5 : select the hundreds digit this digit must be the same as the thousands digit ( which we already chose in stage 2 ) so , we can complete this stage in 1 way . stage 6 : select the tens digit this digit must be the same as the thousands digit ( which we already chose in stage 2 ) so , we can complete this stage in 1 way . stage 7 : select the units digit this digit must be the same as the ten - thousands digit ( which we already chose in stage 1 ) so , we can complete this stage in 1 way . by thefundamental counting principle ( fcp ) , we can complete all 5 stages ( and thus build a 7 - digit palindrome ) in ( 9 ) ( 10 ) ( 10 ) ( 10 ) ( 1 ) ( 1 ) ( 1 ) ways ( = 9000 ways ) answer : d"
annotated_formula: multiply(multiply(multiply(multiply(7, const_10), const_10), const_10), const_10)