| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 79627 | hby | 十进制转二进制 | C++ | Wrong Answer | 1 MS | 272 KB | 235 | 2024-07-09 10:33:32 |
#include<bits/stdc++.h> using namespace std; int main(){ int a; int s[100]={}; int ans=0; int k; cin>>a; int i=1; while(a!=0){ s[i]=a%2; i++; a/=2; } for(int j=i-1;j>=0;j--){ cout<<s[j]; } return 0; }
------Input------
972586684
------Answer-----
111001111110000111111010111100
------Your output-----
1110011111100001111110101111000