写出一个可以工作的程序并不够
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 阅读(1002) 评论(6) 编辑 收藏 引用 所属分类: 算法 、问题
好好想一想,幂与模的几个定理都忘了 你现在有些什么想法? 回复 更多评论
在想ing 有什么想法,交流交流 回复 更多评论
做出来有奖 回复 更多评论
看不到图了 回复 更多评论
@李锦俊 能看到阿,可能显示慢吧 回复 更多评论
看来,没人做出来啊 我只好贴答案咯 http://www.topcoder.com/tc?module=Static&d1=match_editorials&d2=srm283 回复 更多评论
Powered by: C++博客 Copyright © Dain