Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
162361 李俊博 十进制转二进制 C++ Accepted 1 MS 272 KB 243 2026-10-17 14:09:21

Tests(20/20):


Code:

#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; string s=""; if(n==0){ cout<<0; return 0; } for(int i=1;n!=0;i++){ int time=n%2; s=char(time+'0')+s; n/=2; } cout<<s; return 0; }