Q136.h 341 B

1234567891011121314151617181920212223
  1. //
  2. // Created by 李洋 on 2023/10/14.
  3. //
  4. #ifndef LEECODE_C_Q136_H
  5. #define LEECODE_C_Q136_H
  6. #include <vector>
  7. using namespace std;
  8. class Q136 {
  9. public:
  10. int singleNumber(vector<int> &nums) {
  11. int count = 0;
  12. for (int i: nums) {
  13. count ^= i;
  14. }
  15. return count;
  16. }
  17. };
  18. #endif //LEECODE_C_Q136_H
备用站点 当前处于降级运行的备用站点,仅供应急访问,数据和功能可能不是最新。