CF1051E.Vasya and Big Integers

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

The first line contains a single integer a (1a101000000)a~(1 \le a \le 10^{1000000}) .

The second line contains a single integer l (0l101000000)l~(0 \le l \le 10^{1000000}) .

The third line contains a single integer r (0r101000000)r~(0 \le r \le 10^{1000000}) .

It is guaranteed that lrl \le r .

It is also guaranteed that numbers a,l,ra, l, r contain no leading zeros.

输入格式

Print a single integer — the amount of partitions of number aa such that they match all the given requirements modulo 998244353998244353 .

输出格式

In the first test case, there are two good partitions 13+513+5 and 1+3+51+3+5 .

In the second test case, there is one good partition 1+0+0+0+01+0+0+0+0 .

输入输出样例

  • 输入#1

    135
    1
    15
    

    输出#1

    2
    
  • 输入#2

    10000
    0
    9
    

    输出#2

    1
    

说明/提示

In the first test case, there are two good partitions 13+513+5 and 1+3+51+3+5 .

In the second test case, there is one good partition 1+0+0+0+01+0+0+0+0 .

首页