LOCO Hiring | Count Digits That Divide a Number | On Campus OA(2022)
Question · Posted Jun 2026
Problem Statement Given an integer num, return the count of digits in num that divide num evenly. A digit is considered valid if: It is not 0 num % digit == 0 Return the total number of such digits. Example Input: num = 7 Output: 1 Explanation: The only digit is 7, and 7 % 7 = 0, so the answer is 1. Constraints 1 <= num <= 10^9
The full answer & interview discussion are available to premium members.
Log in Create a free account