Yeah, sure, this question is simple as it is.

But when I submit my code using:

'''

public boolean isPowerOfThree(int n) {

double f = Math.log(n)/Math.log(3);

return ((f-Math.floor(f))==0)?true:false;

}

'''

This code can't pass all test cases such as 243.

But when I change function 'log' with 'log10', it was accepted !

What the hell is this?