Sort:  

Hmm, why are you multiplying the user's HP by the number of eligible voters in the country?

So I can divide by total HP.
This must be AI...

Hmm, I don't understand the logic behind that math.

I would think you would calculate it something like this:

weight_of_1_HP = 1 / total_HP
weight_of_1_vote_for_country = 1 / country.eligible_voters
weight_of_1_HP_for_country = weight_of_1_HP / weight_of_1_vote_for_country
account_HP_vote_weight_compared_to_country = account_HP * weight_of_1_HP_for_country

I see what you did there.
(1 / total_HP) / (1 / country.eligible_voters) = country.eligible_voters / total_HP