You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, you can watch the explanation here : https://youtu.be/iTxLvVxH5pY
int findDigits(int n) { int result = 0, original = n; while(n){ int d = n % 10; if(d != 0 && original % d == 0) result ++; n /= 10; } return result; }
Seems like cookies are disabled on this browser, please enable them to open this website
Find Digits
You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, you can watch the explanation here : https://youtu.be/iTxLvVxH5pY