| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 162369 | 十进制转二进制 | C++ | Accepted | 1 MS | 272 KB | 230 | 2026-10-17 14:17:24 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,i=-1; cin>>n; string s=""; if(n==0){ cout<<n; } for(int i=0;n!=0;i++){ int temp= n%2; s=char(temp+'0')+s; n/=2; } cout<<s; return 0; }