C++ 实现正整数的 2 进制表示 (二进制幂次方表示)
#include
string powOf2(int n) {
if (n == 0) return '2(0)';
if (n == 1) return '2';
string res = '';
vector
int main() { int n; cin >> n; cout << powOf2(n) << endl; return 0; }
原文地址: https://www.cveoy.top/t/topic/o7IA 著作权归作者所有。请勿转载和采集!