Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
103922 | 万隽宇 | 十进制转二进制 | C++ | Wrong Answer | 1 MS | 268 KB | 364 | 2025-01-02 19:14:04 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int x,i=0; cin>>x; while(x!=0){ cout<<x%2; x=(x-x%2)/2; } return 0; }
------Input------
972586684
------Answer-----
111001111110000111111010111100
------Your output-----
001111010111111000011111100111