/// Pbinfo - #4708 /// Formula : n * 2^(n-1) #include using namespace std; ifstream cin("subsets.in"); ofstream cout("subsets.out"); struct nrMare{ int a[10000] = {0}; void operator = (int n) { do {a[++a[0]] = n%10, n/=10;} while(n); } void operator *= (int x) { int t = 0; for(int i = 1;i<=a[0];i++,t/=10) t+=a[i]*x, a[i] = t%10; while(t>0) a[++a[0]] = t%10, t/=10; } void afisare() { for(int i = a[0];i>0;i--) cout<>n; nrMare sol; sol = n; while(p+10<=n-1) sol*=(1<<10),p+=10; while(p+1<=n-1) sol*=2,p++; sol.afisare(); return 0; }