//土尔逊Torson 编写于2023/5/03 #define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <vector> #include <stdlib.h> using namespace std; int main() { unsigned int n; while (scanf("%d",&n)!=EOF) { vector<int> binary; while (n != 0) { binary.push_back(n % 2); n /= 2; } for (int i = binary.size() - 1; i >= 0; --i) {//逆序输出 printf("%d", binary[i]); } printf("\n"); } system("pause"); return EXIT_SUCCESS; } // 64 位输出请用 printf("%lld")