亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲(chóng)蟲(chóng)首頁(yè)| 資源下載| 資源專(zhuān)輯| 精品軟件
登錄| 注冊(cè)

您現(xiàn)在的位置是:蟲(chóng)蟲(chóng)下載站 > 資源下載 > 數(shù)據(jù)結(jié)構(gòu) > 數(shù)字運(yùn)算

數(shù)字運(yùn)算

  • 資源大?。?/b>2 K
  • 上傳時(shí)間: 2015-05-21
  • 上傳用戶:wanghaihah
  • 資源積分:2 下載積分
  • 標(biāo)      簽: 數(shù)字 運(yùn)算

資 源 簡(jiǎn) 介

數(shù)字運(yùn)算,判斷一個(gè)數(shù)是否接近素?cái)?shù) 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 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. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no

相 關(guān) 資 源

主站蜘蛛池模板: 汉川市| 苗栗县| 乌兰浩特市| 邢台市| 易门县| 北川| 临沭县| 鄄城县| 怀安县| 乐业县| 桐梓县| 县级市| 金湖县| 长宁县| 建平县| 青岛市| 勃利县| 宜黄县| 博客| 贵州省| 大名县| 濮阳市| 岚皋县| 广东省| 阳信县| 陇川县| 肇东市| 铜川市| 平遥县| 津南区| 镇安县| 霸州市| 杭锦旗| 沙雅县| 社旗县| 南充市| 平阴县| 曲麻莱县| 日喀则市| 山阴县| 汝州市|