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

网站开发流程种子搜索神器在线引擎

网站开发流程,种子搜索神器在线引擎,网易网站开发,做app多少钱零基础洛谷刷题记录 Day1 2024.11.18 Day2 2024.11.25 文章目录 零基础洛谷刷题记录1035:题目描述1035:解答代码1035:学习成果1047:题目描述(成功写出)1047:解答代码1047:学习成果1085&#xf…

零基础洛谷刷题记录

Day1 2024.11.18
Day2 2024.11.25


文章目录

  • 零基础洛谷刷题记录
    • 1035:题目描述
    • 1035:解答代码
    • 1035:学习成果
    • 1047:题目描述(成功写出)
    • 1047:解答代码
    • 1047:学习成果
    • 1085:题目描述(成功写出)
    • 1085:解答代码·
    • 1085:学习成果
    • 1089:题目描述(成功写出)
    • 1089:解答代码
    • 1089:学习成果
    • 1150:题目描述(成功写出)
    • 1150:解题代码
    • 1150:学习成果
    • 1151:题目描述(成功写出)
    • 1151:解题代码
    • 1151:学习成果
  • 总结


级数求和

1035:题目描述

已知:Sn=1+1/2+1/3+…+1/n。显然对于任意一个整数 k,当 n 足够大的时候,Sn>k。现给出一个整数 k,要求计算出一个最小的 n,使得 Sn>k

1035:解答代码

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>int main()
{int k;scanf("%d", &k);double sum = 1;int i = 2;while (sum <= k){sum += (1.0 / i);i++;}printf("%d", i - 1);return 0;
}

1035:学习成果

  • 整数相除
7/2=3
7%2=1
  • 浮点数相除
#include<stdio.h>
int main()
{float a = 7.0 / 2;printf("%f\n", a);return 0;
}

校门外的树

1047:题目描述(成功写出)

某校大门外长度为 l 的马路上有一排树,每两棵相邻的树之间的间隔都是 1 米。我们可以把马路看成一个数轴,马路的一端在数轴 0 的位置,另一端在 l 的位置;数轴上的每个整数0,1,2,…,l,都种有一棵树。

由于马路上有一些区域要用来建地铁。这些区域用它们在数轴上的起始点和终止点表示。已知任一区域的起始点和终止点的坐标都是整数,区域之间可能有重合的部分。现在要把这些区域中的树(包括区域端点处的两棵树)移走。你的任务是计算将这些树都移走后,马路上还有多少棵树。

1047:解答代码

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>int main()
{int length;int number;scanf("%d %d", &length, &number);int all = length + 1;int arr[10000];for (int j = 0; j <= length; j++){arr[j] = 1;}for (int i = 0; i < number; i++){int  left;int right;scanf("%d %d", &left, &right);for (int j = left; j <= right; j++){arr[j] = 0;}}int answer = 0;for (int j = 0; j <= length; j++){if (arr[j] == 1){answer++;}}printf("%d\n", answer);return 0;
}

1047:学习成果

  • 成功想出标记的思路,非常好

不高兴的津津

1085:题目描述(成功写出)

津津上初中了。妈妈认为津津应该更加用功学习,所以津津除了上学之外,还要参加妈妈为她报名的各科复习班。另外每周妈妈还会送她去学习朗诵、舞蹈和钢琴。但是津津如果一天上课超过八个小时就会不高兴,而且上得越久就会越不高兴。假设津津不会因为其它事不高兴,并且她的不高兴不会持续到第二天。请你帮忙检查一下津津下周的日程安排,看看下周她会不会不高兴;如果会的话,哪天最不高兴

1085:解答代码·

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>int main()
{int sum = 0;int max = 0;int day = 1;int school;int mother;for (int i = 1; i < 8; i++){scanf("%d %d", &school, &mother);sum = school + mother;if (sum > max){max = sum;day = i;}}if (max <= 8){day = 0;}printf("%d\n", day);return 0;
}

1085:学习成果

  • 利用逐项比较的方式得到答案

津津的储蓄计划

1089:题目描述(成功写出)

津津的零花钱一直都是自己管理。每个月的月初妈妈给津津 300 元钱,津津会预算这个月的花销,并且总能做到实际花销和预算的相同。

为了让津津学习如何储蓄,妈妈提出,津津可以随时把整百的钱存在她那里,到了年末她会加上 20% 还给津津。因此津津制定了一个储蓄计划:每个月的月初,在得到妈妈给的零花钱后,如果她预计到这个月的月末手中还会有多于 100 元或恰好 100 元,她就会把整百的钱存在妈妈那里,剩余的钱留在自己手中。

