RT

为什么会全TLE?
有优化方法吗?
求大神赐教!
#include <iostream>
#include <string>
#define TEXT string
using namespace std ;
int n ;
string Go (int x, int i = 0, string s = TEXT (" "))
{
if (x == 0) return TEXT ("0") ;
do
{
if (x & 1)
{
s = (i == 1 ? "2" : "2("+ Go (i) + ")") +
(s == "" ? "" : "+") + s ;
}
}
while (i ++ , x >> 1) ;
}
int main ()
{
cin >> n ;
cout << Go (n) << endl ;
return 0 ;
}