Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This blog post has moved to https://matthewvaneerde.wordpress.com/2009/07/29/bad-perl-josephus-problem/
Comments
- Anonymous
July 29, 2009
76 I believe (wc -m says so perl -e '@A=1..$ARGV[0];while($A[1]){$j=shift@A;push(@A,$j)if(++$i)%$ARGV[1]}print@A' 12 3 Pat