2

Can I use Binary Exponentiation with this problem? (2^2^n + 1) mod k

 1 year ago
source link: http://codeforces.com/blog/entry/107325
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Can I use Binary Exponentiation with this problem? (2^2^n + 1) mod k

with (0≤n≤231−1)(0≤n≤231−1) caculate: (22n+1)(22n+1) mod k (1≤k≤106)(1≤k≤106) i'm doing an exercise on mods for large numbers, i don't know if there is a more efficient solution than using binary exponentiation? Hope to help you, thanks (sorry for my bad english!!!!)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK