数论
键盘崩坏
这个作者很懒,什么都没留下…
展开
-
HDU1019:Least Common Multiple
Problem Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 1原创 2014-08-09 17:54:09 · 371 阅读 · 0 评论 -
HDU1061:Rightmost 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 in原创 2014-08-09 18:54:37 · 372 阅读 · 0 评论 -
HDU1097:A hard puzzle(快速幂求模)
Problem Description lcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to this BT problem,so lcy makes the problem easier than begin.原创 2014-08-09 21:18:18 · 1386 阅读 · 0 评论 -
HDU1212:Big Number(大数求模)
#include #include int main() { char a[1000]; int b,len; while(~scanf("%s%d",a,&b)) { len=strlen(a); int mod=0; for(int i=0;i<len;i++) { mod*=10; mod+=a[i]-'0'; mod=mod%b; } }原创 2014-08-09 22:47:24 · 410 阅读 · 0 评论 -
HDU1164:Eddy's research I(素数筛选法)
Problem Description Eddy's interest is very extensive, recently he is interested in prime number. Eddy discover the all number owned can be divided into the multiply of prime number, but he can't wri原创 2014-08-09 22:07:42 · 421 阅读 · 0 评论