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.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Algorithms
  3. Implementation
  4. Find Digits
  5. Discussions

Find Digits

Problem
Submissions
Leaderboard
Discussions
Editorial
Topics

Sort 1323 Discussions, By:

votes

Please Login in order to post a comment

  • mateuszwitkowski
    5 years ago+ 5 comments

    IMO it's a mistake to grant 25 points for such an easy challenge.

    91|
    Permalink
    View more Comments..
  • chrynan
    6 years ago+ 19 comments

    Here's a solution for Java without having to convert to and from String or Character arrays:

    int n = in.nextInt();
    int r = n;
    int count = 0;
    while(r > 0){
        if(r % 10 != 0 && n % (r % 10) == 0) count++;
        r = r / 10;
    }
    System.out.println(count);
    
    71|
    Permalink
    View more Comments..
  • sachitshanbhag1
    4 years ago+ 3 comments

    25 points? Seriously?

    27|
    Permalink
  • joshuakcockrell
    7 years ago+ 12 comments

    3 Lines of python. lololol.

    for fluff in range(input()):
        value = int(raw_input())
        print len([i for i in map(int, list(str(value))) if i != 0 and value % i == 0])
    
    18|
    Permalink
    View more Comments..
  • BugshotGG
    6 years ago+ 8 comments

    I dont understand. Why do people post their solutions here? Everybody wants to get recognition or something? Discussion is about giving hints that will help to solution, not posting your answers...

    17|
    Permalink
    View more Comments..
Load more conversations

Need Help?


View editorial
View top submissions
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature