平衡三进制
#include <iostream>
using namespace std;
void f(int x) {
if (x == 0) return;
if (x%3 == 2) f(x/3 + 1), cout << 'z';
else if (x%3 == -2) f(x/3 - 1), cout << '1';
else if (x%3 == -1) f(x/3), cout << 'z';
else f(x/3), cout << x%3;
}
int main() {
int n;
cin >> n;
if (n == 0