快速幂
Never_Say-Never
这个作者很懒,什么都没留下…
展开
-
hdoj5363Key Set
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 ofS are原创 2016-07-23 16:06:41 · 314 阅读 · 0 评论 -
POJ3641
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 n原创 2016-07-23 16:19:04 · 279 阅读 · 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 mathe原创 2016-07-23 16:33:20 · 246 阅读 · 0 评论 -
hdoj1061Rightmost Digit
Problem Description Given a positive integer N, you should 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原创 2016-07-23 16:52:45 · 288 阅读 · 0 评论