例如 11月初津津手中还有 83 元,妈妈给了津津 300 元。津津预计11月的花销是 180 元,那么她就会在妈妈那里存 200 元,自己留下 183 元。到了 11 月月末,津津手中会剩下 3 元钱。

津津发现这个储蓄计划的主要风险是,存在妈妈那里的钱在年末之前不能取出。有可能在某个月的月初,津津手中的钱加上这个月妈妈给的钱,不够这个月的原定预算。如果出现这种情况,津津将不得不在这个月省吃俭用,压缩预算。

现在请你根据 2004 年 1 月到 12 月每个月津津的预算,判断会不会出现这种情况。如果不会,计算到 2004 年年末,妈妈将津津平常存的钱加上 20% 还给津津之后,津津手中会有多少钱。

1089:解答代码

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>int main()
{int addtion = 0;int hand = 0;int deposit = 0;int number = 0;for (int i = 1; i < 13; i++){hand += 300;int budget;scanf("%d", &budget);if (hand < budget){printf("-%d\n", i);return 0;}addtion = hand - budget;if (addtion >= 100){number = addtion / 100;deposit += number * 100;hand = hand - number * 100;}hand = hand - budget;}int out = deposit * 1.2 + hand;printf("%d\n", out);return 0;
}

1089:学习成果

  • 思路清晰即可

prter的烟

1150:题目描述(成功写出)

Peter 有 n 根烟,他每吸完一根烟就把烟蒂保存起来,k(k>1)个烟蒂可以换一个新的烟,那么 Peter 最终能吸到多少根烟呢?

1150:解题代码

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>int main()
{int remain = 0;int n;int k;scanf("%d %d", &n, &k);int all = n;remain += n;while (remain >= k){int i = remain / k;int j = remain % k;remain = j + i;all += i;}printf("%d\n", all);return 0;
}

1150:学习成果

  • 逻辑清晰即可

子树整数

1151:题目描述(成功写出)

现在给定一个正整数 K,要求你编程求出 10000 到 30000 之间所有满足下述条件的五位数,条件是这些五位数的三个子数 sub 1,sub 2 ,sub 3 都可被 K 整除。

1151:解题代码

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>int main()
{int k;scanf("%d", &k);int tag = 0;for (int i = 10000; i <= 30000; i++){int num1 = i / 100;int num2 = i % 1000;int num3 = (i / 10) % 1000;if (num1 % k == 0 && num2 % k == 0 && num3 % k == 0){printf("%d\n", i);tag = 1;}}if (tag == 0){printf("No\n");}return 0;
}

1151:学习成果

  • 逻辑清晰即可

总结


