Another programming contest asks to solve the Josephus problem . Bad Perl solution (83 characters... so close...) >perl -e" @_=(1..$ARGV[0]);++$c%$ARGV[1]?$i++:splice@_,$i%=@_,1while$#_;print@_ " 40 3 28 EDIT: got it down to 80. >perl -e" @_=(1..shift);++$c%$ARGV[0]?$i++:splice@_,$i%=@_,1while$#_;print@_
Read More...