摘要: dfs: 代码比bfs简洁一点,稍微比bfs快一点。 class Solution { private: int res = 0; int get(int x) { int ans = 0; while(x) { ans += x % 10; x /= 10; } return ans; } voi 阅读全文
posted @ 2023-08-15 22:35 luxiayuai 阅读(16) 评论(0) 推荐(0)