| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 155236 | 陈骏睿 | 十进制转二进制 | C++ | Compile Error | 0 MS | 0 KB | 462 | 2026-06-06 10:46:12 |
#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(n==0)cout<<0; while(n!=0){ er[i]=n%2; n/=2; i++; } for(int j=i-1;j>=0;j--){ cout<<er[j]; } return 0; }
Main.cc: In function 'int main()':
Main.cc:10:8: error: 'n' was not declared in this scope
if(n==0)cout<<0;
^
Main.cc:11:11: error: 'n' was not declared in this scope
while(n!=0){
^