Add code for computing the resistance in XKCD's Nerd Sniping comic.