| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 155259 | 陈骏睿 | 十进制转R进制 | C++ | Compile Error | 0 MS | 0 KB | 492 | 2026-06-06 12:15: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,x,er[33]={},i=0,y; cin>>a>>x; if(a==0)cout<<0; while(a!=0){ y=a%x; a/=x; i++; if(er[i]>=10)y='0'='A'-10; else y+=0; } for(int j=i-1;j>=0;j--)cout<<er[i]; return 0; }
Main.cc: In function 'int main()':
Main.cc:15:26: error: lvalue required as left operand of assignment
if(er[i]>=10)y='0'='A'-10;
^