2013年东北赛B题(数位DP)

题目描述:

                          Number Pairs

 

              Time Limited 1000ms     Memory Limited 16M

 

Description:

     Edward finds some Edward Number Pairs,which are defined below:

                                        

           what's more A and B only contains the digitals of p's digitals. For example,if p is

     14,then A and B only contains the digitals of 1 and 4.

     Now,you have to help Edward to calculate the number of Edward Number Pairs.

 

Input:

     There are multiple test cases,Each test case contains one integer p in one line.(1<=p<100)

 

Output:

           Calculate the number of Edward Number Pairs.Output the answer in one line after mod 10007.

 

 

Sample Input:

9

 

Sample output:

1

 

 

 

你可能感兴趣的:(2013年东北赛B题(数位DP))