Solved LeetCode program · 951 of 1,000
#1317 · Convert Integer to the Sum of Two No-Zero Integers
Original English source
Keep a shared okay of 0. The target is 11.
To inspect from value (a whole number). Set okay to 1. The written is format whole number value as text.
For every spot from 0 to the length of written minus 1.
The digit is the digit value of character spot of written. If digit is 0, set okay to 0.
For every first from 1 to target minus 1.
The second is target minus first. Inspect from first. The leftokay is okay. Inspect from second. If leftokay is 1 and okay is 1, Show first, Show second, stop.
Expected stdout
2 9