Yet Another Base Problem
CodeChefOpen on judge ↗
A number x in base B is a sequence of digits written in the following way: $x_b=d_1d_2d_3... d_N$, where $0 \leq d_i \lt B$ for i = 1, 2, ... N. You are given number X in base B. Is the number X divisible by (B+1)? Note that $d_N$ is the least significant digit in base B representation of X. ### Input - The first line of input contains a integer B. - The second line of input contains a intege
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