topic
LeetCode - 326. Power of Three
Topic Link
https://leetcode.com/problems/power-of-three/
Reference blog
Problem-solving ideas
Solution twenty-one start intend to use $ 3 ^ {log_3N} == N $, determines whether a power of 3, is utilized after rounding to the end, and then restored. However, pow arithmetic, floating point arithmetic, and log time, there will be loss of precision. C language number is the log base e, serious loss of precision when calculating the recommended number of base 10 to log10.
Problem-solving Source
- A Solution
1 |
class { |
- Solution two
1 |
class { |