Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
108074 | 张之隽 | 十进制转二进制 | C++ | Wrong Answer | 1 MS | 276 KB | 262 | 2025-01-19 14:20:48 |
#include<bits/stdc++.h> using namespace std; int y[32]; int cnt=0; int main(){ int n; cin>>n; while(1){ int yu=n%2; y[cnt]==yu; cnt++; n=n/2; if(n==0){ break; } } for(int i=cnt-1;i>=0;i--){ cout<<y[i]; } return 0; }
------Input------
972586684
------Answer-----
111001111110000111111010111100
------Your output-----
000000000000000000000000000000