Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
155238 陈骏睿 十进制转二进制 C++ Runtime Error 1 MS 272 KB 462 2026-06-06 10:47:05

Tests(0/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 a,er[17]={},i=0; cin>>a; if(a==0)cout<<0; while(a!=0){ er[i]=a%2; a/=2; i++; } for(int j=i-1;j>=0;j--){ cout<<er[j]; } return 0; }


Run Info:

*** stack smashing detected ***: ./Main terminated