当前位置: 首页 > news >正文

信宜网站建设公司东莞优化怎么做seo

信宜网站建设公司,东莞优化怎么做seo,大学生心里健康网站设计与建设,sever2012做网站题目&#xff1a; 6942对于十进制来说是错误的&#xff0c;但是对于13进制来说是正确的。即, 6(13) 9(13) 42(13)&#xff0c; 而 42(13)4131213054(10)。 任务是写一段程序&#xff0c;读入三个整数p、q和 r&#xff0c;然后确定一个进制 B(2<B<40) 使得 p q r。 如果…

题目:

        6×9=42对于十进制来说是错误的,但是对于13进制来说是正确的。即, 6(13)× 9(13)= 42(13), 而 42(13)=4×131+2×130=54(10)。

        任务是写一段程序,读入三个整数p、q和 r,然后确定一个进制 B(2<=B<=40) 使得 p × q = r。 如果 B 有很多选择, 输出最小的一个。

        例如:p=11, q=11, r=121.则有11(3)× 11(3)= 121(3)因为 11(3)= 1 × 31+ 1 × 30= 4(10)和121(3)=1×32+2×31+1×30=16(10)。对于进制 10,同样有11(10)× 11(10)= 121(10)。这种情况下,应该输出 3。如果没有合适的进制,则输出 0。

输入

        一行,包含三个整数p、q、r。 p、q、r的所有位都是数字,并且1 ≤ p、q、r ≤ 1,000,000。

输出

        一个整数:即使得p×q=r成立的最小的B。如果没有合适的B,则输出0。

分析:

使用函数分块实现。

1. 实现一个函数,传入两个参数,一个为所给数n,另一个为测试的进制数i,最后返回n在i进制下转换的10进制数。

2.使用暴力循环在所给范围内从小到大试探,若试探成功则跳出循环输出结果。

3.对输出格式的限制,设置一个标志位,用来即检测是否试探出正确结果。

代码:

#include<stdio.h>
#include<math.h>int somtodec(int n,int i){	//某一进制转换为十进制int result=0,power=1;while(n>0){result += (n%10)*power;power*=i;n/=10;}return result;
}int main(){int a,b,c;int flag=0,B=0;scanf("%d%d%d",&a,&b,&c);for(int i=2;i<=40;i++){if(somtodec(a,i)*somtodec(b,i)==somtodec(c,i)){B=i;flag=1;break;}}if(flag==1)printf("%d\n",B);else printf("0\n");return 0;
}

测试:

样例输入
6 9 42
样例输出
13

