#F. 快速幂(二)

    Type: Default 1000ms 256MiB

快速幂(二)

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

已知数列 a1,a2……an和C

计算 (a1a2……*an)%C的结果

Input

第一行是两个整数 n,C.

Output

接下来一行有n个整数,代表a1,a2,……,an; 2<=n<=100,1<ai,C<2的60次方

Samples

2 123456789987654321
123456789123456789 987654321123456789
54869682945130317

Limitation

1s, 1024KiB for each test case.

素数筛及快速幂训练

Not Claimed
Status
Done
Problem
7
Open Since
2022-12-22 0:00
Deadline
2022-12-29 23:59
Extension
24 hour(s)