Math
CodeChefOpen on judge ↗
Given a number n and base x. Check whether the number n base x can be divided by x-1. Number n consists of digits 0,1,…9 and alphabets A,B,…Z, a, b,…z where A=10, B=11,…and z=61. Input Contains two elements. The first element is the base x ( 2 Output If the integer n base x can be divided by b-1, output “Yes” else “No” Constraints ( 2 Example Input: 3 2 Output: Yes
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start