Re: [閒聊] 每日leetcode
看板Marginalman作者DJYOMIYAHINA (通通打死)時間10月前 (2025/01/16 23:16)推噓0(0推 0噓 2→)留言2則, 2人參與討論串1288/1553 (看更多)
哀
我的身心靈都受到重創
程式就是我的Mortis
我快壞掉了
def xorAllNums(self, nums1: List[int], nums2: List[int]) -> int:
ans = 0
if len(nums2)%2 == 1:
for num in nums1:
ans = ans ^ num
if len(nums1)%2 == 1:
for num in nums2:
ans = ans ^ num
return ans
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.229.37.69 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1737040596.A.C71.html
→
01/16 23:18,
10月前
, 1F
01/16 23:18, 1F
→
01/16 23:19,
10月前
, 2F
01/16 23:19, 2F
討論串 (同標題文章)
完整討論串 (本文為第 1288 之 1553 篇):