# coding=utf-8 id = 150 group = 'clp_fd' number = 62 visible = True facts = None solution = '''\ tobase(0, _, 0) :- !. tobase(N, B, Nb) :- B in 2..10, indomain(B), N #= N1 * B + Rem, Rem #>= 0, Rem #< B, Nb #= Nb1 * 10 + Rem, tobase(N1, B, Nb1).'''