Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Perl circular list

Language: Layout:
+ ] Show input
Absolute running time: 0.2 sec, cpu time: 0.14 sec, memory peak: 3 Mb, absolute service time: 0,21 sec 
edit mode |  history  | discussion
1,2,3,4,5,6,7,8,9,10
1 killed 2 and passed sword to 3
3,4,5,6,7,8,9,10,1
3 killed 4 and passed sword to 5
5,6,7,8,9,10,1,3
5 killed 6 and passed sword to 7
7,8,9,10,1,3,5
7 killed 8 and passed sword to 9
9,10,1,3,5,7
9 killed 10 and passed sword to 1
1,3,5,7,9
1 killed 3 and passed sword to 5
5,7,9,1
5 killed 7 and passed sword to 9
9,1,5
9 killed 1 and passed sword to 5
5,9
5 killed 9 and is last man standing!!