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.

搜索and数论

Not Claimed
Status
Done
Problem
8
Open Since
2024-11-4 0:00
Deadline
2024-11-11 23:59
Extension
144 hour(s)