| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 75447 | 张誉腾 | 十进制转R进制 | C++ | Compile Error | 0 MS | 0 KB | 531 | 2024-05-26 17:53:50 |
#include<bits/stdc++.h> using namespace std; int main() { double n; cin>>n; int r; cin>>r; int z=n; double x=n-z; int b[32],cnt=0; while(z!=0) { int yu=z%r; b[cnt]=yu; cnt++; z/=r; } if(cnt==0) { cout<<0; } for(int i=cnt-1; i>=0; i--) { if(b[i]<10) { cout<<b[i]; }else{ b[i]+=55; cout<<(char)b[i]; } if(x!=0) { cout<<"."; } else { return 0; } for(int i=0; i<9; i++) { x=x*r; int xz=x; cout<<xz; x=x-xz; if(x==0) { break; } } }
Main.cc: In function 'int main()': Main.cc:43:1: error: expected '}' at end of input } ^