Add tags

Add tags to the following comment
へんなことしたら思惑とは反対にすごく長くなった・・・。
あきらめて改行と空白で整形しとく
 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
}

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...