HDOJ水题
文章平均质量分 53
qq_38294039
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdoj1097水题
输入 有多个测试用例。每个测试用例由两个数字a和b组成(0 产量 对于每个测试用例,您应输出a ^ b的最后一位数字。 样品输入 7 66 8 800 样品输出 9 6 找到规律就很简单啊! #include using namespace std; int原创 2017-07-30 11:32:50 · 494 阅读 · 0 评论 -
HDOJ1058 Humble Numbers
Problem Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the f原创 2017-07-28 11:55:14 · 211 阅读 · 0 评论 -
求最大公约数算法
1.辗转相除法 int gcd(int m,int n) { int t; while (n > 0) { t = m%n; m = n; n = t; } return m; } 2. c=min(a,b) for(int i=c;i>0;i--) { if((a%i==0&&b%i==0)) k=i; //k原创 2017-07-26 16:34:29 · 297 阅读 · 0 评论 -
HDOJ1004让气球飞吧
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest i原创 2017-07-25 22:18:56 · 541 阅读 · 0 评论 -
HDOJ1098
数学归纳法 f(x)= 5 * x ^ 13 + 13 * x ^ 5 + k * a * x f(x+1)= 5 * (x+1) ^ 13 + 13 * (x+1) ^ 5 + k * a * (x+1)按二项式展开 f(x+1)=5*(C(13,13)X^13+C(13,12)X^12+C(13,11)X^11+......+C(13,0))+13*(C(5,5)X^5+C(原创 2017-07-30 15:38:22 · 306 阅读 · 0 评论 -
HDOJ1164
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原创 2017-07-30 23:34:49 · 310 阅读 · 0 评论
分享