Some divisors only require a few numbers at the end of the number in question to determine divisibility, no matter how long. Examples include 25, 32, 50, 64, 75, 100, 125, 128, 256, and 512. Notice that this list includes some prime-power divisors (e.g, 25 = 5^2, 32 = 2^5, 125 = 5^3, etc.). Write a function to determine if a given number, provided as a string (n_str), is divisible by the provided divisor. See the test suite for examples and rules for these simple divisors below:
The only restriction that remains is Java.
Previous problem: Divisible by n, prime divisors from 20 to 200. Next problem Divisible by n, Composite Divisors.
11449 Solvers
Renaming a field in a structure array
687 Solvers
Back to basics 13 - Input variables
221 Solvers
Numbers with prime factors 2, 3 and 5.
156 Solvers
454 Solvers
Solution 716875
I don't believe this one will work if n=75, the number is divisible by 75, and and the end of the number isn't 75.