(Does someone sell "decade" dice, which faces say: 10, 20, 300, ..., 90 and 100?)
Yes, they do. I used to use them for this exact purpose.
Is that not equivalent to:
> (x-1) * 10 + y
or:
> x * 10 + y - 10
And some changes may have to been backported, and it has a lot of tricks with index of arrays of different dimensions, so I'm wrapping the formulas with +1 and -1 and hopping the best.
IIRC the python compiler does not optimize them (perhaps with numba?), but later steps in other programs are slow, so N <= 20 and whatever I do is bounded by 20^4.
[1] If the file says "1 2 7.0 \r 1 2 8.0 \r" should I keep the sum (15.0), the first (I never seen that) or the last? (Raising an error, nah.)
Usually you buy 1 D10 and 1 decade dice, and role both of them and add them. Most purchaseable dice sets come this way.
This is just the first result with a picture, but they are really common, all my dice sets have one: https://www.dicegamedepot.com/10-sided-tens-opaque-dice-red/