# Leetcode - Power of Four

violet posted @ Jun 09, 2020 12:38:52 AM in 算法 with tags Algorithm Golang math , 289 阅读

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

Given an integer (signed 32 bits), write a function to check whether it is a power of 4.

Example 1:

```Input: 16
Output: true
```

```func isPowerOfFour(num int) bool {
return num > 0 && (num & (num - 1)) == 0 && (num - 1) % 3 == 0
}```
TBSE 11th Model Pape 说:
Aug 16, 2022 06:16:57 PM

Numerous courses are offered by this board, and it also administers tests to students in this state. Each year, thousands of students participate in these exams. Numerous students will take part in the class 11 examinations this year, and the Tripura Board 11th class Important Question Paper 2023 will be released as soon as it is ready. TBSE 11th Model Paper 2023 based on data from the prior year supplied by the Tripura Board of Higher Secondary, It has been discovered that six blind pupils and three prisoners both passed Tripura's higher secondary (+2) test. Numerous kids will take part in the class 11th examinations this year, which were also administered by this board, and they will wait afterward.

AP SSC Urdu Question 说:
Sep 17, 2022 01:20:30 AM

Urdu is one of the main languages in the state, and this is the first language for Urdu Medium students, there are fewer schools are working in all districts of the state, all the applicable students also can download AP SSC Urdu Model Paper 2023 Pdf in chapter wise for all lessons of the course, AP SSC Urdu Question Paper download, and practice the Ibtedai Question bank to get better rank in all exams conducted by BSEAP. Urdu is one of the main languages in the state, and this is the first language for Urdu Medium students, there are fewer schools are working in all districts of the state, all the applicable students also can download AP SSC Urdu Model Paper 2023 Pdf in chapter wise for all lessons of the course.

(输入验证码)
or Ctrl+Enter