3 ms·
Sigh. My friend did this problem on pen and paper and made me feel stupid. Their solution was so wildly clever! It relied on the observation that the sum of the
by foota 2y ago
Sigh. My friend did this problem on pen and paper and made me feel stupid. Their solution was so wildly clever! It relied on the observation that the sum of the rows of the sudoku board (given the digits in use) is a known fixed value, and went from there (I'll leave the rest as an exercise to the reader to avoid spoilers).
- toast0 2y agoThis isn't exactly a sudoku board, because they allow for 0.
- Jtsummers 2y agoWhile it's not a true sudoku board, that invariant still holds. Whichever set of digits you end up using (it'll be the same 9 for rows, columns, and blocks) the sum will be same for all of them. It's also unique to the set of 9 numbers you end up using to solve the puzzle. If you use 1-9, sum is 45. For anything else, it's 45 - (the unused number).
- foota 2y agoYep, I'm aware, hence the given digits part. The whole board is still drawn from 9 digits, it's just that precisely which 9 digits is unknown.
- rahimnathwani 2y agoThe Jane Street page explains the (a?) number theory approach.