此题的数据范围是可以直接求解的,建议将数据范围改为 n,m≤1011n,m \le 10^{11}n,m≤1011,这样可以卡掉不用卢卡斯定理的暴力求解。 如: input:
1 191978201 102030432 2333
output:
0