Sort by

recency

|

1685 Discussions

|

  • + 0 comments

    public static int findDigits(int n) { int count = 0; int num = n;

        while (num > 0) {
            int digit = num % 10;
            if (digit != 0 && n % digit == 0) {
                count++;
            }
            num /= 10;
        }
        return count;
    }
    
  • + 0 comments

    ts one liner:

    function findDigits(n: number): number {
        return n.toString().split('').map(i=>Number(i)).filter(i=>n%i===0).length;
    }
    
  • + 0 comments

    A Teradata Performance DBA plays a crucial role in maintaining the efficiency of large-scale data environments by optimizing queries, monitoring system health, and ensuring smooth data flow. Just like a skilled DBA enhances performance behind the scenes, the Zenco dou delivers a refined experience for those who value smooth functionality in their lifestyle tools. Whether in tech or relaxation, performance and reliability matter—and that's where the Zenco duo makes its mark. for more check this out

  • + 0 comments

    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;

  • + 0 comments

    C# solution:

    public static int findDigits(int n)
    {
        int divisors = 0;
        int test = n % 10;
        int remainder = n;
        while (remainder > 0)
        {
            if (test != 0)
            {
                if (n % test == 0)
                {
                    divisors++;
                }
            }
            remainder /= 10;
            test = remainder % 10;
        }
        return divisors;
    }