摘要: 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... 阅读全文
posted @ 2018-07-26 16:01 浮生惘语 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1using namespace std;long long PowerMod(long long a, long lon... 阅读全文
posted @ 2018-07-26 14:09 浮生惘语 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Xinlv wrote some sequences on the paper a long time ago, they might be arithmetic or geometric sequences. The numbers are not very cle... 阅读全文
posted @ 2018-07-26 14:06 浮生惘语 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 集训进行了将近2个礼拜,这段时间以恢复性训练为主,我一直在密切关注大家的训练情况,目前为止,对大家的表现相当满意,首先是绝大部分队员的训练积极性很高,其次,都很遵守集训纪律,最后,老队员也起到了很好的带头作用,这里特别感谢为这次DP专题练习赛提供题目和测试数据的集训队... 阅读全文
posted @ 2018-07-26 14:04 浮生惘语 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer N, you should output the most right digit of N^N. InputThe input contains several test cases. The first line ... 阅读全文
posted @ 2018-07-26 14:00 浮生惘语 阅读(77) 评论(0) 推荐(0) 编辑
摘要: People are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, other... 阅读全文
posted @ 2018-07-26 13:57 浮生惘语 阅读(70) 评论(0) 推荐(0) 编辑