fork download
  1. n=2**input()
  2. exec'print int(bin(n)[:1:-1],2)/2;n+=1;'*n
Success #stdin #stdout 0.01s 9016KB
stdin
3
stdout
0
4
2
6
1
5
3
7