算法求解(还没有人做出来,唉)

算法求解(还没有人做出来,唉)

Given an int m and a vector <int> a containing n numbers, return the result of the following expression:

算法求解(还没有人做出来,唉)_第1张图片

Notes

-

The expression is calculated from top to bottom.

-

"x mod y" means the remainder of x divided by y.

-

Assume 0! = 1.

Constraints

-

a will contain between 1 and 50 elements, inclusive.

-

Each element of a will be between 0 and 2147483647, inclusive.

-

m will be between 1 and 40000, inclusive.

你可能感兴趣的:(算法求解(还没有人做出来,唉))