C++ | 100% faster | Easy to understand
Target: find the two numbers {i, n-i} that do not contain zero and their sum equals to n\n2. Method:\n\t find {i,n-i} pair whose sum equals to n, e.g. 6=1+5\n\t
1. Target: find the two numbers {i, n-i} that do not contain zero and their sum equals to n\n2. Method:\n\t* find {i,n-i} pair whose sum equals to n, e.g. 6=1+5\n\t* check both i\'s and n-i\'s number of zero. They must be zero respectively\n\t* range of i is from 1 to n/2(include). Reason is that we can avoid calculating duplicated range. e.g we have checked whether {1,5} contains zero repectively, so we don\'t need to check {5,1}\n\n```\nclass Solution {\npublic:\n    int containZero(int n){\n        int count = 0;\n        while(n > 0){\n            if(n % 10 == 0) count++;\n            n /= 10;\n        }\n        return count;\n    }\n    \n    vector<int> getNoZeroIntegers(int n) {\n        for(int i = 1; i <= n/2; i++){\n            if((containZero(i) == 0) && (containZero(n-i) == 0)) return {i, n-i};\n        }\n        return {};\n    }\n};\n```\nPlease upvote it if you love this answer, thank you!
['C']