摘要: 类的声明 class Stock//某人持有的股票 { private://私有成员,只能通过公用方法间接访问 std::string company;//股票所属公司 long shares;//持股数量 double share_value;//股票单价 double total_value;/ 阅读全文
posted @ 2020-04-29 22:55 StreamAzure 阅读(225) 评论(0) 推荐(0)
摘要: 快速幂 原理 求$a^b$。 例如,$b=11$时,其二进制为$1011$,又有$11=23\times 1+22 \times 0+21 \times 1+20 \times 1$ 所以 \[ a^{11}=a^{2^3+2^1+2^0}​ \] 从而 \[ a^{11}=a^{2^3} \tim 阅读全文
posted @ 2020-04-29 18:07 StreamAzure 阅读(152) 评论(0) 推荐(0)