RT,求助大佬
#include<bits/stdc++.h>
using namespace std;
int power_(int x){
if(x==0)return 1;
int t=1,cnt=0;
while(t<x){
t*=2;
cnt++;
}
cnt--;
printf("2");
if(cnt==0||cnt==2)printf("(%d)",cnt);
if(cnt>2){
printf("(");
power_(cnt);
printf(")");
}
x=x-t/2;
if(x>0){
t=1;cnt=0;
printf("+");
power_(x);
}
}
int main(){
int n;scanf("%d",&n);
power_(n);
return 0;
}