快速幂
console.log( )
吾日三省吾身:这事能不能不干、这事能不能推给别人干、这事能不能明天干。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Pseudoprime numbers(快速幂取模)
DescriptionFermat's theorem states that for any prime number p and for any integer a > 1, ap = a (mod p). That is, if we raise a to the pth power and divide by p, the remainder is a. Some (but原创 2016-07-23 12:09:02 · 375 阅读 · 0 评论 -
快速幂+同余定理
DescriptionPeople are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Windows, and some like difficult mat原创 2016-07-23 12:11:00 · 699 阅读 · 0 评论 -
人见人爱A^B<>hdoj2035
Problem Description求A^B的最后三位数表示的整数。说明:A^B的含义是“A的B次方” Input输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1 Output对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。 Sample Input2原创 2016-07-23 12:13:27 · 350 阅读 · 0 评论 -
Key Set<hdoj5363>
Problem Descriptionsoda has a set S with n integers {1,2,…,n}. A set is called key set if the sum of integers in the set is an even number. He wants to know how many nonempty subsets of S are原创 2016-07-23 12:07:10 · 402 阅读 · 0 评论
分享