Just curious, but isn't the value reversed??
123....
First digit would be 3, Second digit 2, Third digit 1...
With numbers, don't we count digits from right to left usually? Ones, tens, hundreds, thousands...
(Not that it's a big deal, as you just reverse the solution, but as it sits, I *never* would've got it right. My 6210001000 would end up being 0001000126, just because I think right to left in numerical digits.)