Pai Gow Pedometer Poker

Part 1

You've been staring at dashboards all day. Car after car rolls into the rental return line, each one flashing two numbers. One is the big odometer that never resets, and the other is a smaller gas gauge that renters so often forget to top off.

Your coworker leans over and grins. “Think we could make a game out of this? Look at this… Take those two numbers, multiply them together, and keep a running total. Let's see how big it gets by the end of the shift!” You agree… It sure beats sorting keychains.

Here's how the game works: Each car provides two readings: the odometer and the gas remaining. Multiply the odometer reading by the gas reading. Add that product to your running total.

12345 678

For that car:

  • Odometer = 12345
  • Gas = 678
  • Multiply → 12345 x 678 = 8,369,910

 

That number is added to the grand total.

Process every line in the paigowpedometerpoker.txt this way. After the last car has come through the line, what is the grand total you've built up?


Please log in to submit your answer.

Leaderboard

No scores yet.

Questions

  • Question 1
  • Question 2
  • Question 3
  • Question 4