326.Power of Three
/*
Given an integer, write a function to determine if it is a power of three.
*/
bool isPowerOfThree(int n) {
return(n>0 && 1162261467%n==0);
}
/*
Given an integer, write a function to determine if it is a power of three.
*/
bool isPowerOfThree(int n) {
return(n>0 && 1162261467%n==0);
}
题目描述: 给定一个整数,写一个函数来判断它是否是 3 的幂次方。 示例 1: 输入: 27 输出: true 示例 2: 输入: 0 输出: false
[welcome to my blog][] LeetCode Top Interview Questions 326. Power of Three (Java版;
Topic Math Description [https://leetcode.com/problems/power-of-three/][https_l
/ @param {number} n @return {boolean} / var isPowerOfTwo = function(n) {
Power of Three Given an integer, write a function to determine if it is a power of th
Given an integer, write a function to determine if it is a power of three. Follow up:
1.题目 Given an integer, write a function to determine if it is a power of three. Foll
/ Given an integer, write a function to determine if it is a power of three.
Given an integer, write a function to determine if it is a power of three. Follow up:
题目 判断是否为3的幂 Given an integer, write a function to determine if it is a power of thre
还没有评论,来说两句吧...