标签:rmi etc mat return ati code class style strong
Given an integer, write a function to determine if it is a power of three.
Follow up:
Could you do it without using any loop / recursion?
public class Solution { public boolean isPowerOfThree(int n) { return (Math.log10(n)/Math.log10(3))%1==0; } }
leetcode_326 Power Of Three(Binary Manipulation)
标签:rmi etc mat return ati code class style strong
原文地址:http://www.cnblogs.com/ytq1016/p/6755492.html