算法求解(還沒有人做出來,唉)
Given an int m and a vector <int> a containing n numbers, return the result of the following expression:
|
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. |
posted on 2006-12-21 10:58 Dain 閱讀(1008) 評論(6) 編輯 收藏 引用 所屬分類: 算法 、問題