326. Power of Three--LeetCode Record
Given an integer, write a function to determine if it is a power of three.
Follow up:
Could you do it without using any loop / recursion?
水!
func isPowerOfThree(n: Int) -> Bool {
// 1162261467 is 3^19, 3^20 is bigger than int
return ( n>0 && 1162261467%n==0);
}
相關文章
- Leetcode 326. Power of ThreeLeetCode
- react-recordReact
- Daily record-SeptemberAI
- oracle function powerOracleFunction
- 實戰 Java 16 值型別 Record - 2. Record 的基本用法Java型別
- pl/sql record 詳解SQL
- delete duplication record in sql serverdeleteSQLServer
- UFS之Power Mode
- Power Profiles for AndroidAndroid
- E. Expected Power
- Shichikuji and Power Grid
- IBM Power5&Power6小型機 HMC預設IPIBM
- Java 16 新特性:record類Java
- Erlang中的Record詳解
- 淺析 record 使用場景
- Record It for Mac錄屏軟體Mac
- Java 21 新特性:Record PatternsJava
- 脫離rails 使用Active RecordAI
- Homework record-Simple sorting
- gorm忽略報錯: record not foundGoORM
- DRIVER_POWER_STATE_FAILUREAI
- 精讀《Microsoft Power Fx》ROS
- Power BI入門教程
- Postpartum dragon power pills in londonGo
- Leetcode Power of TwoLeetCode
- ASCII in oracle, masking power onASCIIOracle
- 填空題回答(Power Query)
- CMD和power shell命令
- 155_模型_Power BI & Power Pivot 進銷存之安全庫存模型
- Warning:dns_get_record():AtemporaryservererroroccurredDNSServerError
- Record for Individual Project ( Word frequency program )Project
- Using Statspack to Record Explain Plan DetailsAI
- record:記錄(帶名元組)
- 不好分類的好題Record
- Camera List Record - 120
- Oracle OCP 1Z0 053 Q74(ASM POWER ASM_POWER_LIMIT)OracleASMMIT
- Power Shell 常用命令
- 【矩陣乘法】Matrix Power Series矩陣