Description
任何一个正整数都可以用2的幂次方表示。例如137=27+23+2^0,由此可知,137可表示为
2(7)+2(3)+2(0),而7又可以表示为:2(2)+2+2(0).3可以表示为:2+2(0)因此137最终表示为:
2(2(2)+2+2(0))+2(2+2(0))+2(0)
Input
一个正整数n(n≤20000)。
Output
符合约定的n的0,2表示(在表示中不能有空格)
Sample Input
1315
Sample Output
2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0)
#include <bits/stdc++.h>
using namespace std;
int a[20];
void f(int n)
{
int i,k;
while(n)//注意
{
for(i=1;i