![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学
Sunshine_暮雲似海
这个作者很懒,什么都没留下…
展开
-
ACM杭电1005 Number Sequence
Problem Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of f(n). In原创 2015-04-05 18:31:07 · 407 阅读 · 0 评论 -
ACM 线段上格点的个数
给定平面上的2个格点p1=(x1,y1)和p2=(x2,y2),线段p1p2上,除p1和p2以外一共有几个格点? 限制条件: -10^9 样例输入:第一行p1第二行p2 输出一行 输入: 1 11 5 3 输出: 2,9 3,7 4,5 这道题可以直接检查所有满足条件min(x1,x2)原创 2015-05-21 22:38:25 · 1500 阅读 · 0 评论