I think it is already discussed. Let me derive the answer for you. Let the pirates are ranked as a,b,c,d,e. If there are 2 pirates, that is a & b, then a will take all the gold as he votes for himself and get 50% votes.
If there are 3 pirates, that is a,b,c then a will bribe c with 1 gold.c will probably accept it and vote him.Because if a is dead and b divides the share then c won't get any.So in this case, a will have 99 gold coins.
If there are 4 pirates,that is a,b,c,d then a will bribe c with the same 1 gold because of the above reason.So in this case too,a will have 99 coins.
If there are 5 pirates, then a will bribe c and e as they wont get any shares if a is dead.In this case both will get 1 gold from a.So a will have 98 gold coins.
