求
,其中 1≤A,B≤5×103,p=109+71\le A,B\le 5\times 10^3,p=10^9+71≤A,B≤5×103,p=109+7。
样例:
A=0,B=0,ans=1A=0,B=0,ans=1A=0,B=0,ans=1 A=2,B=2,ans=26A=2,B=2,ans=26A=2,B=2,ans=26 A=3,B=6,ans=754A=3,B=6,ans=754A=3,B=6,ans=754
值得注意的是,这里的组合数不要看反……