洛谷不能在 cout 里出现\b吗?
代码:
#include <iostream>
using namespace std;
void f(int x,int y) {
if (x == 0) {
return;
}
f(x >> 1, y + 1);
if (x & 1) {
if(y==0)
cout << "2(0)+";
else if(y==1)
cout << "2+";
else {
cout << "2(";
f(y, 0);
cout << "\b)+";
}
}
return;
}
int main() {
int n;
cin >> n;
f(n,0);
cout << "\b ";
return 0;
}
在线IDE里面对应位置都是乱码。。。