
快速幂
console.log( )
吾日三省吾身:这事能不能不干、这事能不能推给别人干、这事能不能明天干。
展开
-
Pseudoprime numbers(快速幂取模)
Description Fermat'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 · 330 阅读 · 0 评论 -
快速幂+同余定理
Description People 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 · 646 阅读 · 0 评论 -
人见人爱A^B<>hdoj2035
Problem Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1 Output 对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。 Sample Input 2原创 2016-07-23 12:13:27 · 310 阅读 · 0 评论 -
Key Set<hdoj5363>
Problem Description soda 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 · 351 阅读 · 0 评论