精華區beta Marginalman 關於我們 聯絡資訊
勝這種題目能給我一點信心了 一二三四五 def getDecimalValue(self, head: Optional[ListNode]) -> int: ans = 0 while head: ans = ans*2 + head.val head = head.next return ans -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.132.58.28 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1752505756.A.305.html
sustainer123: 大師 剩我連這種都不會了 07/14 23:11
rainkaras: 大師 07/14 23:13