C++快速输出一个整数的二进制表示(不用写函数)时间:2023-03-09 07:10:43 如果要输出int型的整数x,代码为: cout << bitset<>(x) << endl; 如果要输出long long型的整数x,代码为: cout << bitset<>(x) << endl;