colouring edges of an icosahedron in a certain way 
Find the number of ways to colour the 30 edges of an icosahedron with three colours so that for any triangular face, two edges are the same colour and the other is a different colour.

I think the answer is $2^{20}3^{10},$ but I'm not sure how to show this. Let $v$ and $w$ be antipodal vertices on the icosahedron. Let $S_v$ be the set of edges coincident with $v$ and $T_v$ be the set of edges coincident with the opposite end of two edges in $S_v$ that form a pentagon around $v.$ Define $S_w$ and $T_w$ similarly. Let $U$ be the set of $10$ remaining edges. There are $3^{10}$ ways to colour the edges of $U.$ Also, for each possible way, there are $2^{10}$ ways to colour the edges of $T_v$ and $T_w$; given an edge in $T_v \cup T_w,$ it forms a triangle with $2$ other edges in $U.$ This triangle may have two edges of the same colour, in which case we choose one of the $2$ remaining colours, and if the two edges are different colours, we choose one of the $2$ colours. However, I'm not sure how to show that there are $2^{10}$ ways to colour the edges of $S_v\cup S_w$.

This is Putnam 2017 problem A6; full solutions are here.  My solution (which Kedlaya quotes in a remark) is as follows.
Identify the three colors with the three elements of $\mathbb F_3 = \mathbb Z/3\mathbb Z$.  Then the "two of one color, one of another" condition is equivalent to "sum $\neq 0$".  This allows us to turn the question into a linear algebra problem.  Consider the linear transformation $f:  \mathbb F_3^{30} \to \mathbb F_3^{20}$ that takes a vector of 30 edge colors to the vector whose components are the sums of the elements of $\mathbb F_3$ surrounding each face.  We want the preimage of $\{1, 2\}^{20}$ under $f$.  Note that if $f$ is surjective, then $\ker f$ has dimension 10, so all fibers have cardinality $3^{10}$, and the answer is $2^{20} 3^{10} = 12^{10}$.
To prove that $f$ is surjective, it suffices to show that each standard basis vector (i.e. each vector consisting of a 1 on one face and zeroes everywhere else) is in its image.  This can be achieved by coloring the five edges around one vertex $2, 1, 2, 1, 2$ in order, and everything else 0.
