Scientists have come up with a winning formula for basketball teams looking to take home Olympic gold.