+ 3
Challenge 5: 100 people and a Sword.
Well This is a version of Ace's challenge. There are 100 people and one sword. The first kills the next two and hands the sword to the fourth one who also kills the next two. This continues till there is just one person left. Write a code to display who killed whom, who killed the most people, and who survived. The people can kill one person in case there are only two left(The killer and the victim).
11 odpowiedzi
+ 6
just modify the original one
https://code.sololearn.com/cx0F28cKt8ni
-------------------------------------
wait, i didn't notice that the killer-victim relation should also be displayed...
let me think for a while...
-------------------------------------
ok, now i've completed all requirements
+ 8
It won't change the algorithm much though
+ 6
gotta do it like this
https://code.sololearn.com/WPs84GQozGc0/?ref=app
+ 4
Well Here they kill two people...
+ 4
yeah I know
+ 3
I used math and got the answer to be 82, armed with notepad and Python IDLE 3.6.1. Publishing a code to show it...
+ 3
What?
So am I wrong?
+ 3
yeah @Scarlet, I also got 70.
so no need for my web version.
0
Well Vengat, your code gives me an error.