Given a number n, the task is to check if it is divisible by 7 or not. Note: You are not allowed to use the modulo operator, floating point arithmetic is also not allowed. Examples: Input: n = 371 Output: True Explanation: The number 371: 37 - (2×1) = 37 - 2 = 35; 3 - (2 × 5) = 3 - 10 = -7; thus,…
2025
No articles.