0710编程之美二进制扩展问题

xiaoxiao2021-02-28  126

#include<iostream> using namespace std; int main() { int a, b; while (cin >> a >> b) { int count = 0; int c = a^b; while (c) { c &= c - 1; count++; } cout << count << endl; } cin.get(); return 0; }
转载请注明原文地址: https://www.6miu.com/read-23207.html

最新回复(0)