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

来源:互联网 发布:java注解使用场景 编辑:程序博客网 时间:2024/04/28 04:32

题目描述:

                          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

 

 

 

原创粉丝点击