Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
103925 万隽宇 十进制转二进制 C++ Wrong Answer 1 MS 284 KB 444 2025-01-02 19:22:03

Tests(3/20):


Code:

#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; }


Run Info:

------Input------
0
------Answer-----
0
------Your output-----