跳到正文

个人记录

位运算减

TGLXJ约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月12日
篇幅
约 1 分钟

版本

  1. v2当前
  2. v1

#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; b=(-b); int c; while(b){ c=a; a=a^b; b=(c&b)<<1; } printf(“%d”,a); return 0; }

原文