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
|
1682 Discussions
|
Please Login in order to post a comment
int a = n; int d = 0; while(a>0){ int rem = a%10; if(rem != 0 && n % rem ==0){ d++; } a = a/10; } return d;
C# solution:
//JAVA15 import java.io.; import java.util.; import java.util.stream.*;
class Result {
}
public class Solution { public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));
}
optimal approach but first requesting other learner to understand the code first
Easy Solution