[求助]大数除法问题
对任意进制下的大数做除法.
判断是否可以整除问题.
对输入的一个某进制下的整数,是否可以整除该数各位数之和.
这是背景:
A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value.
Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not.
我就演变了一下.高手求教.