We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Implementation
- Find Digits
- Discussions
Find Digits
Find Digits
Sort by
recency
|
1668 Discussions
|
Please Login in order to post a comment
def findDigits(n): count = 0 for i in str(n): if(i=='0'): continue elif(n % int(i) == 0): count += 1 return count
Here is my c++ solution, you can watch the explanation here : https://youtu.be/iTxLvVxH5pY
Perl:
can you find mistake in this code plz??
include
using namespace std; int main(){ int n; cin>>n; int result = 0; long long int t; for(int i=0;i>t; } while(t--){ int d=t% 10; if(d!=0 && t%d==0 ) result ++;
} cout<
Java solution: