document.write( "Question 1204708: In the USA, ZIP codes are used as an alternative to the postcode system
\n" ); document.write( "used in the UK. A ZIP code is a five-digit number which may start with a
\n" ); document.write( "zero - so there are, in total, 100 000 possible ZIP codes, from 00000 to
\n" ); document.write( "99999.
\n" ); document.write( "Some ZIP codes are ambiguous, meaning that, when shown on a digital
\n" ); document.write( "display, they would show a different code if read the wrong way up.
\n" ); document.write( "For example, 10118 (which happens to be the ZIP code for the Empire
\n" ); document.write( "State building in New York), if read upside-down, would be 81101 (the
\n" ); document.write( "ZIP code for Alamosa, a town in Colorado), so both 10118 and 81101 are
\n" ); document.write( "ambiguous ZIP codes.
\n" ); document.write( "Given that the figures used on a digital display are the ones shown
\n" ); document.write( "below (0 1 2 3 4 5 6 7 8 9), determine the total number of non-ambiguous ZIP codes.
\n" ); document.write( "

Algebra.Com's Answer #841159 by math_tutor2020(3817)\"\" \"About 
You can put this solution on YOUR website!

\n" ); document.write( "Here's the list of possible digits when using a digital display (think of an alarm clock)
\n" ); document.write( "Another term for it is called seven-segment display because we need at most 7 lines to form the digits 0 through 9
\n" ); document.write( "
\n" ); document.write( "Image Source
\n" ); document.write( "https://codegolf.stackexchange.com/questions/151125/mirrored-digital-clock\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "0,1, and 8 can be rotated 180 degrees about the center and the digits won't change (as mentioned in the instructions).
\n" ); document.write( "If we rotated 6, then it turns into 9, and vice versa.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Rotating a 2 will have it land on itself. Meaning it won't change. Same goes for 5.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Here are all of the ambiguous digits
\n" ); document.write( "0, 1, 2, 5, 6, 8, 9\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Here are the non-ambiguous digits
\n" ); document.write( "3, 4, 7\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "There are 3 items in that non-ambiguous set of digits.
\n" ); document.write( "Having 5 such digits, where repeats are allowed, would give us 3^5 = 243 non-ambiguous zip codes.
\n" ); document.write( "
\n" ); document.write( "
\n" );