// m^n % k 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; }
posted on 2015-08-16 09:23 恶devil魔 阅读(116) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 恶devil魔 Powered by .NET 9.0 on Kubernetes