4734 - 如何优雅地求和

有一个多项式函数 f(x),最高次幂为x^m,定义变换 Q:

现在给定函数 f 和 n, x,求 Q(f) mod 998244353。

Input

Output

Examples

Input

4 1 332748118
0 1

Output

332748119
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题