当前位置: 首页 > news >正文 攻击jsp网站教育网站开发报告 news 2025/11/5 13:01:23 攻击jsp网站,教育网站开发报告,微信小程序电脑端打开,深圳华强北手表16.一张单据上有一个5位数的号码为6**42#xff0c;其中百位数和千位数已模糊不清#xff0c;但知道该数能被 57 和 67 除尽。设计一个算法#xff0c;找出该单据所有可能的号码。 17.编程序求2#xff5e;10000以内的完全数。一个数的因子#xff08;除了这个数本身其中百位数和千位数已模糊不清但知道该数能被 57 和 67 除尽。设计一个算法找出该单据所有可能的号码。 17.编程序求210000以内的完全数。一个数的因子除了这个数本身之和等于该数本身。 18.找出所有100以内(含100)满足II4I10都是素数的整数I(I10也在100以内)的个数cnt以及这些I之和sum请编写函数countValue()实现程序要求。 19.将大于整数m且小于n的k个素数存入数组x。请编写函数num()实现程序的要求. 20.选取出100以上1000以内所有个位数字与十位数字之和被10除所得余数恰是百位数字的素数如293。计算并输出上述这些素数的个数CN以及这些素数值的和SUM。请编写函数实现程序要求. 16、我们可以看到是百位和千位不清楚是多少我们可以从01-99来进行猜测代码如下 for (int i 1; i 99; i) { int number 60000 6 * i 42; // 构建六位数形式为60000 6 * (01-99) 42 if (IsValidNumber(number)) { Console.WriteLine($有效的单据号码是: {number}); break; // 找到一个有效的单据号码后就停止循环 } } } static bool IsValidNumber(int number) { // 这里可以添加更多的校验逻辑例如检查百位和千位的模糊条件 // 例如检查百位和千位的和或乘积符合某种模式 int hundredth number / 100 % 10; int thousandth number / 1000 % 10; // 假设模糊条件是百位和千位数字之和为5 if (hundredth thousandth 5) { return true; } return false; } 17、外层循环遍历2到10000的所有整数内层循环遍历这个数的所有因子如果一个数的因子之和等于这个数本身那么这个数就是完全数输出它。代码如下 for (int number 2; number 10000; number) { int sum 0; for (int i 1; i number; i) { if (number % i 0) { sum i; } } if (sum number) { Console.WriteLine(number); } } 18、判断素数以及加上指定的数还是素数我们可以根据以下步骤来进行 定义素数判断函数首先需要定义一个判断素数的函数。素数是指只能被1和自身整除的大于1的自然数。 遍历并判断在1到100的范围内遍历每个数使用素数判断函数检查该数及其加4和加10后的结果是否都是素数。如果是则计数器加1并将该数加入到结果集中。 输出结果最后输出满足条件的整数个数。代码如下 int count 0; // 计数器 int sum 0; // 满足条件的整数之和 for (int i 2; i 100; i) // 从2开始到100遍历每个数 { if (countValue(i) countValue(i 4) countValue(i 10)) // 检查I、I4、I10是否都是素数 { count; // 计数器加1 sum i; // 将满足条件的整数加入到和中 } } Console.WriteLine($满足条件的整数的个数{count}); // 输出满足条件的整数个数 Console.WriteLine($满足条件的整数的和值{sum}); // 输出满足条件的整数之和 } // 判断一个数是否为素数的函数 static bool countValue(int number) { if (number 1) return false; // 小于等于1的数不是素数 for (int i 2; i * i number; i) // 只需检查到平方根即可提高效率 { if (number % i 0) return false; // 如果能被其他数整除则不是素数 } return true; // 不能被整除则是素数 } 19、代码如下根据素数来进行判断 Console.WriteLine(请输入对应的mnk的值); int m int.Parse(Console.ReadLine()); int n int.Parse(Console.ReadLine()); int k int.Parse(Console.ReadLine()); Listint res num(m, n, k); Console.WriteLine(结果是res); } // 判断一个数是否为素数的函数 public static Listint num(int m, int n, int k) { Listint primes new Listint(); for (int i m; i n primes.Count k; i) { if (IsPrime(i)) { primes.Add(i); } } return primes; } private static bool IsPrime(int number) { if (number 1) { return false; } if (number 3) { return true; } if (number % 2 0 || number % 3 0) { return false; } for (int i 5; i * i number; i 6) { if (number % i 0 || number % (i 2) 0) { return false; } } return true; } 20、这个问题可以通过三层循环解决外层循环控制100到1000的数字中间层循环控制个位数字最内层循环控制十位数字代码如下 int count 0; int num 0; for (int i 100; i 1000; i) { int ones i % 10; //个位数字 int tens i / 10 % 10; //十位数字 int hundreds i / 100; //百位数字 if ((ones tens) % 10 hundreds) { Console.WriteLine(i); count; num i; Console.WriteLine(个数CN是count); Console.WriteLine(和sum是num); } } 文章转载自: http://www.morning.lznqb.cn.gov.cn.lznqb.cn http://www.morning.qxlxs.cn.gov.cn.qxlxs.cn http://www.morning.ahlart.com.gov.cn.ahlart.com http://www.morning.kmbgl.cn.gov.cn.kmbgl.cn http://www.morning.xrlwr.cn.gov.cn.xrlwr.cn http://www.morning.brlcj.cn.gov.cn.brlcj.cn http://www.morning.tsycr.cn.gov.cn.tsycr.cn http://www.morning.ryxbz.cn.gov.cn.ryxbz.cn http://www.morning.qhkx.cn.gov.cn.qhkx.cn http://www.morning.lpgw.cn.gov.cn.lpgw.cn http://www.morning.rui931.cn.gov.cn.rui931.cn http://www.morning.qmmfr.cn.gov.cn.qmmfr.cn http://www.morning.hmktd.cn.gov.cn.hmktd.cn http://www.morning.ckcjq.cn.gov.cn.ckcjq.cn http://www.morning.ypcbm.cn.gov.cn.ypcbm.cn http://www.morning.wtdyq.cn.gov.cn.wtdyq.cn http://www.morning.jjhng.cn.gov.cn.jjhng.cn http://www.morning.ckdgj.cn.gov.cn.ckdgj.cn http://www.morning.jlpdc.cn.gov.cn.jlpdc.cn http://www.morning.kndt.cn.gov.cn.kndt.cn http://www.morning.pbtrx.cn.gov.cn.pbtrx.cn http://www.morning.cknrs.cn.gov.cn.cknrs.cn http://www.morning.jzgxp.cn.gov.cn.jzgxp.cn http://www.morning.mjbjq.cn.gov.cn.mjbjq.cn http://www.morning.pypqf.cn.gov.cn.pypqf.cn http://www.morning.hyfrd.cn.gov.cn.hyfrd.cn http://www.morning.nwnbq.cn.gov.cn.nwnbq.cn http://www.morning.zlxrg.cn.gov.cn.zlxrg.cn http://www.morning.tkfnp.cn.gov.cn.tkfnp.cn http://www.morning.rzbgn.cn.gov.cn.rzbgn.cn http://www.morning.qcwck.cn.gov.cn.qcwck.cn http://www.morning.lgxzj.cn.gov.cn.lgxzj.cn http://www.morning.fhcwm.cn.gov.cn.fhcwm.cn http://www.morning.rfgc.cn.gov.cn.rfgc.cn http://www.morning.wtdyq.cn.gov.cn.wtdyq.cn http://www.morning.hwljx.cn.gov.cn.hwljx.cn http://www.morning.ncfky.cn.gov.cn.ncfky.cn http://www.morning.mwhqd.cn.gov.cn.mwhqd.cn http://www.morning.wjlkz.cn.gov.cn.wjlkz.cn http://www.morning.rkqqf.cn.gov.cn.rkqqf.cn http://www.morning.dpwcl.cn.gov.cn.dpwcl.cn http://www.morning.dncgb.cn.gov.cn.dncgb.cn http://www.morning.ltkms.cn.gov.cn.ltkms.cn http://www.morning.dtzxf.cn.gov.cn.dtzxf.cn http://www.morning.csdgt.cn.gov.cn.csdgt.cn http://www.morning.nfdty.cn.gov.cn.nfdty.cn http://www.morning.gthwz.cn.gov.cn.gthwz.cn http://www.morning.27asw.cn.gov.cn.27asw.cn http://www.morning.btmwd.cn.gov.cn.btmwd.cn http://www.morning.mbaiwan.com.gov.cn.mbaiwan.com http://www.morning.yzzfl.cn.gov.cn.yzzfl.cn http://www.morning.yjmlg.cn.gov.cn.yjmlg.cn http://www.morning.lnwdh.cn.gov.cn.lnwdh.cn http://www.morning.rwbh.cn.gov.cn.rwbh.cn http://www.morning.xlclj.cn.gov.cn.xlclj.cn http://www.morning.gbfck.cn.gov.cn.gbfck.cn http://www.morning.wzwpz.cn.gov.cn.wzwpz.cn http://www.morning.huayaosteel.cn.gov.cn.huayaosteel.cn http://www.morning.fqssx.cn.gov.cn.fqssx.cn http://www.morning.ykmg.cn.gov.cn.ykmg.cn http://www.morning.nqrfd.cn.gov.cn.nqrfd.cn http://www.morning.wcrcy.cn.gov.cn.wcrcy.cn http://www.morning.bntgy.cn.gov.cn.bntgy.cn http://www.morning.mhybs.cn.gov.cn.mhybs.cn http://www.morning.ygxf.cn.gov.cn.ygxf.cn http://www.morning.xbxks.cn.gov.cn.xbxks.cn http://www.morning.fbmrz.cn.gov.cn.fbmrz.cn http://www.morning.zjcmr.cn.gov.cn.zjcmr.cn http://www.morning.jzykq.cn.gov.cn.jzykq.cn http://www.morning.jgncd.cn.gov.cn.jgncd.cn http://www.morning.fdlyh.cn.gov.cn.fdlyh.cn http://www.morning.kscwt.cn.gov.cn.kscwt.cn http://www.morning.xzrbd.cn.gov.cn.xzrbd.cn http://www.morning.plpqf.cn.gov.cn.plpqf.cn http://www.morning.jgncd.cn.gov.cn.jgncd.cn http://www.morning.xqbbc.cn.gov.cn.xqbbc.cn http://www.morning.rccpl.cn.gov.cn.rccpl.cn http://www.morning.dpfr.cn.gov.cn.dpfr.cn http://www.morning.lfjmp.cn.gov.cn.lfjmp.cn http://www.morning.smzr.cn.gov.cn.smzr.cn 查看全文 http://www.tj-hxxt.cn/news/279474.html 相关文章: 企业网站的信息内容包括什么帮别人备案网站 站内内容投放计划WordPress采集更新文章 网站iis安全配置广州建筑东莞分公司 做信息图的网站怎么建设微网站 清远企业网站排名东莞网站建设三合一 韩漫网站建设简历模板简单免费 dedecms妇科医院wap网站模板 v1.0wordpress管理面板 盘锦威旺做网站建设wordpress采集电影资源 手机最全的网站百度不让访问危险网站怎么办 公司刚做网站在那里找图片做德维尔全屋定制官方网站 黑彩网站怎么建设自己做网站翻译服务器 - 添加网站 discuz网站伪静态设置福州企业自助建站 展示型网站案例适合40岁女人的培训班 设计好用的网站广州网站快速优化排名 长春设计网站自己怎么做团购网站首页 传奇网站发布网长治专业做网站 网站推广的常用方法最新企业网站模板 网站开发 站长统计重庆seo优化公司 网站建设与网页设计试卷河南省网上商城采购平台 做逆战网站的名字外网设计收费标准 技术支持 骏域网站建设专家佛山H5响应式网站数据 模板网站建设源码公众号开发菜单 php网站开发经理招聘重庆城市 购买网站模版可以自己做吗深圳展厅设计 本地成都网站建设中国网站排行榜 合肥大型网站制作公司您与此网站之间建立的连接不安全 做公益筹集项目的网站企业网上核名 哈尔滨网站seo怎么制作网站生成图片 大连可以做网站的公司宁夏石嘴山市城乡建设局提意见网站 带m开头的网站怎么做西安活动策划执行公司