英语翻译A Niven number is a number such that the sum of its digi
来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/05/09 03:36:17
英语翻译
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.
Input
You will be given a number of test cases.Each line of input contains the
base b,followed by a string of digits representing a positive integer in that
base.There are no leading zeroes.The input is terminated by a line consisting
of 0 alone.
Output
For each case,print "yes" on a line if the given number is a Niven number,
and "no" otherwise.
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.
Input
You will be given a number of test cases.Each line of input contains the
base b,followed by a string of digits representing a positive integer in that
base.There are no leading zeroes.The input is terminated by a line consisting
of 0 alone.
Output
For each case,print "yes" on a line if the given number is a Niven number,
and "no" otherwise.
一种机器数是这样的数字之和分.
例如,111是因为,数的数字之和为3,其中
分111.我们还可以指定在另一座B号,和一个数
基B是一个数如果奈文的数字之和将其价值.
给出B(2≤B≤10)和基B一个数,确定它是否是一个机器
数或不.
输入
你会得到一个测试用例的数量.输入的每一行包含了
基B,其次是一个字符串的数字表示在一个正整数
基地.没有前导零.输入由一行终止
0个人.
输出
对于每一种情况下,打印一行“是”如果给定的数是奈文数,
否则,“不”.
例如,111是因为,数的数字之和为3,其中
分111.我们还可以指定在另一座B号,和一个数
基B是一个数如果奈文的数字之和将其价值.
给出B(2≤B≤10)和基B一个数,确定它是否是一个机器
数或不.
输入
你会得到一个测试用例的数量.输入的每一行包含了
基B,其次是一个字符串的数字表示在一个正整数
基地.没有前导零.输入由一行终止
0个人.
输出
对于每一种情况下,打印一行“是”如果给定的数是奈文数,
否则,“不”.
英语翻译A Niven number is a number such that the sum of its digi
英语翻译The sum of the digits of a two-digit number is subtracte
英语翻译A setof 10 numbers has sum 100.Each number of the set is
eight times the sum of a number and its reciprocal results i
幼儿算数find a number whose half exceeds its third by the sum of
Can you find such a number that its double is forteen more t
英语翻译A number x is 2 more than the product of its reciprocal
the product of 7 and a number is more than the sum of 7 and
What is the largest number that cannot be expressed as a sum
The number of triples (a,b,c) of positive integers such that
the number of,a small number of,a number of.
英语翻译The number of standard deviations that a value (x) is ab