Leetcode - Power of Two
Leetcode - Power of Four

Leetcode - Power of Three

violet posted @ Jun 09, 2020 12:37:47 AM in 算法 with tags Algorithm Golang math , 375 阅读

https://leetcode.com/problems/power-of-three/

Given an integer, write a function to determine if it is a power of three.

Example 1:

Input: 27
Output: true

Example 2:

Input: 0
Output: false

 

func isPowerOfThree(n int) bool {
    return n > 0 &&  1162261467 % n == 0
}
uan login 说:
Dec 25, 2022 08:55:53 PM

The Employees Provident Fund Organization (EPFO) managing by Central Board trustees and Employee Provident Fund Scheme under Employees’ Provident Funds and Miscellaneous Provisions Act 1952, EPF is a scheme which is useful for all the employees and maintained by EPFO, uan login under this scheme of Employee Provident Fund (EPF) an employee should have to pay a certain contribution towards the scheme, equal contribution is paid by the employer.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter