

Can I use Binary Exponentiation with this problem? (2^2^n + 1) mod k
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.

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!!!!)
Recommend
-
60
Go programming language invalid modular exponentiation result (Exp() in math/big pkg) Nmap Announce
-
43
PrefaceHi! My name is Alexander Borzunov . This article is the translation of my original publication . Sharing my work with Englis...
-
18
寫程式應該很常會用到指數運算,過去我們會用 Math.pow(),但在 ES2016 (ES7) 提供了 exponentiation operator (指數運算子) 的讓寫法更...
-
3
Solve almost every Binary Search ProblemBy Rahul Agarwal 24 July 2021Algorithms are an integral part of data science. While most of us data scientists don’t take a proper algorithms course while studying, they are importan...
-
6
POJ 1001 - Exponentiation | 眈眈探求 POJ 1001 - Exponentiation Time: 1000MS Memory: 10000K 难度:...
-
6
About exponentiation-distance on DAGs About exponentiation-distance on DAGs
-
5
Fast Exponentiation Using Bit Masking using C++ Filed Under: C++In this article, we will learn fast exp...
-
8
[Golang] Integer Exponentiation May 20, 2017 Integer exponentiation in Go programming language.
-
7
Guess.Who's blog Looking For Dp +...
-
2
22 June 2023
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK