Background \text{Background} Background
I’ve accepted
\text{I've accepted}
I’ve accepted
a very good problem
\text{ a very good problem }
a very good problem
about High-Precisions and become
\text{about High-Precisions and become}
about High-Precisions and become
a little interested in it. (Copy my templates.)
\text{a little interested in it. (Copy my templates.)}
a little interested in it. (Copy my templates.)
Description \text{Description} Description
Given interger
N
,
k
.
Please compute
k
N
.
\text{Given interger }N,k.\text{ Please compute }^k\sqrt{N}.
Given interger N,k. Please compute kN.
Solution \text{Solution} Solution
The easiest way I’ve got first is binary search.
\text{The easiest way I've got first is binary search.}
The easiest way I’ve got first is binary search.
To binary search for answer. For each answer
a
, use Quick-Power to
\text{To binary search for answer. For each answer }a\text{, use Quick-Power to }
To binary search for answer. For each answer a, use Quick-Power to
compute
a
k
.
\text{compute }a^k.
compute ak.
Time-complexity is
O
(
log
n
2
k
)
.
\text{Time-complexity is }O(\log n^2k).
Time-complexity is O(logn2k).