摘要: 引理 1. (a b) % c = ((a % c) (b % c)) % c. 2. &与运算,一般用于取位,如 a&1表示取a二进制下的个位 3. \ \ 位运算,表示右移,如\ \ 1表示除以2,比通常除法效率更高 4. $a^b = a^{b_0} a^{b_1 2} ... a^{b_n 阅读全文
posted @ 2018-01-15 21:05 HackHarry 阅读(204) 评论(0) 推荐(0) 编辑
摘要: "原题链接" 问题描述 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 t 阅读全文
posted @ 2018-01-15 20:34 HackHarry 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 问题描述 I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. 输入描述 The first line of the input con 阅读全文
posted @ 2018-01-15 20:21 HackHarry 阅读(104) 评论(0) 推荐(0) 编辑