| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 147695 | 王艺豪 | 十进制转二进制 | C++ | Accepted | 1 MS | 276 KB | 267 | 2026-02-07 11:19:22 |
#include<bits/stdc++.h> using namespace std; int main(){ int x; cin>>x; int a[32]; int b=0; for(int i=0;;i++){ int num=x; x=x/2; a[i]=num-2*x; b++; if(x==0){ break; } } for(int i=b-1;i>=0;i--){ cout<<a[i]; } return 0; }