C# no loop solution


  • 4
    W
    public class Solution {
        public bool IsPowerOfThree(int n) {
            if(n<1) return false;
            int max=1162261467;
            return max%n==0;
        }
    }

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.