technohippy #7454(2008/08/28 04:46 GMT) [ Ruby ] Rating0/0=0.00
へんなことしたら思惑とは反対にすごく長くなった・・・。 あきらめて改行と空白で整形しとく
1 2 3 4 5 6 7 8 9 10
n=gets.to_i; i=s=2**n-1; r=0; (n*2-1).times{ r<<=1; r|=(s&1); s>>=1; r&=i; puts r.to_s(2).split('').map{|e|['','*'][e.to_i]}.join }
Rating0/0=0.00-0+
[ reply ]
technohippy #7454() [ Ruby ] Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]