Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
163901 李昱龙 正整数N转换成一个二进制 C++ Accepted 2 MS 276 KB 188 2026-10-31 14:33:26

Tests(5/5):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int m,c=0; cin>>m; string s1; while(m>0){ char c=m%2+'0'; s1=c+s1; m=m/2; } cout<<s1; return 0; }