#abc129f. [abc129_f]Takahashi's Basics in Education and Learning

[abc129_f]Takahashi's Basics in Education and Learning

有一等差数列,首项为 AA,公差为 BB,长度为 LL

现在把这个数列中所有数拼起来(e.g. 3,7,11,15,19>371115193,7,11,15,19->37111519)。

问拼起来的这个数 modM\bmod M 的值。

1L,A,B1018,1M1091\le L,A,B \le 10^{18},1\le M\le 10^9