摘要: 快乐数 题目链接202. 快乐数 - 力扣(LeetCode) class Solution { public: int getSum(int n){ int sum = 0; while(n){ sum += (n % 10) * (n % 10); n /= 10; } return sum; 阅读全文
posted @ 2022-11-08 23:57 凱風快晴 阅读(26) 评论(0) 推荐(0)
摘要: 两个数组的交集 链接349. 两个数组的交集 - 力扣(LeetCode) class Solution { public: vector<int> intersection(vector<int>& nums1, vector<int>& nums2) { unordered_set<int> r 阅读全文
posted @ 2022-11-08 00:00 凱風快晴 阅读(22) 评论(0) 推荐(0)