Solved LeetCode program · 955 of 1,000
#1323 · Maximum 69 Number
Original English source
The number is 9669. The written is format whole number number as text. The result is 0. The changed is 0.
For every spot from 0 to the length of written minus 1.
The digit is the digit value of character spot of written. The chosen is digit. If changed is 0 and digit is 6, set chosen to 9, set changed to 1. Set result to result times 10 plus chosen.
Show result.
Expected stdout
9969