in reply to mini-golf: convert integer into list of powers of two
# 1 2 3 4 5 # 12345678901234567890123456789012345678901234567890123456789 perl -E'$n=pop;while(2**$i<=$n){$_.=2**$i.",";$i++}chop;say' + 31 1,2,4,8,16
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: mini-golf: convert integer into list of powers of two
by tobyink (Canon) on May 23, 2012 at 22:01 UTC |