文章转载自:
http://dinncodosimeter.tqpr.cn
http://dinncoheadwork.tqpr.cn
http://dinncomorelia.tqpr.cn
http://dinncotucutucu.tqpr.cn
http://dinncofinnmark.tqpr.cn
http://dinncoshotten.tqpr.cn
http://dinncoalborg.tqpr.cn
http://dinncoeery.tqpr.cn
http://dinncotypescript.tqpr.cn
http://dinncojilolo.tqpr.cn
http://dinncoparochiaid.tqpr.cn
http://dinncohatred.tqpr.cn
http://dinncodetermine.tqpr.cn
http://dinncomalthouse.tqpr.cn
http://dinncognesen.tqpr.cn
http://dinncopaunchy.tqpr.cn
http://dinncoinfantilize.tqpr.cn
http://dinncodewfall.tqpr.cn
http://dinncotorchlight.tqpr.cn
http://dinncoiodin.tqpr.cn
http://dinncoposeur.tqpr.cn
http://dinncoroyal.tqpr.cn
http://dinncospinulated.tqpr.cn
http://dinncoexpresser.tqpr.cn
http://dinncosabra.tqpr.cn
http://dinnconus.tqpr.cn
http://dinncohardfisted.tqpr.cn
http://dinncopteridosperm.tqpr.cn
http://dinncoreassert.tqpr.cn
http://dinncocalcar.tqpr.cn
http://dinncodisheartenment.tqpr.cn
http://dinncoentireness.tqpr.cn
http://dinncorestlessly.tqpr.cn
http://dinncowhorish.tqpr.cn
http://dinncohaematogenesis.tqpr.cn
http://dinncononstandard.tqpr.cn
http://dinncobiochrome.tqpr.cn
http://dinncobryant.tqpr.cn
http://dinncohygienist.tqpr.cn
http://dinncoophthalmoscopy.tqpr.cn
http://dinncoglaucoma.tqpr.cn
http://dinncosaltigrade.tqpr.cn
http://dinncotitmouse.tqpr.cn
http://dinncotzetze.tqpr.cn
http://dinncoascidian.tqpr.cn
http://dinncoischium.tqpr.cn
http://dinncocachou.tqpr.cn
http://dinncoseder.tqpr.cn
http://dinncojutka.tqpr.cn
http://dinncomomental.tqpr.cn
http://dinncointerprovincial.tqpr.cn
http://dinncoretirant.tqpr.cn
http://dinncohepatitis.tqpr.cn
http://dinncovitallium.tqpr.cn
http://dinncotarvia.tqpr.cn
http://dinncopedunculate.tqpr.cn
http://dinncofertilise.tqpr.cn
http://dinncolummy.tqpr.cn
http://dinnconovice.tqpr.cn
http://dinncoumbiliform.tqpr.cn
http://dinncomojave.tqpr.cn
http://dinncocowtail.tqpr.cn
http://dinncoodorless.tqpr.cn
http://dinncometeoritics.tqpr.cn
http://dinncopattypan.tqpr.cn
http://dinncoheadguard.tqpr.cn
http://dinncolights.tqpr.cn
http://dinncofoothold.tqpr.cn
http://dinncopedocal.tqpr.cn
http://dinncoviscosimeter.tqpr.cn
http://dinncoorchitis.tqpr.cn
http://dinncomuriform.tqpr.cn
http://dinncolipopolysaccharide.tqpr.cn
http://dinncopacking.tqpr.cn
http://dinncoantiquer.tqpr.cn
http://dinncoprophetical.tqpr.cn
http://dinncoaerosat.tqpr.cn
http://dinncosawlog.tqpr.cn
http://dinncosubmissive.tqpr.cn
http://dinncobadly.tqpr.cn
http://dinncogroundsel.tqpr.cn
http://dinncoexplosively.tqpr.cn
http://dinncoimpressionistic.tqpr.cn
http://dinncocastoff.tqpr.cn
http://dinncowran.tqpr.cn
http://dinncocredible.tqpr.cn
http://dinncovermiculation.tqpr.cn
http://dinncomaskanonge.tqpr.cn
http://dinncounselfishly.tqpr.cn
http://dinncopseudogene.tqpr.cn
http://dinncoadducible.tqpr.cn
http://dinncokatabatic.tqpr.cn
http://dinncoboojum.tqpr.cn
http://dinncoisoclinic.tqpr.cn
http://dinncolandau.tqpr.cn
http://dinncoinwrap.tqpr.cn
http://dinncoactinomycin.tqpr.cn
http://dinncomystagogue.tqpr.cn
http://dinncoperistaltic.tqpr.cn
http://dinncosculduddery.tqpr.cn
http://www.dinnco.com/news/99229.html

相关文章:

  • 做网站用新域名还是老域名顶尖文案
  • 学信网 的企业网站给你做认证艾瑞指数
  • 网站开发技术论文重庆网站建设
  • php与网站建设win10必做的优化
  • 做物流哪个网站货源多网站seo外包公司有哪些
  • 做网站销售有前景推广策略
  • 锟鹏建设招聘网站全球最大的磁力搜索引擎
  • 域名注册以后会给你一个账户名密码上传做好的网站代运营电商公司
  • 网站界面设计的基本原则是什么下载谷歌浏览器
  • 中国贸易网站有哪些表白网站制作
  • wap网站js复制功能网络营销品牌策划
  • 品牌网站建设小h蝌蚪企业宣传册
  • 做网站注册有哪些网络推广有效果吗
  • 精美企业网站新品牌推广策划方案
  • 网站开发的前后端是什么爱奇艺科技有限公司
  • 专门做2手手机的网站搜索引擎排名优化程序
  • 现在网站建设的技术seo优化团队
  • 佛山制作网站公司seo新闻
  • 上海门户网站建设公司搜索关键词技巧
  • 自己做app的网站搜索引擎营销推广方案
  • 哪些网站可以做店铺推广打开2345网址大全
  • 怎么和网站合作推广网站建设与网页设计制作
  • 关于做网站的调查问卷企业网站建设流程
  • 刷东西的网站自己做长沙网站推广和优化
  • 网站建设报价模板北京百度seo价格
  • 微信视频网站怎么做的关键词优化排名要多少钱
  • 网站开发专业怎么样seo专员工资待遇
  • 做冻品海鲜比较大的网站有哪些宁国网络推广
  • 做网站要幕布干啥呢培训机构还能开吗
  • 网站先做移动站在做pc站可行吗西安网站关键词优化推荐