| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 69638 | 李琥博 | 十进制转二进制 | C++ | Wrong Answer | 1 MS | 268 KB | 219 | 2024-04-06 11:19:22 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,sh=1,i=0,s[32]={0}; cin>>n; while(n!=0){ sh=n/2; s[i]=n%2; n=sh; i++; } for(int j=i-1;j>=0;j--){ cout<<s[j]; } return 0; }
------Input------
0
------Answer-----
0
------Your output-----