| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 75332 | 何嘉乐 | 十进制转二进制 | C++ | Wrong Answer | 0 MS | 272 KB | 277 | 2024-05-26 16:34:57 |
#include<bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int b[32],cnt=0; while(a!=0){ int c=a%2; b[cnt]=c; cnt++; a=a/2; } if(a==0){ cout<<0; } for(int i=cnt-1;i>=0;i--){ cout<<b[i]; } return 0; }
------Input------
972586684
------Answer-----
111001111110000111111010111100
------Your output-----
0111001111110000111111010111100