Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
103925 | 万隽宇 | 十进制转二进制 | C++ | Wrong Answer | 1 MS | 284 KB | 444 | 2025-01-02 19:22:03 |
#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,a[10000]; cin>>x; while(x!=0){ a[i]=x%2; x=(x-x%2)/2; i++; } for(int c=i-1;c>=0;c--){ cout<<a[c]; } return 0; }
------Input------
0
------Answer-----
0
------Your output-----