there are two ways:
1:
a=a+b;
b=a-b;
a=a-b;
//in this case,  if a or b is a very big number, a+b maybe will overflow.

2:
a=a^b;
b=a^b;
a=a^b;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2021-08-31
  • 2021-06-18
  • 2021-11-10
  • 2022-12-23
猜你喜欢
  • 2021-10-16
  • 2022-12-23
  • 2021-07-03
  • 2022-02-28
  • 2022-12-23
  • 2021-10-10
  • 2021-07-19
相关资源
相似解决方案