精華區beta Marginalman 關於我們 聯絡資訊
寫了一個機八 對不起== 看起來要先判power of 2 再檢查是不是奇數位 姆咪 def isPowerOfFour(self, n: int) -> bool: return False if n<=0 else (n&1431655765)==n and ((n&1431655765)&((n& 1431655765)-1))==0 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.132.58.28 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1755266327.A.B81.html
sixB: 三天都easy 完全沒動力 我好恨 08/16 01:20