| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 69630 | 殷震博 | 十进制转二进制 | C++ | Wrong Answer | 1 MS | 268 KB | 253 | 2024-04-06 11:02:35 |
#include<bits/stdc++.h> using namespace std; int main(){ int q[32]={0}; int c=0; int a; cin>>a; for(int i=0;a!=0;i++){ q[i]=a%2; c++; a/=2; } for(int i=c-1;i>=0;i--){ cout<<q[i]; } if(a==0){ cout<<a; } return 0; }
------Input------
972586684
------Answer-----
111001111110000111111010111100
------Your output-----
1110011111100001111110101111000