题意:http://www.lydsy.com/JudgeOnline/problem.php?id=1902 sol :一眼可以看出此题应用了lucas定理(逃~ 将n,m都化为p进制,记为a[],b[] 则对于我们所求的C(n,m)%p,有C(n,m)=∏ (i from 1 to n) (p^i)*(C(a[i],b[i]))%p 若C(n,m)为p的倍数,则存在某一位b[i]>a[i] 即此题要求有多少个<n的数,且其p进制下存在某一位比n的p进制的对应位大 求出a[]后直接数位dp…
Python的字符串格式化有两种方式: 百分号方式.format方式 百分号的方式相对来说比较老,而format方式则是比较先进的方式,企图替换古老的方式,目前两者并存.[PEP-3101] This PEP proposes a new system for built-in string formatting operations, intended as a replacement for the existing '%' string formatting operator. 1.百分号…