int quickpow(int m,int n,int k) { int b = 1; while (n > 0) { if (n & 1) b = (b*m)%k; n = n >> 1 ; m = (m*m)%k; } return b; }
用2进制拆分理解这段代码
posted on 2014-10-02 11:22 DDUPzy 阅读(226) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2025 DDUPzy Powered by .NET 9.0 on Kubernetes