快速幂
文章平均质量分 74
Zhac
菜菜菜
展开
-
hdoj5363Key Set(快速幂+同余定理)
Description soda has a set with integers . 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 are key set. Input There are原创 2016-07-23 16:02:38 · 335 阅读 · 0 评论 -
poj1995Raising Modulo Numbers(快速幂+同余定理)
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 mathema原创 2016-07-23 16:20:42 · 249 阅读 · 0 评论 -
hdoj2035 人见人爱A^B(快速幂+同余定理)
Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1 Output 对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。 Sample Input 2 3 12 6 6789 10000 0 0 Sample Ou原创 2016-07-23 16:24:08 · 294 阅读 · 0 评论 -
hdoj1061 Rightmost Digit(快速幂+简单思路)
Description Given a positive integer N, youshould output the most right digit of N^N. Input The input contains several test cases. The first line of the input is a single integer T which is the原创 2016-07-23 16:26:03 · 347 阅读 · 0 评论 -
POJ -3641Pseudoprime 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 not v原创 2016-07-23 16:13:46 · 1852 阅读 · 0 评论