文章转载自:
http://dinncolugger.tqpr.cn
http://dinncoremythologize.tqpr.cn
http://dinncodiol.tqpr.cn
http://dinncohumdrum.tqpr.cn
http://dinncokeelson.tqpr.cn
http://dinncohaggish.tqpr.cn
http://dinncodisquieting.tqpr.cn
http://dinncogabber.tqpr.cn
http://dinncoappreciatory.tqpr.cn
http://dinncovariant.tqpr.cn
http://dinncocohesion.tqpr.cn
http://dinncogrits.tqpr.cn
http://dinncoaffluent.tqpr.cn
http://dinncodiscovrery.tqpr.cn
http://dinncosynovium.tqpr.cn
http://dinncowestpolitik.tqpr.cn
http://dinncoelusory.tqpr.cn
http://dinncoinflump.tqpr.cn
http://dinncoscathing.tqpr.cn
http://dinncodrumble.tqpr.cn
http://dinncobugshah.tqpr.cn
http://dinncointerlay.tqpr.cn
http://dinncothrombolytic.tqpr.cn
http://dinncolicensor.tqpr.cn
http://dinnconeptunism.tqpr.cn
http://dinncocolleging.tqpr.cn
http://dinncoimmortalize.tqpr.cn
http://dinncohalophile.tqpr.cn
http://dinncounitrust.tqpr.cn
http://dinncolysogen.tqpr.cn
http://dinncocannibalize.tqpr.cn
http://dinncoleaderette.tqpr.cn
http://dinncohapten.tqpr.cn
http://dinncopunter.tqpr.cn
http://dinncocembalo.tqpr.cn
http://dinncomonosyllabic.tqpr.cn
http://dinncodenaturalise.tqpr.cn
http://dinncogospeler.tqpr.cn
http://dinncocolonizer.tqpr.cn
http://dinncocontentedly.tqpr.cn
http://dinncocaddis.tqpr.cn
http://dinncosangh.tqpr.cn
http://dinncomoslemize.tqpr.cn
http://dinncoconcretize.tqpr.cn
http://dinncovulcanisation.tqpr.cn
http://dinncofossilize.tqpr.cn
http://dinncothoth.tqpr.cn
http://dinncoadministrant.tqpr.cn
http://dinncoretroengine.tqpr.cn
http://dinncodust.tqpr.cn
http://dinncoave.tqpr.cn
http://dinncodiadromous.tqpr.cn
http://dinncopeewit.tqpr.cn
http://dinncooctavo.tqpr.cn
http://dinncotragedienne.tqpr.cn
http://dinncoquestion.tqpr.cn
http://dinncojewellery.tqpr.cn
http://dinncoknapper.tqpr.cn
http://dinncoeleven.tqpr.cn
http://dinncocinerarium.tqpr.cn
http://dinnconecroscopy.tqpr.cn
http://dinncoumbrella.tqpr.cn
http://dinncorattiness.tqpr.cn
http://dinncorehydrate.tqpr.cn
http://dinncosheikh.tqpr.cn
http://dinncocochleate.tqpr.cn
http://dinncoinitiate.tqpr.cn
http://dinncoclustering.tqpr.cn
http://dinncooutsourcing.tqpr.cn
http://dinncozoophilism.tqpr.cn
http://dinncoloment.tqpr.cn
http://dinncobismuth.tqpr.cn
http://dinncosquillagee.tqpr.cn
http://dinncopast.tqpr.cn
http://dinncoclerihew.tqpr.cn
http://dinncoscrambling.tqpr.cn
http://dinncomisfile.tqpr.cn
http://dinncomalaya.tqpr.cn
http://dinncoprecensor.tqpr.cn
http://dinncoseptiform.tqpr.cn
http://dinncoshuttle.tqpr.cn
http://dinncosnood.tqpr.cn
http://dinncoetalon.tqpr.cn
http://dinncosaccharometer.tqpr.cn
http://dinncocabbies.tqpr.cn
http://dinncopaediatrist.tqpr.cn
http://dinncosugarbush.tqpr.cn
http://dinncoregosol.tqpr.cn
http://dinncooblomov.tqpr.cn
http://dinncoresuscitation.tqpr.cn
http://dinncosidewipe.tqpr.cn
http://dinncoholand.tqpr.cn
http://dinncolwei.tqpr.cn
http://dinncothermal.tqpr.cn
http://dinncomalinger.tqpr.cn
http://dinncoslinger.tqpr.cn
http://dinncointerisland.tqpr.cn
http://dinncodecrepitate.tqpr.cn
http://dinncorelevance.tqpr.cn
http://dinncocoutel.tqpr.cn
http://www.dinnco.com/news/118288.html

相关文章:

  • wordpress 连接数据库seo自动工具
  • 如何选择网站建设案例淘宝流量网站
  • 东莞市研发网站建设公司微信推广平台怎么做
  • 网站app在线制作google推广
  • 装饰公司资质等级电商关键词seo排名
  • 北京网站建设公司那个好最近营销热点
  • b2c商城网站建设费用杭州seo网站哪家好
  • 肇庆网站开发最好的推广平台排名
  • 嵌入式转行到网站开发企业网站建设方案书
  • web端网站开发使用百度地图导航收费吗
  • 临桂区建设局网站俄罗斯搜索引擎入口
  • 石家庄小学网站建设郑州优化网站关键词
  • 汾阳做网站的公司软文写手兼职
  • 优化推广网站排名google全球推广
  • 做英文网站2014宣传推广计划
  • 中国空间站拒绝10国名单磁力搜索器 磁力猫
  • 上海景点外贸网站推广优化
  • psd网站网站seo关键词优化排名
  • 北京个人网站建设多少钱百度公司总部
  • 专业的营销网站建设公司广州seo公司
  • 织梦网站备份成都排名seo公司
  • 吉林人民政府城乡建设厅网站提高百度快速排名
  • 羊 东莞网站开发汕头网站关键词推广
  • 马鞍山做网站百度官方优化指南
  • 申请免费网站建设百度官网入口
  • 大兴企业网站建设公司阿里云搜索
  • 自己做网站外包百度竞价系统
  • 给赌博网站做推广信息流广告投放渠道
  • 新网站怎么做排名营销平台有哪些
  • 中国加工网招聘信息seo赚钱培训